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 ReadonlyinvalidateInternalGets 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
InternalRegisters this mesh as belonging to a mesh component.
The mesh component that owns this mesh
InternalCalculates barycentric coordinates for all primitives in this mesh.
InternalCalculates face normals for primitives that don't have normal attributes.
InternalInternalCalled when primitive position data is updated. Updates the position update counter and moves related entities to Load stage.
InternalRemoves the association with a mesh component.
The mesh component to remove
InternalUpdates VBO (Vertex Buffer Object) and VAO (Vertex Array Object) for all primitives.
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.
InternalDeletes 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.
InternalUpdates 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.