Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.SkinBuilder Class Reference

Skin builder. More...

Inheritance diagram for Dragengine.Scenery.SkinBuilder:

Public Member Functions

Constructors
SkinBuilder new ()
 Create skin builder.

Management

Skin build (String filename)
 Build skin using filename.
void buildSkin ()
 Build skin.
void addTexture (String name)
 Add texture.
void addPropertyValue (int texture, String type, String texCoordSet, String renderable, float value)
 Add value texture property.
void addPropertyColor (int texture, String type, String texCoordSet, String renderable, Color color)
 Add color texture property.
void addPropertyImage (int texture, String type, String texCoordSet, String renderable, String pathImage, Image image)
 Add image texture property.
void addPropertyVideo (int texture, String type, String texCoordSet, String renderable, String pathVideo, Video video, bool sharedTime)
 Add video texture property.
void addPropertyConstructed (int texture, String type, String texCoordSet, String renderable, Color color, bool tileX, bool tileY, Point3 size)
 Add constructed texture property.
void addPropertyMapped (int texture, String type, String texCoordSet, String renderable, CurveBezier redCurve, SkinPropertyMappedInputType redInputType, Vector2 redInputRange, bool redInputClamped, String redBone, CurveBezier greenCurve, SkinPropertyMappedInputType greenInputType, Vector2 greenInputRange, bool greenInputClamped, String greenBone, CurveBezier blueCurve, SkinPropertyMappedInputType blueInputType, Vector2 blueInputRange, bool blueInputClamped, String blueBone, CurveBezier alphaCurve, SkinPropertyMappedInputType alphaInputType, Vector2 alphaInputRange, bool alphaInputClamped, String alphaBone)
 Add mapped texture property.
void addPropertyMapped (int texture, String type, String texCoordSet, String renderable, int red, int green, int blue, int alpha)
 Add mapped texture property.
void setPropertyBone (int texture, int property, String bone)
 Set bone name of texture property.
void constructedOpenContent (int texture, int property)
 Open constructed property content node.
void addNodeImage (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, String path, Image image, Point repeat)
 Add image node to open node.
void addNodeText (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, String path, Font font, float fontSize, String text, Color color)
 Add text node to open node.
void addNodeShape (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode, int shapeType, Color fillColor, Color lineColor, float thickness)
 Add shape node to open node.
void addNodeGroup (Point3 position, Point3 size, float rotation, float shear, float brightness, float contrast, float gamma, Color colorize, float transparency, SkinPropertyNodeCombineMode combineMode)
 Add group node to open node.
void nextNodeAsMask ()
 Set the next node created using addNode*() call as node mask.
void closeNode ()
 Close open node.

Detailed Description

Skin builder.

Builds skin resource without requiring a skin resource file. The created skin can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named skins can not clash with filenames present in the virtual file system. For this reason use unnamed skins if possible. Using named skins though can be useful if you want to provide skin resources to scripts not needing to know if the path they try to load is a build skin instead of a resource one.

To use the skin builder create a subclass and implement SkinBuilder.buildSkin() . You are only allowed to call methods from SkinBuilder from inside this function call. To create the skin call SkinBuilder.build() . This will call SkinBuilder.buildSkin() to fill a new skin resource with content. Once finished the build method returns the ready to use skin resource. Otherwise an exception is thrown.

This is a native class.

Member Function Documentation

◆ addNodeGroup()

void Dragengine.Scenery.SkinBuilder.addNodeGroup ( Point3 position,
Point3 size,
float rotation,
float shear,
float brightness,
float contrast,
float gamma,
Color colorize,
float transparency,
SkinPropertyNodeCombineMode combineMode )
protected

Add group node to open node.

Sets created group node as new open node to operate on.

References setPropertyBone().

Referenced by closeNode().

◆ addNodeImage()

void Dragengine.Scenery.SkinBuilder.addNodeImage ( Point3 position,
Point3 size,
float rotation,
float shear,
float brightness,
float contrast,
float gamma,
Color colorize,
float transparency,
SkinPropertyNodeCombineMode combineMode,
String path,
Image image,
Point repeat )
protected

Add image node to open node.

Referenced by closeNode().

◆ addNodeShape()

void Dragengine.Scenery.SkinBuilder.addNodeShape ( Point3 position,
Point3 size,
float rotation,
float shear,
float brightness,
float contrast,
float gamma,
Color colorize,
float transparency,
SkinPropertyNodeCombineMode combineMode,
int shapeType,
Color fillColor,
Color lineColor,
float thickness )
protected

Add shape node to open node.

References addPropertyMapped().

Referenced by closeNode().

◆ addNodeText()

void Dragengine.Scenery.SkinBuilder.addNodeText ( Point3 position,
Point3 size,
float rotation,
float shear,
float brightness,
float contrast,
float gamma,
Color colorize,
float transparency,
SkinPropertyNodeCombineMode combineMode,
String path,
Font font,
float fontSize,
String text,
Color color )
protected

Add text node to open node.

Referenced by closeNode().

