Drag[en]gine Script Module DragonScript Script API  1.0
Model Class Reference

Immutable model resources. More...

Inheritance diagram for Model:

Public Member Functions

Management
String getFilename ()
 Normalized filename the model has been loaded from. More...
 
Vector getMinimumExtend ()
 Minimum extends. More...
 
Vector getMaximumExtend ()
 Maximum extends. 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...
 
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, ResourceNotifier notifier)
 Load model from file asynchronously. More...
 

Detailed Description

Immutable model resources.

Model resources provide the meshes to render components with.

This is a native class. It can not be subclassed.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ equals()

bool equals ( Object  other)

Model is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Model and both point to the same engine model resource.

§ getFaceCount()

int getFaceCount ( int  lod)

Number of faces in LOD.

Exceptions
EOutOfBoundarylod is less than 0 or greater than or equal to getLodCount().

§ getFilename()

String getFilename ( )

Normalized filename the model has been loaded from.

§ getLodCount()

int getLodCount ( )

Number of LODs.

§ getMaximumExtend()

Vector getMaximumExtend ( )

Maximum extends.

§ getMinimumExtend()

Vector getMinimumExtend ( )

Minimum extends.

§ getTextureCount()

int getTextureCount ( )

Number of textures.

§ getTextureNameAt()

String getTextureNameAt ( int  texture)

Name of texture at index.

Exceptions
EOutOfBoundarytexture is less than 0 or greater than or equal to getTextureCount().

§ getVertexCount()

int getVertexCount ( int  lod)

Number of vertices in LOD.

Exceptions
EOutOfBoundarylod is less than 0 or greater than or equal to getLodCount().

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ loadAsynchron()

static void loadAsynchron ( String  filename,
ResourceNotifier  notifier 
)
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 notifier is used to deliver the loaded model or null if the loading failed.

§ new()

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.


The documentation for this class was generated from the following file: