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

Component. More...

Inheritance diagram for Component:

Public Member Functions

Constructors
Component new (Model model, Skin skin)
 Create component. More...
 
Management
DVector getPosition ()
 Position. More...
 
void setPosition (DVector position)
 Set position. More...
 
Quaternion getOrientation ()
 Orientation. More...
 
void setOrientation (Quaternion orientation)
 Set orientation. More...
 
Vector getScaling ()
 Scaling. More...
 
void setScaling (Vector scaling)
 Set scaling. More...
 
DMatrix getMatrix ()
 Matrix. More...
 
DMatrix getInverseMatrix ()
 Inverse matrix. More...
 
DVector getMinimumExtend ()
 Minimum extends. More...
 
DVector getMaximumExtend ()
 Maximum extends. More...
 
bool getVisible ()
 Component is visible. More...
 
void setVisible (bool visible)
 Set if component is visible. More...
 
bool getCastShadows ()
 Component casts shadows if skins cast shadows. More...
 
void setCastShadows (bool castShadows)
 Sets if component casts shadows if skins cast shadows. More...
 
int getImportance ()
 Visual importance hint in the range from 0 (least important) to 100 (most important). More...
 
void setImportance (int level)
 Sets visual importance hint in the range from 0 (least important) to 100 (most important). More...
 
bool getStatic ()
 Component is static. More...
 
void setStatic (bool bStatic)
 Set if component is static. More...
 
Model getModel ()
 Model or null if not set. More...
 
void setModel (Model model)
 Set model or null if not set. More...
 
Skin getSkin ()
 Skin or null if not set. More...
 
void setSkin (Skin skin)
 Set skin or null if not set. More...
 
void setModelAndSkin (Model model, Skin skin)
 Set model and skin or null if not set. More...
 
Rig getRig ()
 Rig or null if not set. More...
 
void setRig (Rig rig)
 Set rig or null if not set. More...
 
OcclusionMesh getOcclusionMesh ()
 Occlusion mesh or null if not set. More...
 
void setOcclusionMesh (OcclusionMesh occlusionMesh)
 Set occlusion mesh or null if not set. More...
 
LayerMask getLayerMask ()
 Layer mask for visibility masking. More...
 
void setLayerMask (LayerMask layerMask)
 Set layer mask for visibility masking. More...
 
DynamicSkin getDynamicSkin ()
 Dynamic skin or null if not set. More...
 
void setDynamicSkin (DynamicSkin dynamicSkin)
 Set dynamic skin or null if not set. More...
 
void updateBones ()
 Update bone matrices. More...
 
void copyBonesToComponent (Component component)
 Copy bone states to matching bones states of another component. More...
 
Textures
int getTextureCount ()
 Number of textures in the skin or 0 if no skin is set. More...
 
int indexOfTextureNamed (String name)
 Index of named texture or -1 if not found or skin is not set. More...
 
Skin getTextureSkinAt (int texture)
 Skin of texture or null if not used. More...
 
void setTextureSkinAt (int texture, Skin skin, int skinTexture)
 Set skin of texture or null if not set. More...
 
TexMatrix2 getTextureTransformAt (int texture)
 Texture coordinates transformation of texture. More...
 
void setTextureTransformAt (int texture, TexMatrix2 transform)
 Set texture coordinates transformation of texture. More...
 
DynamicSkin getTextureDynamicSkinAt (int texture)
 Dynamic skin of texture or null if not set. More...
 
void setTextureDynamicSkinAt (int texture, DynamicSkin dynamicSkin)
 Set dynamic skin of texture or null if not set. More...
 
Bones
int getBoneCount ()
 Number of bones. More...
 
int indexOfBoneNamed (String name)
 Index of named bone or -1 if not found in rig or rig is not set. More...
 
String boneGetName (int index)
 Name of bone. More...
 
Vector boneGetPosition (int bone)
 Position of bone relative to parent bone or component if bone has no parent. More...
 
void boneSetPosition (int bone, Vector position)
 Set position of the bone. More...
 
Vector boneGetRotation (int bone)
 Rotation of bone relative to parent bone or component if bone has no parent. More...
 
void boneSetRotation (int bone, Vector rotation)
 Set rotation of the bone. More...
 
Matrix boneGetMatrix (int bone)
 Bone matrix relative to component. More...
 
Matrix boneGetInverseMatrix (int bone)
 Inverse bone matrix relative to component. More...
 
Matrix getBoneOriginMatrix (int bone)
 Bone origin matrix in component space. More...
 
