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 DisplayStyleState.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 ColorDef | undefined See SubCategoryAppearance.color  
defaults Static SubCategoryOverride A default SubCategoryOverride which overrides nothing.  
invisible Readonly boolean | undefined See invisible  
material Readonly string | undefined See materialId  
priority Readonly number | undefined See priority  
transparency Readonly number | undefined See transparency  
weight Readonly number | undefined See SubCategoryAppearance.weight  

Defined in

Last Updated: 28 October, 2024