Drag[en]gine Script Module DragonScript
1.23
|
Immutable model resources. More...
Public Member Functions | |
Management | |
String | getFilename () |
Normalized filename the model has been loaded from. More... | |
int | getLodCount () |
Number of LODs. More... | |
int | getTextureCount () |
Number of textures. More... | |
String | getTextureNameAt (int texture) |
Name of texture at index. More... | |
int | getFaceCount (int lod) |
Number of faces in LOD. More... | |
int | getVertexCount (int lod) |
Number of vertices in LOD. More... | |
Vector | getMinimumExtend () |
Calculate minimum extend of LOD 0. More... | |
Vector | getMaximumExtend () |
Calculate maximum extend of LOD 0. More... | |
bool | equals (Object other) |
Model is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
Constructors | |
Model | new (String filename) |
Load model from file. More... | |
static void | loadAsynchron (String filename, ResourceListener listener) |
Load model from file asynchronously. More... | |
Immutable model resources.
Model resources provide the meshes to render components with.
This is a native class. It can not be subclassed.
bool Dragengine.Scenery.Model.equals | ( | Object | other | ) |
int Dragengine.Scenery.Model.getFaceCount | ( | int | lod | ) |
Number of faces in LOD.
EOutOfBoundary | lod is less than 0 or greater than or equal to getLodCount(). |
String Dragengine.Scenery.Model.getFilename | ( | ) |
Normalized filename the model has been loaded from.
int Dragengine.Scenery.Model.getLodCount | ( | ) |
Number of LODs.
Vector Dragengine.Scenery.Model.getMaximumExtend | ( | ) |
Calculate maximum extend of LOD 0.
Vector Dragengine.Scenery.Model.getMinimumExtend | ( | ) |
Calculate minimum extend of LOD 0.
int Dragengine.Scenery.Model.getTextureCount | ( | ) |
Number of textures.
String Dragengine.Scenery.Model.getTextureNameAt | ( | int | texture | ) |
Name of texture at index.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
int Dragengine.Scenery.Model.getVertexCount | ( | int | lod | ) |
Number of vertices in LOD.
EOutOfBoundary | lod is less than 0 or greater than or equal to getLodCount(). |
int Dragengine.Scenery.Model.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
|
static |
Load model from file asynchronously.
Registers a request in the game engine to load an model. Once finished or if the file is already loaded the listener is used to deliver the loaded model or null if the loading failed.
Model Dragengine.Scenery.Model.new | ( | String | filename | ) |
Load model from file.
If the model file has been already loaded it is assigned to this object. If the model is not loaded yet the engine loads the model. This call blocks until the model is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded model resource. Once no object instance uses an model file anymore it is released from memory.