Base class: Entity

Lua
C++
Edit

Model

The model class is used for visible 3D objects. Models can be loaded from files or created from scratch.

Ultra Engine natively supports loading and saving of models in the glTF and Wavefront OBJ file formats. Other model formats can be loaded via the plugin system.

Property Type Description
lods table read-only array of Lods
skeleton Skeleton read-only skeleton object
AddMesh Method adds a new mesh to the model
AddLod Method adds a new level-of-detail to the model
Animate Method animates the model
Clear Method removes all meshes
Collapse Method collapses the model hierarchy
CountAnimationFrames Method returns the number of frames in an animation
CountAnimations Method returns the number animation sequences
GetAnimationSpeed Method returns the speed of an animation
GetAnimationName Method returns the name of an animation
Save Method saves the model to a file
SetLodDistance Method sets the base Lod distance factor
SetSkeleton Method allows models to share a single skeleton
UpdateNormals Method calculates new mesh normals
CreateBox Function creates a new box model
CreateCone Function creates a new cone model
CreateCubeSphere Function creates a new sphere model
CreateCylinder Function creates a new cylinder model
CreateModel Function creates a new model
CreatePlane Function creates a new plane model
CreateSphere Function creates a new sphere model
LoadModel Function loads a model from a file
Copyright © 2024 Ultra Software.
All rights reserved.