Matrix getBoneOriginInverseMatrix (int bone)
 Inverse bone origin matrix in component space. More...
 
Vector getBonePosition (String bone)
 Position of bone relative to parent bone or component if bone has no parent. More...
 
void setBonePosition (String bone, Vector position)
 Set position of the bone. More...
 
Vector getBoneRotation (String bone)
 Rotation of bone relative to parent bone or component if bone has no parent. More...
 
void setBoneRotation (String bone, Vector rotation)
 Set rotation of the bone. More...
 
Matrix getBoneMatrix (String bone)
 Bone matrix relative to component. More...
 
Matrix getBoneInverseMatrix (String bone)
 Inverse bone matrix relative to component. More...
 
Decals
int getDecalCount ()
 Number of decals. More...
 
Decal getDecalAt (int index)
 Decal at index. More...
 
void addDecal (Decal decal)
 Add decal. More...
 
void insertDecalAt (int index, Decal decal)
 Insert decal at index. More...
 
void removeDecal (Decal decal)
 Remove decal. More...
 
void removeAllDecals ()
 Remove all decals. More...
 

Detailed Description

Component.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ addDecal()

void addDecal ( Decal  decal)

Add decal.

§ boneGetInverseMatrix()

Matrix boneGetInverseMatrix ( int  bone)

Inverse bone matrix relative to component.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneGetMatrix()

Matrix boneGetMatrix ( int  bone)

Bone matrix relative to component.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneGetName()

String boneGetName ( int  index)

Name of bone.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneGetPosition()

Vector boneGetPosition ( int  bone)

Position of bone relative to parent bone or component if bone has no parent.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneGetRotation()

Vector boneGetRotation ( int  bone)

Rotation of bone relative to parent bone or component if bone has no parent.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneSetPosition()

void boneSetPosition ( int  bone,
Vector  position 
)

Set position of the bone.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ boneSetRotation()

void boneSetRotation ( int  bone,
Vector  rotation 
)

Set rotation of the bone.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ copyBonesToComponent()

void copyBonesToComponent ( Component  component)

Copy bone states to matching bones states of another component.

§ getBoneCount()

int getBoneCount ( )

Number of bones.

§ getBoneInverseMatrix()

Matrix getBoneInverseMatrix ( String  bone)

Inverse bone matrix relative to component.

Exceptions
EInvalidParamNo bone with name boneName found.

§ getBoneMatrix()

Matrix getBoneMatrix ( String  bone)

Bone matrix relative to component.

Exceptions
EInvalidParamNo bone with name boneName found.

§ getBoneOriginInverseMatrix()

Matrix getBoneOriginInverseMatrix ( int  bone)

Inverse bone origin matrix in component space.

The bone origina matrix is the matrix in component space where the bone has no position, no rotation and 1 scaling.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ getBoneOriginMatrix()

Matrix getBoneOriginMatrix ( int  bone)

Bone origin matrix in component space.

The bone origina matrix is the matrix in component space where the bone has no position, no rotation and 1 scaling.

Exceptions
EInvalidParambone is less than 0 or larger than or equal to GetBoneCount().

§ getBonePosition()

Vector getBonePosition ( String  bone)

Position of bone relative to parent bone or component if bone has no parent.

Exceptions
EInvalidParamNo bone with name bone found.
Deprecated:
Use boneGetPosition( indexOfBoneNamed( bone ) )

§ getBoneRotation()

Vector getBoneRotation ( String  bone)

Rotation of bone relative to parent bone or component if bone has no parent.

Exceptions
EInvalidParamNo bone with name boneName found.
Deprecated:
Use boneSetRotation( indexOfBoneNamed( bone ), position )

§ getCastShadows()

bool getCastShadows ( )

Component casts shadows if skins cast shadows.

§ getDecalAt()

Decal getDecalAt ( int  index)

Decal at index.

Exceptions
EOutOfBoundaryindex is less than 0 or greater than or equal to getDecalCount().

§ getDecalCount()

int getDecalCount ( )

Number of decals.

§ getDynamicSkin()

DynamicSkin getDynamicSkin ( )

Dynamic skin or null if not set.

§ getImportance()

int getImportance ( )

Visual importance hint in the range from 0 (least important) to 100 (most important).

§ getInverseMatrix()

DMatrix getInverseMatrix ( )

Inverse matrix.

§ getLayerMask()

LayerMask getLayerMask ( )

Layer mask for visibility masking.

§ getMatrix()

DMatrix getMatrix ( )

§ getMaximumExtend()

DVector getMaximumExtend ( )

