Drag[en]gine Script Module DragonScript
1.23
|
Public Member Functions | |
Constructors | |
Component | new () |
Create component. More... | |
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... | |
bool | getVisible () |
Component is visible. More... | |
void | setVisible (bool visible) |
Set if component is visible. More... | |
Model | getModel () |
Model or null if not set. More... | |
void | setModel (Model model) |
Set model or null if not set. More... | |
void | setModelKeepTextures (Model model) |
Set model or null if not set while keeping textures. 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... | |
Model | getAudioModel () |
Audio model or null if not set. More... | |
void | setAudioModel (Model model) |
Set audio model 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 () |
Count of textures in the model or 0 if no model is set. More... | |
int | indexOfTextureNamed (String name) |
Index of named texture or -1 if not found or model is not set. More... | |
String | getTextureNameAt (int texture) |
Name of texture. More... | |
Skin | getTextureSkinAt (int texture) |
Skin of texture or null if not used. More... | |
int | getTextureTextureAt (int texture) |
Texture number 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 bone origin matrix. More... | |
void | boneSetPosition (int bone, Vector position) |
Set position of the bone relative to bone origin matrix. More... | |
Quaternion | boneGetRotation (int bone) |
Rotation of bone relative to bone origin matrix. More... | |
void | boneSetRotation (int bone, Quaternion rotation) |
Set rotation of the bone relative to bone origin matrix. More... | |
Matrix | boneGetMatrix (int bone) |
Bone matrix relative to component space. More... | |
Matrix | boneGetInverseMatrix (int bone) |
Inverse bone matrix relative to component space. 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 bone origin matrix. More... | |
void | setBonePosition (String bone, Vector position) |
Set position of the bone relative to bone origin matrix. More... | |
Quaternion | getBoneRotation (String bone) |
Rotation of bone relative to bone origin matrix. More... | |
void | setBoneRotation (String bone, Quaternion rotation) |
Set rotation of the bone relative to bone origin matrix. More... | |
Matrix | getBoneMatrix (String bone) |
Bone matrix relative to component space. More... | |
Matrix | getBoneInverseMatrix (String bone) |
Inverse bone matrix relative to component space. More... | |
Vertex position sets | |
int | getVertexPositionSetCount () |
Count of vertex position sets. More... | |
int | indexOfVertexPositionSetNamed (String name) |
Index of vertex position set with name or -1 if not found. More... | |
String | vertexPositionSetGetNameAt (int index) |
Name of vertex position set at index. More... | |
float | vertexPositionSetGetWeightAt (int index) |
Weight of vertex position set at index. More... | |
float | vertexPositionSetGetWeightNamed (String name) |
Weight of vertex position set by name. More... | |
void | vertexPositionSetSetWeightAt (int index, float weight) |
Set weight of vertex position set at index. More... | |
void | vertexPositionSetSetWeightNamed (String name, float weight) |
Set weight of vertex position set by name. More... | |
ComponentHintMovement | getHintMovement () |
Movement hint. More... | |
void | setHintMovement (ComponentHintMovement hint) |
Set movement hint. More... | |
bool | getEnableGI () |
Enable GI in graphic module if supported. More... | |
void | setEnableGI (bool enable) |
Set if enabled for GI in graphic module if supported. More... | |
int | getHintGIImportance () |
GI important hint. More... | |
void | setHintGIImportance (int importance) |
Set GI important hint. More... | |
Decals | |
int | getDecalCount () |
Number of decals. More... | |
void | addDecal (Decal decal) |
Add decal. More... | |
void | removeDecal (Decal decal) |
Remove decal. More... | |
void | removeAllDecals () |
Remove all decals. More... | |
void | forEachDecal (Block ablock) |
Visit decals with block with parameter Decal. More... | |
This is a native class.
void Dragengine.Scenery.Component.addDecal | ( | Decal | decal | ) |
Add decal.
Matrix Dragengine.Scenery.Component.boneGetInverseMatrix | ( | int | bone | ) |
Inverse bone matrix relative to component space.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
Matrix Dragengine.Scenery.Component.boneGetMatrix | ( | int | bone | ) |
Bone matrix relative to component space.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
String Dragengine.Scenery.Component.boneGetName | ( | int | index | ) |
Name of bone.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
Vector Dragengine.Scenery.Component.boneGetPosition | ( | int | bone | ) |
Position of bone relative to bone origin matrix.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
Quaternion Dragengine.Scenery.Component.boneGetRotation | ( | int | bone | ) |
Rotation of bone relative to bone origin matrix.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
void Dragengine.Scenery.Component.boneSetPosition | ( | int | bone, |
Vector | position | ||
) |
Set position of the bone relative to bone origin matrix.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
void Dragengine.Scenery.Component.boneSetRotation | ( | int | bone, |
Quaternion | rotation | ||
) |
Set rotation of the bone relative to bone origin matrix.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
void Dragengine.Scenery.Component.copyBonesToComponent | ( | Component | component | ) |
Copy bone states to matching bones states of another component.
void Dragengine.Scenery.Component.forEachDecal | ( | Block | ablock | ) |
Visit decals with block with parameter Decal.
Model Dragengine.Scenery.Component.getAudioModel | ( | ) |
Audio model or null if not set.
int Dragengine.Scenery.Component.getBoneCount | ( | ) |
Number of bones.
Matrix Dragengine.Scenery.Component.getBoneInverseMatrix | ( | String | bone | ) |
Inverse bone matrix relative to component space.
EInvalidParam | No bone with name boneName found. |
Matrix Dragengine.Scenery.Component.getBoneMatrix | ( | String | bone | ) |
Bone matrix relative to component space.
EInvalidParam | No bone with name boneName found. |
Matrix Dragengine.Scenery.Component.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.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
Matrix Dragengine.Scenery.Component.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.
EInvalidParam | bone is less than 0 or larger than or equal to GetBoneCount(). |
Vector Dragengine.Scenery.Component.getBonePosition | ( | String | bone | ) |
Position of bone relative to bone origin matrix.
EInvalidParam | No bone with name bone found. |
Quaternion Dragengine.Scenery.Component.getBoneRotation | ( | String | bone | ) |
Rotation of bone relative to bone origin matrix.
EInvalidParam | No bone with name boneName found. |
int Dragengine.Scenery.Component.getDecalCount | ( | ) |
Number of decals.
DynamicSkin Dragengine.Scenery.Component.getDynamicSkin | ( | ) |
Dynamic skin or null if not set.
bool Dragengine.Scenery.Component.getEnableGI | ( | ) |
Enable GI in graphic module if supported.
int Dragengine.Scenery.Component.getHintGIImportance | ( | ) |
GI important hint.
Value is in the range from 0 (very unimportant) to 4 (very important). This hint can be used by the graphic module to improve performance by excluding components with a GI important below a user chosen threashold. The default important is 4.
ComponentHintMovement Dragengine.Scenery.Component.getHintMovement | ( | ) |
Movement hint.
DMatrix Dragengine.Scenery.Component.getInverseMatrix | ( | ) |
Inverse matrix.
LayerMask Dragengine.Scenery.Component.getLayerMask | ( | ) |
Layer mask for visibility masking.
OcclusionMesh Dragengine.Scenery.Component.getOcclusionMesh | ( | ) |
Occlusion mesh or null if not set.
Quaternion Dragengine.Scenery.Component.getOrientation | ( | ) |
Orientation.
DVector Dragengine.Scenery.Component.getPosition | ( | ) |
Position.
Vector Dragengine.Scenery.Component.getScaling | ( | ) |
Scaling.
int Dragengine.Scenery.Component.getTextureCount | ( | ) |
Count of textures in the model or 0 if no model is set.
DynamicSkin Dragengine.Scenery.Component.getTextureDynamicSkinAt | ( | int | texture | ) |
Dynamic skin of texture or null if not set.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
String Dragengine.Scenery.Component.getTextureNameAt | ( | int | texture | ) |
Name of texture.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
Skin Dragengine.Scenery.Component.getTextureSkinAt | ( | int | texture | ) |
Skin of texture or null if not used.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
int Dragengine.Scenery.Component.getTextureTextureAt | ( | int | texture | ) |
Texture number of texture or null if not used.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
TexMatrix2 Dragengine.Scenery.Component.getTextureTransformAt | ( | int | texture | ) |
Texture coordinates transformation of texture.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
int Dragengine.Scenery.Component.getVertexPositionSetCount | ( | ) |
Count of vertex position sets.
bool Dragengine.Scenery.Component.getVisible | ( | ) |
Component is visible.
int Dragengine.Scenery.Component.indexOfBoneNamed | ( | String | name | ) |
Index of named bone or -1 if not found in rig or rig is not set.
int Dragengine.Scenery.Component.indexOfTextureNamed | ( | String | name | ) |
Index of named texture or -1 if not found or model is not set.
int Dragengine.Scenery.Component.indexOfVertexPositionSetNamed | ( | String | name | ) |
Index of vertex position set with name or -1 if not found.
Component Dragengine.Scenery.Component.new | ( | ) |
Create component.
void Dragengine.Scenery.Component.removeAllDecals | ( | ) |
Remove all decals.
void Dragengine.Scenery.Component.removeDecal | ( | Decal | decal | ) |
Remove decal.
void Dragengine.Scenery.Component.setAudioModel | ( | Model | model | ) |
Set audio model or null if not set.
Shares textures with assigned model.
void Dragengine.Scenery.Component.setBonePosition | ( | String | bone, |
Vector | position | ||
) |
Set position of the bone relative to bone origin matrix.
EInvalidParam | No bone with name boneName found. |
void Dragengine.Scenery.Component.setBoneRotation | ( | String | bone, |
Quaternion | rotation | ||
) |
Set rotation of the bone relative to bone origin matrix.
EInvalidParam | No bone with name boneName found. |
void Dragengine.Scenery.Component.setDynamicSkin | ( | DynamicSkin | dynamicSkin | ) |
Set dynamic skin or null if not set.
void Dragengine.Scenery.Component.setEnableGI | ( | bool | enable | ) |
Set if enabled for GI in graphic module if supported.
void Dragengine.Scenery.Component.setHintGIImportance | ( | int | importance | ) |
Set GI important hint.
Value is in the range from 0 (very unimportant) to 4 (very important). This hint can be used by the graphic module to improve performance by excluding components with a GI important below a user chosen threshold.
void Dragengine.Scenery.Component.setHintMovement | ( | ComponentHintMovement | hint | ) |
Set movement hint.
void Dragengine.Scenery.Component.setLayerMask | ( | LayerMask | layerMask | ) |
Set layer mask for visibility masking.
void Dragengine.Scenery.Component.setModel | ( | Model | model | ) |
Set model or null if not set.
Textures are reset. To keep textures use setModelKeepTextures.
Set model and skin or null if not set.
void Dragengine.Scenery.Component.setModelKeepTextures | ( | Model | model | ) |
Set model or null if not set while keeping textures.
Restores current state of textures after switching model if possible. Use this method instead of setModel if you set textures on the component and the new model is similar enough to match. Textures not existing anymore are not restored.
void Dragengine.Scenery.Component.setOcclusionMesh | ( | OcclusionMesh | occlusionMesh | ) |
Set occlusion mesh or null if not set.
void Dragengine.Scenery.Component.setOrientation | ( | Quaternion | orientation | ) |
Set orientation.
void Dragengine.Scenery.Component.setPosition | ( | DVector | position | ) |
Set position.
void Dragengine.Scenery.Component.setRig | ( | Rig | rig | ) |
Set rig or null if not set.
void Dragengine.Scenery.Component.setScaling | ( | Vector | scaling | ) |
Set scaling.
void Dragengine.Scenery.Component.setSkin | ( | Skin | skin | ) |
Set skin or null if not set.
void Dragengine.Scenery.Component.setTextureDynamicSkinAt | ( | int | texture, |
DynamicSkin | dynamicSkin | ||
) |
Set dynamic skin of texture or null if not set.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
void Dragengine.Scenery.Component.setTextureSkinAt | ( | int | texture, |
Skin | skin, | ||
int | skinTexture | ||
) |
Set skin of texture or null if not set.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
void Dragengine.Scenery.Component.setTextureTransformAt | ( | int | texture, |
TexMatrix2 | transform | ||
) |
Set texture coordinates transformation of texture.
EOutOfBoundary | texture is less than 0 or greater than or equal to getTextureCount(). |
void Dragengine.Scenery.Component.setVisible | ( | bool | visible | ) |
Set if component is visible.
void Dragengine.Scenery.Component.updateBones | ( | ) |
Update bone matrices.
String Dragengine.Scenery.Component.vertexPositionSetGetNameAt | ( | int | index | ) |
Name of vertex position set at index.
EOutOfBoundary | Index is less than 0. |
EOutOfBoundary | Index is larger than or equal to getVertexPositionSetCount(). |
float Dragengine.Scenery.Component.vertexPositionSetGetWeightAt | ( | int | index | ) |
Weight of vertex position set at index.
EOutOfBoundary | Index is less than 0. |
EOutOfBoundary | Index is larger than or equal to getVertexPositionSetCount(). |
float Dragengine.Scenery.Component.vertexPositionSetGetWeightNamed | ( | String | name | ) |
Weight of vertex position set by name.
EOutOfBoundary | Vertex position set with name is absent. |
void Dragengine.Scenery.Component.vertexPositionSetSetWeightAt | ( | int | index, |
float | weight | ||
) |
Set weight of vertex position set at index.
EOutOfBoundary | Index is less than 0. |
EOutOfBoundary | Index is larger than or equal to getVertexPositionSetCount(). |
void Dragengine.Scenery.Component.vertexPositionSetSetWeightNamed | ( | String | name, |
float | weight | ||
) |
Set weight of vertex position set by name.
EOutOfBoundary | Vertex position set with name is absent. |