CLASSES
TagsA - Z

SubMesh

Mesh

Description

class SubMesh

Constructor

new SubMesh(materialIndex, verticesStart, verticesCount, indexStart, indexCount, mesh, renderingMesh, createBoundingBox)

SubMesh constructor

Parameters

Name Type Description
materialIndex number The index of the material to use (this index is used to find the correct material Inside the subMaterials collection of a multi-material)
verticesStart number
verticesCount number The count of vertices used
indexStart any Index of the first indice to use
indexCount number The indices count
mesh AbstractMesh @param mesh
optional renderingMesh Mesh If defined, is used instead of the mesh parameter.

Members

materialIndex : number

The material Index

verticesStart : number

The vertice sStart

verticesCount : number

The vertices Count

indexStart : any

The index Start

indexCount : number

The index Count

linesIndexCount : number

The lines Index Count

IsGlobal : boolean

Methods

getBoundingInfo() → BoundingInfo

Get bounding info

getMesh() → AbstractMesh

Get mesh

getRenderingMesh() → Mesh

Get rendering mesh

getMaterial() → Material

Get material

refreshBoundingInfo() → void

Refresh bounding info

updateBoundingInfo(world) → void

Update bounding info

Parameters

Name Type Description
world Matrix @param world

isInFrustum(frustumPlanes) → boolean

Return true if it is frustum

Parameters

Name Type Description
frustumPlanes Plane[] @param frustumPlanes

isCompletelyInFrustum(frustumPlanes) → boolean

Parameters

Name Type Description
frustumPlanes Plane[] @param frustumPlanes

render(enableAlphaMode) → void

Parameters

Name Type Description
enableAlphaMode boolean

getLinesIndexBuffer(indices, engine) → WebGLBuffer

Get lines index buffer

Parameters

Name Type Description
indices number[] @param indices
engine Engine @param engine

canIntersects(ray) → boolean

Can Intersects

Parameters

Name Type Description
ray Ray The ray

intersects(ray, positions, indices, fastCheck) → IntersectionInfo

Intersects

Parameters

Name Type Description
ray Ray The ray
positions Vector3[] @param positions
indices number[] @param indices

clone(newMesh, newRenderingMesh) → SubMesh

Create a clone of the subMesh

Parameters

Name Type Description
newMesh AbstractMesh @param newMesh
optional newRenderingMesh Mesh @param newRenderingMesh

dispose() → void

Dispose

static CreateFromIndices(materialIndex, startIndex, indexCount, mesh, renderingMesh) → SubMesh

Parameters

Name Type Description
materialIndex number The index of the material to use (this index is used to find the correct material Inside the subMaterials collection of a multi-material)
startIndex number Index of the first indice to use
indexCount number The indices count
mesh AbstractMesh @param mesh