PolyfaceAuxData Class

The PolyfaceAuxData structure contains one or more analytical data channels for each vertex of a Polyface, allowing the polyface to be styled using an AnalysisStyle. Typically a polyface will contain only vertex data required for its basic display: vertex position, normal, texture parameter, color. PolyfaceAuxData provides supplemental per-vertex data that is generally computed in an analysis program or other external data source. This supplemental data can be either 1D (e.g., height, override color) or 3D (e.g., displacement vector, override normal); see entriesPerValue, dataType. All data channels are indexed by the same indices, which must have the same length and structure as the other Polyface indices. This means that if a facet's face loop is found at index range [i0,i1] in the Polyface vertex index array, then the same index range [i0,i1] locates the data for this facet in all the other Polyface index arrays, including the PolyfaceAuxData indices.

@see auxData to associate auxiliary data with a polyface.

Methods

Name Description
constructor(channels: AuxChannel[], indices: number[]): PolyfaceAuxData Constructor with CAPTURED inputs.  
clone(): PolyfaceAuxData Return a deep copy.  
createForVisitor(): PolyfaceAuxData Create a PolyfaceAuxData for use by a PolyfaceVisitor.  
isAlmostEqual(other: PolyfaceAuxData, tolerance?: number): boolean Returns true if this is equivalent to other within tolerance.  
tryTransformInPlace(transform: Transform): boolean Apply transform to the data in each channel.  
isAlmostEqual(left: PolyfaceAuxData, right: PolyfaceAuxData, tol?: number): boolean Static Returns true if both left and right are undefined, or both are defined and equivalent within tolerance (default: 1.0e-8).  

Properties

Name Type Description
channels AuxChannel[] Array with one or more channels of auxiliary data for the associated polyface.  
indices number[] The indices (shared by all data in all channels) mapping the data to the mesh facets.  

Defined in

Last Updated: 14 November, 2024