Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.Skin Class Reference

Immutable skin resources. More...

Inheritance diagram for Dragengine.Scenery.Skin:

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...
 

Detailed Description

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.

Member Function Documentation

◆ equals()

bool Dragengine.Scenery.Skin.equals ( Object  other)

Skin is equal to another object.

Implements Object.equals(Object).

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

◆ getFilename()

String Dragengine.Scenery.Skin.getFilename ( )

Normalized filename the skin has been loaded from.

◆ getTextureCount()

int Dragengine.Scenery.Skin.getTextureCount ( )

Number of textures.

◆ hashCode()

int Dragengine.Scenery.Skin.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ indexOfTextureNamed()

int Dragengine.Scenery.Skin.indexOfTextureNamed ( String  name)

Index of named texture or -1 if absent.

◆ loadAsynchron()

static void Dragengine.Scenery.Skin.loadAsynchron ( String  filename,
ResourceListener  listener 
)
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.

◆ new()

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.

◆ propertyGetColor()

Color Dragengine.Scenery.Skin.propertyGetColor ( int  texture,
int  property 
)

Color of texture property of type SkinPropertyType.color.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().
EInvalidParamProperty is not of type SkinPropertyType.color.

◆ propertyGetImage()

Image Dragengine.Scenery.Skin.propertyGetImage ( int  texture,
int  property 
)

Image of texture property of type SkinPropertyType.image.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().
EInvalidParamProperty is not of type SkinPropertyType.image.

◆ propertyGetName()

String Dragengine.Scenery.Skin.propertyGetName ( int  texture,
int  property 
)

Name of texture property.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().

◆ propertyGetRenderable()

String Dragengine.Scenery.Skin.propertyGetRenderable ( int  texture,
int  property 
)

Renderable of texture property or empty string if not set.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().

◆ propertyGetType()

SkinPropertyType Dragengine.Scenery.Skin.propertyGetType ( int  texture,
int  property 
)

Type of texture property.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().

◆ propertyGetValue()

float Dragengine.Scenery.Skin.propertyGetValue ( int  texture,
int  property 
)

Value of texture property of type SkinPropertyType.value.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().
EInvalidParamProperty is not of type SkinPropertyType.value.

◆ propertyGetVideo()

Video Dragengine.Scenery.Skin.propertyGetVideo ( int  texture,
int  property 
)

Video of texture property of type SkinPropertyType.video.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().
EInvalidParamProperty is not of type SkinPropertyType.video.

◆ textureGetName()

String Dragengine.Scenery.Skin.textureGetName ( int  texture)

Name of texture at index.

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

◆ textureGetPropertyCount()

int Dragengine.Scenery.Skin.textureGetPropertyCount ( int  texture)

Number of properties in texture at index.

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

◆ textureIndexOfPropertyNamed()

int Dragengine.Scenery.Skin.textureIndexOfPropertyNamed ( int  texture,
String  name 
)

Index of named property or -1 if absent.

Exceptions
EInvalidParamtexture is less than 0 or greater than or equal to getTextureCount().
EInvalidParamproperty is less than 0 or greater than or equal to textureGetPropertyCount().

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