MeshIndexedLines
- class cee.geo.MeshIndexedLines()
This class implements a
Mesh
for indexed lines.Rather than defining each line directly as an array of vertices, an array containing each unique vertex in the part is defined. Then lines are defined by arrays of indices that refer to elements of this vertex array. This allows lines to share vertices, thus reducing the number of vertices.
Constructors
Accessors
Methods
Constructors
constructor
- cee.geo.MeshIndexedLines.constructor(vertices, indices, optionalVertexData)
Creates an indexed lines mesh with the given vertices and indices.
- Arguments
vertices (
ArrayLike[number]
) –indices (
ArrayLike[number]
) –optionalVertexData (
cee.geo.OptionalIndexedLinesVertexData
) –
- Return type
cee.geo.MeshIndexedLines
Accessors
- cee.geo.MeshIndexedLines.boundingBox
Returns a copy of the
BoundingBox
of the mesh
- cee.geo.MeshIndexedLines.indexArray
A readonly array containing the indices of the mesh
- cee.geo.MeshIndexedLines.primitiveCount
The number of primitives in the mesh.
- cee.geo.MeshIndexedLines.primitiveType
The type of primitives that are used in the mesh.
- cee.geo.MeshIndexedLines.textureCoordinates
A readonly array containing the 2d texture coordinates of the mesh
- cee.geo.MeshIndexedLines.vertexArray
A readonly array containing the vertices of the mesh
- cee.geo.MeshIndexedLines.vertexCount
The number of vertices in the mesh.
Methods
getPrimitiveVertices
- cee.geo.MeshIndexedLines.getPrimitiveVertices(primitiveIndex)
Returns a copy of the vertex indices of a given primitive.
- Arguments
primitiveIndex (
number
) –
- Return type
[cee.Vec3]
rayIntersect
- cee.geo.MeshIndexedLines.rayIntersect(ray, hitItem)
Performs picking on the mesh.
- Arguments
ray (
cee.Ray
) –hitItem (
cee.geo.MeshHitItem
) –
- Return type
boolean
If a primitive was hit, the function returns true and populates the passed hitItem object with information about this primitive. It nothing was hit, returns false.