|
Drag[en]gine Script Module DragonScript 1.35
|
Immutable skin resources. More...
Public Member Functions | |
Management | |
| String | getFilename () |
| Normalized filename the skin has been loaded from. | |
| int | getTextureCount () |
| Number of textures. | |
| int | indexOfTextureNamed (String name) |
| Index of named texture or -1 if absent. | |
| String | textureGetName (int texture) |
| Name of texture at index. | |
| int | textureGetPropertyCount (int texture) |
| Number of properties in texture at index. | |
| int | textureIndexOfPropertyNamed (int texture, String name) |
| Index of named property or -1 if absent. | |
| String | propertyGetName (int texture, int property) |
| Name of texture property. | |
| String | propertyGetRenderable (int texture, int property) |
| Renderable of texture property or empty string if not set. | |
| SkinPropertyType | propertyGetType (int texture, int property) |
| Type of texture property. | |
| float | propertyGetValue (int texture, int property) |
| Value of texture property of type SkinPropertyType.value. | |
| Color | propertyGetColor (int texture, int property) |
| Color of texture property of type SkinPropertyType.color. | |
| Image | propertyGetImage (int texture, int property) |
| Image of texture property of type SkinPropertyType.image. | |
| Video | propertyGetVideo (int texture, int property) |
| Video of texture property of type SkinPropertyType.video. | |
| bool | equals (Object other) |
| Skin is equal to another object. | |
| int | hashCode () |
| Hash code for use as dictionary keys. | |
Constructors | |
| Skin | new (String filename) |
| Load skin from file. | |
| static void | loadAsynchron (String filename, ResourceListener listener) |
| Load skin from file asynchronously. | |
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 | ) |
Skin is equal to another object.
Implements Object.equals(Object).
References propertyGetImage().
Referenced by hashCode().
| String Dragengine.Scenery.Skin.getFilename | ( | ) |
Normalized filename the skin has been loaded from.
References getFilename().
Referenced by getFilename().
| int Dragengine.Scenery.Skin.getTextureCount | ( | ) |
Number of textures.
Referenced by indexOfTextureNamed().
| int Dragengine.Scenery.Skin.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
References equals(), hashCode(), and propertyGetVideo().
Referenced by hashCode().
| int Dragengine.Scenery.Skin.indexOfTextureNamed | ( | String | name | ) |
Index of named texture or -1 if absent.
References getTextureCount().
Referenced by textureGetName().
|
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.
References loadAsynchron().
Referenced by loadAsynchron().
| 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.
References new().
Referenced by new().
| 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. |
References propertyGetType().
Referenced by propertyGetVideo().
| 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. |
References propertyGetValue().
Referenced by equals().
| 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(). |
References textureIndexOfPropertyNamed().
Referenced by propertyGetRenderable().
| 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(). |
References propertyGetName().
Referenced by propertyGetType().
| 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(). |
References propertyGetRenderable().
Referenced by propertyGetColor().
| 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. |
Referenced by propertyGetImage().
| 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. |
References propertyGetColor().
Referenced by hashCode().
| 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(). |
References indexOfTextureNamed().
Referenced by textureGetPropertyCount().
| 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(). |
References textureGetName().
Referenced by textureIndexOfPropertyNamed().
| 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(). |
References textureGetPropertyCount().
Referenced by propertyGetName().