Drag[en]gine Script Module DragonScript
1.23
|
Immutable skin resources. More...
Public Member Functions | |
Management | |
String | getFilename () |
Normalized filename the skin has been loaded from. More... | |
int | getTextureCount () |
Number of textures. More... | |
int | indexOfTextureNamed (String name) |
Index of named texture or -1 if absent. More... | |
String | textureGetName (int texture) |
Name of texture at index. More... | |
int | textureGetPropertyCount (int texture) |
Number of properties in texture at index. More... | |
int | textureIndexOfPropertyNamed (int texture, String name) |
Index of named property or -1 if absent. More... | |
String | propertyGetName (int texture, int property) |
Name of texture property. More... | |
String | propertyGetRenderable (int texture, int property) |
Renderable of texture property or empty string if not set. More... | |
SkinPropertyType | propertyGetType (int texture, int property) |
Type of texture property. More... | |
float | propertyGetValue (int texture, int property) |
Value of texture property of type SkinPropertyType.value. More... | |
Color | propertyGetColor (int texture, int property) |
Color of texture property of type SkinPropertyType.color. More... | |
Image | propertyGetImage (int texture, int property) |
Image of texture property of type SkinPropertyType.image. More... | |
Video | propertyGetVideo (int texture, int property) |
Video of texture property of type SkinPropertyType.video. More... | |
bool | equals (Object other) |
Skin is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
Constructors | |
Skin | new (String filename) |
Load skin from file. More... | |
static void | loadAsynchron (String filename, ResourceListener listener) |
Load skin from file asynchronously. More... | |
Immutable skin resources.
Skin resources provide the material properties for meshes to render components with.
This is a native class. It can not be subclassed.
bool Dragengine.Scenery.Skin.equals | ( | Object | other | ) |
String Dragengine.Scenery.Skin.getFilename | ( | ) |
Normalized filename the skin has been loaded from.
int Dragengine.Scenery.Skin.getTextureCount | ( | ) |
Number of textures.
int Dragengine.Scenery.Skin.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
int Dragengine.Scenery.Skin.indexOfTextureNamed | ( | String | name | ) |
Index of named texture or -1 if absent.
|
static |
Load skin from file asynchronously.
Registers a request in the game engine to load an skin. Once finished or if the file is already loaded the listener is used to deliver the loaded skin or null if the loading failed.
Skin Dragengine.Scenery.Skin.new | ( | String | filename | ) |
Load skin from file.
If the skin file has been already loaded it is assigned to this object. If the skin is not loaded yet the engine loads the skin. This call blocks until the skin is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded skin resource. Once no object instance uses an skin file anymore it is released from memory.
Color Dragengine.Scenery.Skin.propertyGetColor | ( | int | texture, |
int | property | ||
) |
Color of texture property of type SkinPropertyType.color.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
EInvalidParam | Property is not of type SkinPropertyType.color. |
Image Dragengine.Scenery.Skin.propertyGetImage | ( | int | texture, |
int | property | ||
) |
Image of texture property of type SkinPropertyType.image.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
EInvalidParam | Property is not of type SkinPropertyType.image. |
String Dragengine.Scenery.Skin.propertyGetName | ( | int | texture, |
int | property | ||
) |
Name of texture property.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
String Dragengine.Scenery.Skin.propertyGetRenderable | ( | int | texture, |
int | property | ||
) |
Renderable of texture property or empty string if not set.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
SkinPropertyType Dragengine.Scenery.Skin.propertyGetType | ( | int | texture, |
int | property | ||
) |
Type of texture property.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
float Dragengine.Scenery.Skin.propertyGetValue | ( | int | texture, |
int | property | ||
) |
Value of texture property of type SkinPropertyType.value.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
EInvalidParam | Property is not of type SkinPropertyType.value. |
Video Dragengine.Scenery.Skin.propertyGetVideo | ( | int | texture, |
int | property | ||
) |
Video of texture property of type SkinPropertyType.video.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |
EInvalidParam | Property is not of type SkinPropertyType.video. |
String Dragengine.Scenery.Skin.textureGetName | ( | int | texture | ) |
Name of texture at index.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
int Dragengine.Scenery.Skin.textureGetPropertyCount | ( | int | texture | ) |
Number of properties in texture at index.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
int Dragengine.Scenery.Skin.textureIndexOfPropertyNamed | ( | int | texture, |
String | name | ||
) |
Index of named property or -1 if absent.
EInvalidParam | texture is less than 0 or greater than or equal to getTextureCount(). |
EInvalidParam | property is less than 0 or greater than or equal to textureGetPropertyCount(). |