◆ addPropertyColor()

void Dragengine.Scenery.SkinBuilder.addPropertyColor ( int texture,
String type,
String texCoordSet,
String renderable,
Color color )
protected

Add color texture property.

References addTexture().

Referenced by addPropertyConstructed().

◆ addPropertyConstructed()

void Dragengine.Scenery.SkinBuilder.addPropertyConstructed ( int texture,
String type,
String texCoordSet,
String renderable,
Color color,
bool tileX,
bool tileY,
Point3 size )
protected

Add constructed texture property.

References addPropertyColor().

Referenced by addPropertyMapped().

◆ addPropertyImage()

void Dragengine.Scenery.SkinBuilder.addPropertyImage ( int texture,
String type,
String texCoordSet,
String renderable,
String pathImage,
Image image )
protected

Add image texture property.

References addPropertyValue().

Referenced by addPropertyMapped().

◆ addPropertyMapped() [1/2]

void Dragengine.Scenery.SkinBuilder.addPropertyMapped ( int texture,
String type,
String texCoordSet,
String renderable,
CurveBezier redCurve,
SkinPropertyMappedInputType redInputType,
Vector2 redInputRange,
bool redInputClamped,
String redBone,
CurveBezier greenCurve,
SkinPropertyMappedInputType greenInputType,
Vector2 greenInputRange,
bool greenInputClamped,
String greenBone,
CurveBezier blueCurve,
SkinPropertyMappedInputType blueInputType,
Vector2 blueInputRange,
bool blueInputClamped,
String blueBone,
CurveBezier alphaCurve,
SkinPropertyMappedInputType alphaInputType,
Vector2 alphaInputRange,
bool alphaInputClamped,
String alphaBone )
protected

◆ addPropertyMapped() [2/2]

void Dragengine.Scenery.SkinBuilder.addPropertyMapped ( int texture,
String type,
String texCoordSet,
String renderable,
int red,
int green,
int blue,
int alpha )
protected

Add mapped texture property.

Version
1.18

Red, green, blue and alpha are indices into added mapped values (addMapped) or -1 to disable. Throws EInvalidParam if indices are less than -1 or larger than or equal to the count of mapped values.

References addPropertyConstructed().

◆ addPropertyValue()

void Dragengine.Scenery.SkinBuilder.addPropertyValue ( int texture,
String type,
String texCoordSet,
String renderable,
float value )
protected

Add value texture property.

Referenced by addPropertyImage().

◆ addPropertyVideo()

void Dragengine.Scenery.SkinBuilder.addPropertyVideo ( int texture,
String type,
String texCoordSet,
String renderable,
String pathVideo,
Video video,
bool sharedTime )
protected

Add video texture property.

Referenced by addPropertyMapped().

◆ addTexture()

void Dragengine.Scenery.SkinBuilder.addTexture ( String name)
protected

Add texture.

Referenced by addPropertyColor().

◆ build()

Skin Dragengine.Scenery.SkinBuilder.build ( String filename)

Build skin using filename.

The created skin can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named skins can not clash with filenames present in the virtual file system. For this reason use unnamed skins if possible. Using named skins though can be useful if you want to provide skin resources to scripts not needing to know if the path they try to load is a build skin instead of a resource one.

To create the skin call build() . This will call buildSkin() to fill a new skin resource with content. Once finished the build method returns the ready to use skin resource. Otherwise an exception is thrown.

References build().

Referenced by build().

◆ buildSkin()

void Dragengine.Scenery.SkinBuilder.buildSkin ( )
protected

Build skin.

Called by build(String) to fill a new skin resource with content. You are only allowed to call methods from SkinBuilder from inside this function call.

References buildSkin().

Referenced by buildSkin().

◆ closeNode()

void Dragengine.Scenery.SkinBuilder.closeNode ( )
protected

Close open node.

Sets the previous open node as the open node to operate on.

References addNodeGroup(), addNodeImage(), addNodeShape(), addNodeText(), closeNode(), constructedOpenContent(), and nextNodeAsMask().

Referenced by closeNode().

◆ constructedOpenContent()

void Dragengine.Scenery.SkinBuilder.constructedOpenContent ( int texture,
int property )
protected

Open constructed property content node.

Content node becomes open node to operate on. Call closeNode() to close it.

Referenced by closeNode().

◆ new()

SkinBuilder Dragengine.Scenery.SkinBuilder.new ( )

Create skin builder.

References new().

Referenced by new().

◆ nextNodeAsMask()

void Dragengine.Scenery.SkinBuilder.nextNodeAsMask ( )
protected

Set the next node created using addNode*() call as node mask.

Referenced by closeNode().

◆ setPropertyBone()

void Dragengine.Scenery.SkinBuilder.setPropertyBone ( int texture,
int property,
String bone )
protected

Set bone name of texture property.

Version
1.18

Used by texture properties using vertex position instead of texture coordinates. The vertex position is evaluated relative to the bone coordinate system.

References addPropertyMapped().

Referenced by addNodeGroup().


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