SubCategoryOverride Class

Overrides selected aspects of a SubCategoryAppearance in the context of a DisplayStyleState. When determining how geometry belonging to a SubCategory will appear when drawn within a view:

  1. The base SubCategoryAppearance associated with that subcategory is obtained.
  2. The SubCategoryOverride associated with that subcategory in the DisplayStyleState is obtained.
  3. Any aspects of the appearance overridden by the SubCategoryOverride are replaced with the values from the SubCategoryOverride. An aspect is overridden by virtue of not being set to "undefined" in the SubCategoryOverride.

@see overrideSubCategory

Methods

Name Description
equals(other: SubCategoryOverride): boolean Perform equality comparison against another SubCategoryOverride.  
override(appearance: SubCategoryAppearance): SubCategoryAppearance Returns a SubCategoryAppearance overridden to match the properties defined by this SubCategoryOverride.  
fromJSON(json?: SubCategoryAppearance.Props): SubCategoryOverride Static Create a new SubCategoryOverride from a JSON object  

Properties

Name Type Description
anyOverridden Accessor ReadOnly boolean Returns true if any aspect of the appearance is overridden (i.e., if any member is not undefined).  
color Readonly undefined | ColorDef See SubCategoryAppearance.color  
defaults Static SubCategoryOverride A default SubCategoryOverride which overrides nothing.  
invisible Readonly undefined | boolean See SubCategoryAppearance.invisible  
material Readonly undefined | string See SubCategoryAppearance.materialId  
priority Readonly undefined | number See SubCategoryAppearance.priority  
transparency Readonly undefined | number See SubCategoryAppearance.transparency  
weight Readonly undefined | number See SubCategoryAppearance.weight  

Defined in

Last Updated: 28 March, 2024