class SceneMesh
| Name | Summary |
|---|---|
SceneMesh | constructor(handle: Long)constructor(filename: String, defaultShaderOverride: String, defaultSceneOverride: Int = -1) |
| Name | Summary |
|---|---|
Companion | object Companion |
| Name | Summary |
|---|---|
animationNameToTrack | val animationNameToTrack: Map<String, Int> |
associatedFiles | var associatedFiles: Array<<Error class: unknown class>>? |
handle | var handle: Long |
materials | var materials: Array<SceneMaterial>? |
nodeNameToId | val nodeNameToId: Map<String, Int> |
| Name | Summary |
|---|---|
calculateNodeGlobalMatrix | fun calculateNodeGlobalMatrix(index: Int): Matrix44 Calculates the global transformation matrix of a node. |
computeCombinedBounds | fun computeCombinedBounds(): Bound3D Computes the combined bounding box of all geometry in this mesh. |
destroy | fun destroy() |
getAnimationTracks | |
getMaterial | fun getMaterial(index: Int): SceneMaterial? Gets a material from this mesh by index. This material is the "parent" of any SceneObjects instanced from this mesh. Any changes to attributes will apply to the non-overridden properties of the child materials. fun getMaterial(material: String): SceneMaterial? Gets a material by name. This material is the "parent" of any SceneObjects instanced from this mesh. Any changes to attributes will apply to the non-overridden properties of the child materials. |
getMaterialIndexForNodeMeshElement | fun getMaterialIndexForNodeMeshElement(nodeId: Int, meshElementId: Int): Int Gets the material index for a specific node and mesh element. |
getMaterialName | fun getMaterialName(materialIndex: Int): String Gets the name of a material by index. |
getNodeCount | fun getNodeCount(): Int Gets the number of nodes in this mesh. |
getNodeLocalMatrix | |
getNodeName | fun getNodeName(index: Int): String Gets the name of a node by index. |
updateCylinderSurface | fun updateCylinderSurface(radius: Float, height: Float, fractionOfCircle: Float) Updates the geometry of a cylinder surface mesh. |
updateWithTriangleMesh | fun updateWithTriangleMesh(triMesh: TriangleMesh, updateBVH: Boolean = false) Updates this mesh with geometry from a triangle mesh. |
object Companion
| Name | Summary |
|---|---|
axis | fun axis(size: Float, thickness: Float, material: SceneMaterial): SceneMesh Creates a coordinate axis visualization mesh. |
box | fun box(min: Vector3, max: Vector3, material: SceneMaterial): SceneMesh Creates a box mesh with the specified bounds and material. fun box(minx: Float, miny: Float, minz: Float, maxx: Float, maxy: Float, maxz: Float, material: SceneMaterial): SceneMesh Creates a box mesh with the specified dimensions and material. |
cylinderSurface | fun cylinderSurface(radius: Float, height: Float, fractionOfCircle: Float, material: SceneMaterial, materialBack: SceneMaterial? = null): SceneMesh Creates a portion of a cylinder centered at (0, 0, 0) that is a single sided surface facing inwards. This cylinder is symmetric about the XZ plane. |
dome | fun dome(radius: Float, material: SceneMaterial): SceneMesh Creates a dome mesh (half-sphere) with the specified radius and material. |
equirectSurface | fun equirectSurface(radius: Float, centralHorizontalAngle: Float, upperVerticalAngle: Float, lowerVerticalAngle: Float, material: SceneMaterial): SceneMesh Creates an inward portion of a sphere centered at (0, 0, 0). Uses a parameterization similar to OpenXR’s equirect2 layers. |
fromTriangleMesh | fun fromTriangleMesh(mesh: TriangleMesh, createBVH: Boolean): SceneMesh Creates a mesh from a triangle mesh. |
loadLocalFile | fun loadLocalFile(filename: String, defaultShaderOverride: String = "", defaultSceneOverride: Int = -1): SceneMesh Loads a 3D model from a glTF file. |
meshWithMaterials | fun meshWithMaterials(positions: FloatArray, normals: FloatArray, uvs: FloatArray, colors: IntArray, indices: IntArray, materialRanges: IntArray, materials: Array<SceneMaterial>, createBVH: Boolean): SceneMesh Creates a custom mesh with the specified geometry data and materials. fun meshWithMaterials(positions: FloatArray, normals: FloatArray, uvs: FloatArray, uv1s: FloatArray, colors: IntArray, indices: IntArray, materialRanges: IntArray, materials: Array<SceneMaterial>, createBVH: Boolean): SceneMesh |
panel | fun panel(min: Vector3, max: Vector3, edgeRadius: Vector3, materialPanel: SceneMaterial, materialGlass: SceneMaterial): SceneMesh Creates a panel mesh with a glass frame. |
quad | fun quad(min: Vector3, max: Vector3, material: SceneMaterial): SceneMesh Creates a single-sided quad (flat rectangle) mesh with the specified bounds and material. |
roundedBox | fun roundedBox(min: Vector3, max: Vector3, edgeRadius: Vector3, material: SceneMaterial): SceneMesh Creates a box with rounded corners. |
singleSidedQuad | fun singleSidedQuad(halfWidth: Float, halfHeight: Float, material: SceneMaterial): SceneMesh Creates a single-sided quad mesh with the specified dimensions and material. |
skybox | fun skybox(radius: Float, material: SceneMaterial): SceneMesh Creates a skybox mesh with the specified radius and material. |
sphere | fun sphere(radius: Float, material: SceneMaterial): SceneMesh Creates a sphere mesh with the specified radius and material. |