Class MeshData

Contains mesh vertex and index data used for initializing, updating and reading mesh data from Mesh.

Hierarchy

  • FrameworkObject
    • MeshData

Constructors

  • Parameters

    Returns MeshData

Accessors

  • get indexCount(): number
  • Returns the number of indices contained in the mesh.

    Returns number

  • get indices(): Iterable<number>
  • An array of all indices.

    Returns Iterable<number>

  • set indices(value): void
  • Parameters

    • value: readonly number[] | Iterable<number>

    Returns void

  • get vertexCount(): number
  • Returns the number of vertices contained in the mesh.

    Returns number

Methods

  • Get all intersections of the mesh with a line.

    The function has the same limitations as EnumerateOverTrianglesForVertexPositions.

    Parameters

    Returns Intersection[]

    All the intersection points.

  • Checks if any of the triangles intersects the ray.

    The function has the same limitations as EnumerateOverTrianglesForVertexPositions.

    Parameters

    • ray: Immutable<Ray>

      Ray to test.

    • OptionalpositiveSide: boolean

      (optional) Should intersections with the positive side (normal facing) count.

    • OptionalnegativeSide: boolean

      (optional) Should intersections with the negative side (opposite of normal facing) count.

    Returns Intersection

    Pair representing if intersection was found. If that is the case second element is the distance to the nearest one.

  • Finds vertex position that maximizes dot(vertexPosition, direction) The function has the same limitations as EnumerateOverTrianglesForVertexPositions.

    Parameters

    Returns Vector3

    Pair representing if point was found and it's position.