Options
All
  • Public
  • Public/Protected
  • All
Menu

Class 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.

Hierarchy

  • MeshIndexedLines

Implements

Index

Constructors

constructor

Accessors

Readonly boundingBox

boundingBox: BoundingBox

Returns a copy of the BoundingBox of the mesh

Readonly indexArray

indexArray: ArrayLike<number>

A readonly array containing the indices of the mesh

Readonly primitiveCount

primitiveCount: number

The number of primitives in the mesh.

Readonly primitiveType

primitiveType: MeshPrimitiveType

The type of primitives that are used in the mesh.

Readonly textureCoordinates

textureCoordinates: ArrayLike<number>

A readonly array containing the 2d texture coordinates of the mesh

Readonly vertexArray

vertexArray: ArrayLike<number>

A readonly array containing the vertices of the mesh

Readonly vertexCount

vertexCount: number

The number of vertices in the mesh.

Methods

getPrimitiveVertices

  • getPrimitiveVertices(primitiveIndex: number): Vec3[]
  • Returns a copy of the vertex indices of a given primitive.

    Parameters

    • primitiveIndex: number

    Returns Vec3[]

rayIntersect

  • Performs picking on the mesh.

    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.

    Parameters

    Returns boolean

Generated using TypeDoc