UeMesh
The UeMesh class is a renderable object in Unique Engine. It combines a geometry (vertex buffer) with a material and is placed in the scene graph via its transformation.
Constructor​
new UeMesh(geometry, material = global.UE_DEFAULT_MATERIAL, data = {})
Inherits from UeObject3D
Data parameters​
| Key | Type | Default | Description |
|---|---|---|---|
primitive | number | pr_trianglelist | GPU primitive mode |
Properties​
| Property | Type | Default | Description |
|---|---|---|---|
isMesh | boolean | true | Identifies this object as a mesh |
type | string | "Mesh" | Object type |
geometry | UeGeometry | required | The geometry (vertex data) |
material | UeMaterial | UeMeshStandardMaterial() | The material to use |
primitive | number | pr_trianglelist | GPU primitive mode |
skeleton | UeSkeleton | undefined | The skeleton associated with this mesh for skinning |
bindMode | string | "attached" | Bind mode: "attached" or "skinned" |
bindMatrix | array | identity | Matrix of the mesh at the time of binding |
bindMatrixInverse | array | identity | Inverse of the bind matrix |
name | string | "" | Object name (empty string by default) |
Methods​
| Method | Returns | Description |
|---|---|---|
createInstance() | UeMesh | Creates a new instance of this mesh that shares the same geometry and material references |
raycast(raycaster, intersects) | self | Tests the ray from raycaster against this object's bounding box and appends hits to intersects. The bounding sphere is checked first for optimization purposes |
toJSON() | struct | Returns an object representing this entity's properties. Not all props may be included |