API reference
API reference
Select your platform
No SDKs available
No versions available

SceneMesh

SceneMesh

class SceneMesh

Constructors

NameSummary
SceneMesh
constructor(handle: Long)constructor(filename: String, defaultShaderOverride: String, defaultSceneOverride: Int = -1)

Types

NameSummary
Companion
object Companion

Properties

NameSummary
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>

Functions

NameSummary
calculateNodeGlobalMatrix
fun calculateNodeGlobalMatrix(index: Int): Matrix44
computeCombinedBounds
fun computeCombinedBounds(): Bound3D
destroy
fun destroy()
getAnimationTracks
fun getAnimationTracks(): Array<AnimationTrack>
getMaterial
fun getMaterial(index: Int): SceneMaterial?
fun getMaterial(material: String): SceneMaterial?
fun getMaterialIndex(material: String): Int
getMaterialIndexForNodeMeshElement
fun getMaterialIndexForNodeMeshElement(nodeId: Int, meshElementId: Int): Int
getMaterialName
fun getMaterialName(materialIndex: Int): String
getNodeCount
fun getNodeCount(): Int
getNodeLocalMatrix
fun getNodeLocalMatrix(index: Int): Matrix44
getNodeName
fun getNodeName(index: Int): String
updateCylinderSurface
fun updateCylinderSurface(radius: Float, height: Float, fractionOfCircle: Float)
updateWithTriangleMesh
fun updateWithTriangleMesh(triMesh: TriangleMesh, updateBVH: Boolean = false)

Companion

object Companion

Functions

NameSummary
axis
fun axis(size: Float, thickness: Float, material: SceneMaterial): SceneMesh
box
fun box(min: Vector3, max: Vector3, material: SceneMaterial): SceneMesh
fun box(minx: Float, miny: Float, minz: Float, maxx: Float, maxy: Float, maxz: Float, material: SceneMaterial): SceneMesh
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
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
loadLocalFile
fun loadLocalFile(filename: String, defaultShaderOverride: String = "", defaultSceneOverride: Int = -1): SceneMesh
meshWithMaterials
fun meshWithMaterials(positions: FloatArray, normals: FloatArray, uvs: FloatArray, colors: IntArray, indices: IntArray, materialRanges: IntArray, materials: Array<SceneMaterial>, createBVH: Boolean): SceneMesh
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
quad
fun quad(min: Vector3, max: Vector3, material: SceneMaterial): SceneMesh
roundedBox
fun roundedBox(min: Vector3, max: Vector3, edgeRadius: Vector3, material: SceneMaterial): SceneMesh
singleSidedQuad
fun singleSidedQuad(halfWidth: Float, halfHeight: Float, material: SceneMaterial): SceneMesh
skybox
fun skybox(radius: Float, material: SceneMaterial): SceneMesh
sphere
fun sphere(radius: Float, material: SceneMaterial): SceneMesh
Did you find this page helpful?
Thumbs up icon
Thumbs down icon