Specification of when calculate the tangent of a vertex to apply Normal texture (for pbr/MToon shader) 0: Not calculate tangent (not apply normal texture) 1: (default) Use original tangent in a vertex, if a vertex has tangent attribute. If a vertex does not have it, calculate a tangent in a shader. 2: Use original tangent in a vertex, if a vertex has tangent attribute. If a vertex does not have it, precalculate a tangent in the javascript. 3: Calculate all tangent in a shader. 4: Precalculate all tangent in the javascript
Static__Static ReadonlyinvalidateInternal
Gets the first stable instance slot of this mesh (WebGL multi-draw).
Internal
Visit stamp of the per-pass instance prepass (WebGL multi-draw).
Internal
Gets the variation VBO UID for internal use.
The variation VBO resource handle
Gets AABB in local space.
Gets the unique identifier for this mesh.
The mesh UID
Gets the primitive position update count.
The number of times primitive positions have been updated
Internal
Registers this mesh as belonging to a mesh component.
The mesh component that owns this mesh
Internal
Calculates barycentric coordinates for all primitives in this mesh.
Internal
Calculates face normals for primitives that don't have normal attributes.
Internal
Internal
Clears the VAO entries that point at multi-draw group VAOs. The groups own those VAOs and delete them, so the mesh must forget them before the group is released.
Internal
Ensures that this mesh owns a contiguous range of stable instance slots in the engine-wide instance SID table and writes the instance identity records.
The first stable slot index (instanceBase).
Internal
Marks this mesh's multi-draw groups (and the legacy setup) for a rebuild. Called when a primitive's attributes or indices change.
Internal
Called when primitive position data is updated. Updates the position update counter and moves related entities to Load stage.
Internal
Packs the visible instances into the engine-wide remap table so that the shader can
resolve instanceBase + gl_InstanceID to a stable SID slot. WebGL multi-draw only.
Per-EntityUID stamps written by the render pass culling
The stamp value of the latest culling of the render pass
The number of visible instances
Internal
Packs the instance variation data of the instances that were not culled in a render pass into the front of the variation VBO, so that an instanced draw call renders only them. The VBO is rewritten only when its content changes. WebGL only.
Instances whose entities are not handled by the render pass's culling keep being drawn.
Per-EntityUID stamps written by the culling of the render pass (undefined: draw all the instances)
The stamp value of the latest culling of the render pass
The number of the instances to draw
Internal
Removes the association with a mesh component.
The mesh component to remove
Apply a material variant to the mesh
a variant name
Performs ray casting against this mesh to find intersection points.
Ray casting result with intersection information
Deletes all 3D API vertex data for this mesh.
Deletes all VAO (Vertex Array Object) resources for this mesh. Group VAOs are owned by the MultiDrawRepository and are skipped.
Internal
Deletes the variation VBO (Vertex Buffer Object).
True if updated, false if not changed (not dirty)
Gets the current material variant name applied to this mesh. Returns empty string if no variant is applied or if primitives have different variants.
The current variant name or empty string
Gets the primitive at the specified index.
The index of the primitive to retrieve
The primitive at the specified index
Gets the index of a primitive within this mesh.
The primitive to find the index of
The index of the primitive in the mesh
Gets the total number of primitives in this mesh.
The number of primitives
Gets the VAO (Vertex Array Object) UID for the specified index.
The index of the primitive
The VAO resource handle
Gets the VAO (Vertex Array Object) UID for the specified primitive UID.
The UID of the primitive
The VAO resource handle
Gets all available material variant names for this mesh.
Array of variant names from all primitives
Checks if this mesh has blend-without-z-write primitives.
True if blend-without-z-write primitives exist, false otherwise
Checks if this mesh has blend-with-z-write primitives.
True if blend-with-z-write primitives exist, false otherwise
Checks if this mesh has opaque primitives.
True if opaque primitives exist, false otherwise
Checks if this mesh has translucent primitives.
True if translucent primitives exist, false otherwise
Checks if this mesh setup is completed and ready for rendering.
True if setup is done, false otherwise
Updates the VAO (Vertex Array Object) for all primitives in this mesh.
Internal
Updates the variation VBO (Vertex Buffer Object) for instancing.
True if updated, false if not changed (not dirty)
The Mesh class. This mesh object has primitives (geometries) or a reference of 'original mesh'. If the latter, this mesh object is an 'instanced mesh', which has no primitives. Instanced meshes refer original mesh's primitives when drawing.