IndexedPolyfaceSubsetVisitor Class
An IndexedPolyfaceSubsetVisitor
is an IndexedPolyfaceVisitor
which only visits a subset of facets in the polyface.
- The subset is defined by an array of facet indices provided when this visitor is created.
- Input indices (e.g., for
moveToReadIndex
) are understood to be indices into the subset array.
Extends
Methods
Name | Description | |
---|---|---|
getVisitableFacetCount(): number | Return the number of facets this visitor is able to visit. | |
moveToNextFacet(): boolean | Advance the iterator to the next facet in the subset of client polyface facets. | |
moveToReadIndex(activeIndex: number): boolean | Advance the iterator to a particular facet in the subset of client polyface facets. | |
parentFacetIndex(activeIndex?: number): undefined | number | Return the parent facet index of the indicated index within the subset of client polyface facets. | |
reset(): void | Reset the iterator to start at the first active facet in the subset of client polyface facets. | |
createNormalComparison(mesh: IndexedPolyface | IndexedPolyfaceVisitor, compareVector: Vector3d..., sideAngle: Angle..., numWrap: number0): IndexedPolyfaceSubsetVisitor Static | Create a visitor for those mesh facets with normal in the same half-space as the given vector. | |
createSubsetVisitor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number0): IndexedPolyfaceSubsetVisitor Static | Create a visitor for iterating a subset of the facets of polyface . |
Inherited methods
Name | Inherited from | Description |
---|---|---|
clearArrays(): void Inherited | IndexedPolyfaceVisitor | Clear the contents of all arrays. |
clientAuxIndex(i: number): number Inherited | IndexedPolyfaceVisitor | Return the aux data index of vertex i within the currently loaded facet. |
clientColorIndex(i: number): number Inherited | IndexedPolyfaceVisitor | Return the color index of vertex i within the currently loaded facet. |
clientNormalIndex(i: number): number Inherited | IndexedPolyfaceVisitor | Return the normal index of vertex i within the currently loaded facet. |
clientParamIndex(i: number): number Inherited | IndexedPolyfaceVisitor | Return the param index of vertex i within the currently loaded facet. |
clientPointIndex(i: number): number Inherited | IndexedPolyfaceVisitor | Return the point index of vertex i within the currently loaded facet. |
clientPolyface(): IndexedPolyface Inherited | IndexedPolyfaceVisitor | Return the client polyface object. |
clone(): PolyfaceData Inherited | IndexedPolyfaceVisitor | Return a deep clone. |
compress(tolerance: numberGeometry.smallMetricDistance): void Inherited | IndexedPolyfaceVisitor | Compress the instance by equating duplicate data. |
copyNormalTo(i: number, dest: Vector3d): void Inherited | IndexedPolyfaceVisitor | Copy the contents (not pointer) of normal[i] into dest . |
copyParamTo(i: number, dest: Point2d): void Inherited | IndexedPolyfaceVisitor | Copy the contents (not pointer) of param[i] into dest . |
copyPointTo(i: number, dest: Point3d): void Inherited | IndexedPolyfaceVisitor | Copy the contents (not pointer) of point[i] into dest . |
currentReadIndex(): number Inherited | IndexedPolyfaceVisitor | Return the index (in the client polyface) of the current facet. |
gatherIndexedData(other: PolyfaceData, index0: number, index1: number, numWrap: number): void Inherited | IndexedPolyfaceVisitor | Copy data from other to this . |
getColor(i: number): number Inherited | IndexedPolyfaceVisitor | Return indexed color at index i . |
getEdgeVisible(i: number): boolean Inherited | IndexedPolyfaceVisitor | Return indexed visibility. |
getNormal(i: number, result?: Vector3d): undefined | Vector3d Inherited | IndexedPolyfaceVisitor | Return indexed normal at index i . |
getParam(i: number, result?: Point2d): undefined | Point2d Inherited | IndexedPolyfaceVisitor | Return indexed param at index i . |
getPoint(i: number, result?: Point3d): undefined | Point3d Inherited | IndexedPolyfaceVisitor | Return indexed point at index i . |
isAlmostEqual(other: PolyfaceData): boolean Inherited | IndexedPolyfaceVisitor | Test for equal indices and nearly equal coordinates. |
isAlmostEqualParamIndexUV(i: number, u: number, v: number): boolean Inherited | IndexedPolyfaceVisitor | Test if param at a index i matches the given uv |
pushDataFrom(other: PolyfaceVisitor, index: number): void Inherited | IndexedPolyfaceVisitor | Transfer data from a specified index of the other visitor as new data in this visitor. |
pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void Inherited | IndexedPolyfaceVisitor | Transfer interpolated data from the other visitor. |
range(result?: Range3d, transform?: Transform): Range3d Inherited | IndexedPolyfaceVisitor | Return the range of the point array (optionally transformed). |
resizeAllArrays(length: number): void Inherited | IndexedPolyfaceVisitor | Resize all data and index arrays to the specified length . |
resizeAllDataArrays(length: number): void Inherited | IndexedPolyfaceVisitor | Resize all data arrays to the specified length . |
reverseIndices(facetStartIndex?: number[]): void Inherited | IndexedPolyfaceVisitor | Reverse the indices for the specified facets in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex, |
reverseIndicesSingleFacet(facetIndex: number, facetStartIndex: number[]): void Inherited | IndexedPolyfaceVisitor | Reverse the indices for the specified facet in the index arrays (pointIndex, normalIndex, paramIndex, colorIndex, |
reverseNormals(): void Inherited | IndexedPolyfaceVisitor | Scale all the normals by -1. |
setNumWrap(numWrap: number): void Inherited | IndexedPolyfaceVisitor | Set the number of vertices replicated in visitor arrays (both data and index arrays). |
setTaggedNumericData(data: TaggedNumericData): void Inherited | IndexedPolyfaceVisitor | Set the tagged geometry data. |
trimAllIndexArrays(length: number): void Inherited | IndexedPolyfaceVisitor | Trim all index arrays to the stated length . |
tryGetDistanceParameter(index: number, result?: Point2d): undefined | Point2d Inherited | IndexedPolyfaceVisitor | Attempts to extract the distance parameter for the given vertex index on the current facet. |
tryGetNormalizedParameter(index: number, result?: Point2d): undefined | Point2d Inherited | IndexedPolyfaceVisitor | Attempts to extract the normalized parameter (0,1) for the given vertex index on the current facet. |
tryTransformInPlace(transform: Transform): boolean Inherited | IndexedPolyfaceVisitor | Apply transform to point and normal arrays and to auxData. |
create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor Static Inherited | IndexedPolyfaceVisitor | Create a visitor for iterating the facets of polyface . |
isValidFacetStartIndexArray(facetStartIndex: number[]): boolean Static Inherited | IndexedPolyfaceVisitor | Test if facetStartIndex is (minimally) valid. |
reverseIndices<T>(facetStartIndex: number[], indices: T[], preserveStart: boolean): boolean Static Inherited | IndexedPolyfaceVisitor | Reverse the indices for the specified facets in the given index array. |
reverseIndicesSingleFacet<T>(facetIndex: number, facetStartIndex: number[], indices: T[], preserveStart: boolean): boolean Static Inherited | IndexedPolyfaceVisitor | Reverse the indices for the specified facet in the specified index array. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
auxData Inherited | PolyfaceAuxData | undefined | IndexedPolyfaceVisitor | Auxiliary data. |
color Inherited | number[] | undefined | IndexedPolyfaceVisitor | Color values. |
colorCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the color count |
colorIndex Inherited | number[] | undefined | IndexedPolyfaceVisitor | Indices of colors at facet vertices. |
edgeVisible Inherited | boolean[] | IndexedPolyfaceVisitor | Booleans indicating visibility of corresponding edges. |
expectedClosure Accessor Inherited | number | IndexedPolyfaceVisitor | Get flag indicating if the mesh closure is unknown (0), open sheet (1), closed solid (2). |
face Inherited | FacetFaceData[] | IndexedPolyfaceVisitor | Map from facet index to face data. |
faceCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the number of faces. * Note that a "face" is not a facet. * A face is a subset of the Polyface's facets grouped for application purposes. |
indexCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the index count. Note that the point array is always indexed, and index arrays all have the same length. |
normal Inherited | GrowableXYZArray | undefined | IndexedPolyfaceVisitor | Coordinates of normal vectors (packed as numbers in a contiguous array). |
normalCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the normal count |
normalIndex Inherited | number[] | undefined | IndexedPolyfaceVisitor | Indices of normals at facet vertices. |
numEdgesThisFacet Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Return the number of edges in the current facet. * If numWrap > 0 for this visitor, the number of edges is smaller than the number of points. |
param Inherited | GrowableXYArray | undefined | IndexedPolyfaceVisitor | Coordinates of uv parameters (packed as numbers in a contiguous array). |
paramCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the param count |
paramIndex Inherited | number[] | undefined | IndexedPolyfaceVisitor | Indices of params at facet vertices. |
point Inherited | GrowableXYZArray | IndexedPolyfaceVisitor | Coordinate data for points in the facets (packed as numbers in a contiguous array). |
pointCount Accessor Inherited ReadOnly | number | IndexedPolyfaceVisitor | Get the point count |
pointIndex Inherited | number[] | IndexedPolyfaceVisitor | Indices of points at facet vertices. |
requireColors Accessor Inherited ReadOnly | boolean | IndexedPolyfaceVisitor | Ask if colors are required in this mesh. |
requireNormals Accessor Inherited ReadOnly | boolean | IndexedPolyfaceVisitor | Ask if normals are required in this mesh. |
requireParams Accessor Inherited ReadOnly | boolean | IndexedPolyfaceVisitor | Ask if params are required in this mesh. |
taggedNumericData Inherited | TaggedNumericData | undefined | IndexedPolyfaceVisitor | Tagged geometry data. |
twoSided Accessor Inherited | boolean | IndexedPolyfaceVisitor | Get boolean tag indicating if the facets are to be considered viewable from the back. |
Defined in
- polyface/IndexedPolyfaceVisitor.ts Line 210
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.