SubMesh

Hierarchy

Implements

Index

Constructors

constructor

  • new SubMesh(materialIndex: number, verticesStart: number, verticesCount: number, indexStart: number, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh, createBoundingBox?: boolean): SubMesh
  • Parameters

    • materialIndex: number
    • verticesStart: number
    • verticesCount: number
    • indexStart: number
    • indexCount: number
    • mesh: AbstractMesh
    • Optional renderingMesh: Mesh
    • Optional createBoundingBox: boolean

    Returns SubMesh

Properties

IsGlobal

IsGlobal: boolean

effect

effect: Nullable<Effect>

indexCount

indexCount: number

indexStart

indexStart: number

linesIndexCount

linesIndexCount: number

materialIndex

materialIndex: number

verticesCount

verticesCount: number

verticesStart

verticesStart: number

Methods

canIntersects

  • canIntersects(ray: Ray): boolean
  • True is the passed Ray intersects the submesh bounding box. Boolean returned.

    Parameters

    Returns boolean

clone

  • Creates a new Submesh from the passed Mesh.

    Parameters

    Returns SubMesh

dispose

  • dispose(): void
  • Disposes the Submesh. Returns nothing.

    Returns void

getBoundingInfo

  • Returns the submesh BoudingInfo object.

    Returns BoundingInfo

getLinesIndexBuffer

  • Returns a new Index Buffer. Type returned : WebGLBuffer.

    Parameters

    Returns WebGLBuffer

getMaterial

getMesh

  • Returns the mesh of the current submesh.

    Returns AbstractMesh

getRenderingMesh

  • getRenderingMesh(): Mesh
  • Returns the rendering mesh of the submesh.

    Returns Mesh

intersects

isCompletelyInFrustum

  • isCompletelyInFrustum(frustumPlanes: Plane[]): boolean
  • True is the submesh bounding box is completely inside the frustum defined by the passed array of planes. Boolean returned.

    Parameters

    Returns boolean

isInFrustum

  • isInFrustum(frustumPlanes: Plane[]): boolean
  • True is the submesh bounding box intersects the frustum defined by the passed array of planes. Boolean returned.

    Parameters

    Returns boolean

refreshBoundingInfo

  • Sets a new updated BoundingInfo object to the submesh. Returns the SubMesh.

    Returns SubMesh

render

  • render(enableAlphaMode: boolean): SubMesh
  • Renders the submesh. Returns it.

    Parameters

    • enableAlphaMode: boolean

    Returns SubMesh

setBoundingInfo

  • Sets the submesh BoundingInfo. Return the SubMesh.

    Parameters

    Returns SubMesh

setEffect

updateBoundingInfo

  • Updates the submesh BoundingInfo. Returns the Submesh.

    Parameters

    Returns SubMesh

Static AddToMesh

  • AddToMesh(materialIndex: number, verticesStart: number, verticesCount: number, indexStart: number, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh, createBoundingBox?: boolean): SubMesh
  • Parameters

    • materialIndex: number
    • verticesStart: number
    • verticesCount: number
    • indexStart: number
    • indexCount: number
    • mesh: AbstractMesh
    • Optional renderingMesh: Mesh
    • Optional createBoundingBox: boolean

    Returns SubMesh

Static CreateFromIndices

  • CreateFromIndices(materialIndex: number, startIndex: number, indexCount: number, mesh: AbstractMesh, renderingMesh?: Mesh): SubMesh
  • Creates a new Submesh from the passed parameters :

    • materialIndex (integer) : the index of the main mesh material.
    • startIndex (integer) : the index where to start the copy in the mesh indices array.
    • indexCount (integer) : the number of indices to copy then from the startIndex.
    • mesh (Mesh) : the main mesh to create the submesh from.
    • renderingMesh (optional Mesh) : rendering mesh.

    Parameters

    • materialIndex: number
    • startIndex: number
    • indexCount: number
    • mesh: AbstractMesh
    • Optional renderingMesh: Mesh

    Returns SubMesh

Generated using TypeDoc