Maximum extends.

§ getMinimumExtend()

DVector getMinimumExtend ( )

Minimum extends.

§ getModel()

Model getModel ( )

Model or null if not set.

§ getOcclusionMesh()

OcclusionMesh getOcclusionMesh ( )

Occlusion mesh or null if not set.

§ getOrientation()

Quaternion getOrientation ( )

Orientation.

§ getPosition()

DVector getPosition ( )

Position.

§ getRig()

Rig getRig ( )

Rig or null if not set.

§ getScaling()

Vector getScaling ( )

Scaling.

§ getSkin()

Skin getSkin ( )

Skin or null if not set.

§ getStatic()

bool getStatic ( )

Component is static.

§ getTextureCount()

int getTextureCount ( )

Number of textures in the skin or 0 if no skin is set.

§ getTextureDynamicSkinAt()

DynamicSkin getTextureDynamicSkinAt ( int  texture)

Dynamic skin of texture or null if not set.

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

§ getTextureSkinAt()

Skin getTextureSkinAt ( int  texture)

Skin of texture or null if not used.

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

§ getTextureTransformAt()

TexMatrix2 getTextureTransformAt ( int  texture)

Texture coordinates transformation of texture.

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

§ getVisible()

bool getVisible ( )

Component is visible.

§ indexOfBoneNamed()

int indexOfBoneNamed ( String  name)

Index of named bone or -1 if not found in rig or rig is not set.

§ indexOfTextureNamed()

int indexOfTextureNamed ( String  name)

Index of named texture or -1 if not found or skin is not set.

§ insertDecalAt()

void insertDecalAt ( int  index,
Decal  decal 
)

Insert decal at index.

Exceptions
EOutOfBoundaryindex is less than 0 or greater than getDecalCount().

§ new()

Component new ( Model  model,
Skin  skin 
)

Create component.

§ removeAllDecals()

void removeAllDecals ( )

Remove all decals.

§ removeDecal()

void removeDecal ( Decal  decal)

Remove decal.

§ setBonePosition()

void setBonePosition ( String  bone,
Vector  position 
)

Set position of the bone.

Exceptions
EInvalidParamNo bone with name boneName found.
Deprecated:
Use boneSetPosition( indexOfBoneNamed( bone ), position )

§ setBoneRotation()

void setBoneRotation ( String  bone,
Vector  rotation 
)

Set rotation of the bone.

Exceptions
EInvalidParamNo bone with name boneName found.
Deprecated:
Use boneSetRotation( indexOfBoneNamed( bone ), rotation )

§ setCastShadows()

void setCastShadows ( bool  castShadows)

Sets if component casts shadows if skins cast shadows.

§ setDynamicSkin()

void setDynamicSkin ( DynamicSkin  dynamicSkin)

Set dynamic skin or null if not set.

§ setImportance()

void setImportance ( int  level)

Sets visual importance hint in the range from 0 (least important) to 100 (most important).

§ setLayerMask()

void setLayerMask ( LayerMask  layerMask)

Set layer mask for visibility masking.

§ setModel()

void setModel ( Model  model)

Set model or null if not set.

§ setModelAndSkin()

void setModelAndSkin ( Model  model,
Skin  skin 
)

Set model and skin or null if not set.

§ setOcclusionMesh()

void setOcclusionMesh ( OcclusionMesh  occlusionMesh)

Set occlusion mesh or null if not set.

§ setOrientation()

void setOrientation ( Quaternion  orientation)

Set orientation.

§ setPosition()

void setPosition ( DVector  position)

Set position.

§ setRig()

void setRig ( Rig  rig)

Set rig or null if not set.

§ setScaling()

void setScaling ( Vector  scaling)

Set scaling.

§ setSkin()

void setSkin ( Skin  skin)

Set skin or null if not set.

§ setStatic()

void setStatic ( bool  bStatic)

Set if component is static.

§ setTextureDynamicSkinAt()

void setTextureDynamicSkinAt ( int  texture,
DynamicSkin  dynamicSkin 
)

Set dynamic skin of texture or null if not set.

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

§ setTextureSkinAt()

void setTextureSkinAt ( int  texture,
Skin  skin,
int  skinTexture 
)

Set skin of texture or null if not set.

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

§ setTextureTransformAt()

void setTextureTransformAt ( int  texture,
TexMatrix2  transform 
)

Set texture coordinates transformation of texture.

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

§ setVisible()

void setVisible ( bool  visible)

Set if component is visible.

§ updateBones()

void updateBones ( )

Update bone matrices.


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