Drag[en]gine Script Module DragonScript
1.23
|
Create decals based on a decal definition for each visited element using a visitor. More...
Classes | |
class | CreatedDecal |
Created decal. More... | |
Public Member Functions | |
bool | canHitCollider (Collider owner, Collider collider) |
Colliders can hit each other. More... | |
void | colliderChanged (Collider owner) |
Collider changed which does not happen for this use of the listener. More... | |
void | collisionResponse (Collider owner, CollisionInfo info) |
Collision detected. More... | |
Decal | createComponentDecal (Element element, Component component) |
Create decal for component. More... | |
void | createDecals (World world) |
Create decals from stored decal definition for matching elements in the world. More... | |
void | createDecals (World world, Array collectDecals) |
Create decals from stored decal definition for matching elements in the world. More... | |
void | dispose () |
Dispose of decal builder to break reference loops. More... | |
CollisionFilter | getCollisionFilter () |
Collision filter limiting the elements to attach decals to. More... | |
DMatrix | getMatrix () |
Projection matrix constructed from position and orientation. More... | |
Quaternion | getOrientation () |
Orientation of projection. More... | |
DVector | getPosition () |
Position from to project. More... | |
bool | getPropertyBoolFor (String key, bool default) |
Boolean property value or default value if absent. More... | |
int | getPropertyCount () |
Number of properties. More... | |
float | getPropertyFloatFor (String key, float default) |
Floating point property value or default value if absent. More... | |
int | getPropertyIntFor (String key, int default) |
Integer property value or default value if absent. More... | |
Array | getPropertyKeys () |
Property keys (String array). More... | |
String | getPropertyValueFor (String key, String default) |
Value of property or default value if absent. More... | |
Vector | getSize () |
Size of projection. More... | |
Skin | getSkin () |
Skin to use for create decals. More... | |
TexMatrix2 | getTransform () |
bool | getVisible () |
Decal is visible after being created. More... | |
ElementVisitor | getVisitor () |
Visitor to use to create the decals. More... | |
bool | hasPropertyWithKey (String key) |
Property key is present. More... | |
DecalBuilder | new () |
Create decal builder. More... | |
void | removeAllProperties () |
Remove all properties. More... | |
void | setCollisionFilter (CollisionFilter collisionFilter) |
Set collision filter limiting the elements to attach decals to. More... | |
void | setPositionAndOrientation (DVector position, Quaternion orientation) |
Set projection position and orientation. More... | |
void | setPropertyValueFor (String key, String value) |
Set property. More... | |
void | setSize (Vector size) |
Set size of projection. More... | |
void | setSkin (Skin skin) |
Set skin to use for create decals. More... | |
void | setTransform (TexMatrix2 transform) |
Transform to set for created decals. More... | |
void | setVisible (bool visible) |
Set if decal is visible after being created. More... | |
void | setVisitor (ElementVisitor visitor) |
Set visitor to use to create the decals. More... | |
Notifications. |
Create decals based on a decal definition for each visited element using a visitor.
Colliders can hit each other.
Implements Dragengine.Scenery.ColliderListener.
void Dragengine.Utils.DecalBuilder.colliderChanged | ( | Collider | owner | ) |
Collider changed which does not happen for this use of the listener.
Implements Dragengine.Scenery.ColliderListener.
void Dragengine.Utils.DecalBuilder.collisionResponse | ( | Collider | owner, |
CollisionInfo | info | ||
) |
Collision detected.
Uses visitor on hit colliders. For height terrain calls hitHeightTerrain method.
Implements Dragengine.Scenery.ColliderListener.
Create decal for component.
A new decal is created with properties stored in the decal builder and attached to the component. Caller can then apply additional modifications to the decal.
If the builder is collecting created decals a new CreatedDecal instance is stored.
void Dragengine.Utils.DecalBuilder.createDecals | ( | World | world | ) |
Create decals from stored decal definition for matching elements in the world.
void Dragengine.Utils.DecalBuilder.createDecals | ( | World | world, |
Array | collectDecals | ||
) |
Create decals from stored decal definition for matching elements in the world.
All created decals are stored in collectDecals.
void Dragengine.Utils.DecalBuilder.dispose | ( | ) |
Dispose of decal builder to break reference loops.
CollisionFilter Dragengine.Utils.DecalBuilder.getCollisionFilter | ( | ) |
Collision filter limiting the elements to attach decals to.
DMatrix Dragengine.Utils.DecalBuilder.getMatrix | ( | ) |
Projection matrix constructed from position and orientation.
Quaternion Dragengine.Utils.DecalBuilder.getOrientation | ( | ) |
Orientation of projection.
DVector Dragengine.Utils.DecalBuilder.getPosition | ( | ) |
Position from to project.
bool Dragengine.Utils.DecalBuilder.getPropertyBoolFor | ( | String | key, |
bool | default | ||
) |
Boolean property value or default value if absent.
int Dragengine.Utils.DecalBuilder.getPropertyCount | ( | ) |
Number of properties.
float Dragengine.Utils.DecalBuilder.getPropertyFloatFor | ( | String | key, |
float | default | ||
) |
Floating point property value or default value if absent.
int Dragengine.Utils.DecalBuilder.getPropertyIntFor | ( | String | key, |
int | default | ||
) |
Integer property value or default value if absent.
Array Dragengine.Utils.DecalBuilder.getPropertyKeys | ( | ) |
Property keys (String array).
String Dragengine.Utils.DecalBuilder.getPropertyValueFor | ( | String | key, |
String | default | ||
) |
Value of property or default value if absent.
Vector Dragengine.Utils.DecalBuilder.getSize | ( | ) |
Size of projection.
Skin Dragengine.Utils.DecalBuilder.getSkin | ( | ) |
Skin to use for create decals.
TexMatrix2 Dragengine.Utils.DecalBuilder.getTransform | ( | ) |
Retrieves the texture coordinates transformation.
bool Dragengine.Utils.DecalBuilder.getVisible | ( | ) |
Decal is visible after being created.
ElementVisitor Dragengine.Utils.DecalBuilder.getVisitor | ( | ) |
Visitor to use to create the decals.
bool Dragengine.Utils.DecalBuilder.hasPropertyWithKey | ( | String | key | ) |
Property key is present.
DecalBuilder Dragengine.Utils.DecalBuilder.new | ( | ) |
Create decal builder.
void Dragengine.Utils.DecalBuilder.removeAllProperties | ( | ) |
Remove all properties.
void Dragengine.Utils.DecalBuilder.setCollisionFilter | ( | CollisionFilter | collisionFilter | ) |
Set collision filter limiting the elements to attach decals to.
void Dragengine.Utils.DecalBuilder.setPositionAndOrientation | ( | DVector | position, |
Quaternion | orientation | ||
) |
Set projection position and orientation.
void Dragengine.Utils.DecalBuilder.setPropertyValueFor | ( | String | key, |
String | value | ||
) |
Set property.
void Dragengine.Utils.DecalBuilder.setSize | ( | Vector | size | ) |
Set size of projection.
void Dragengine.Utils.DecalBuilder.setSkin | ( | Skin | skin | ) |
Set skin to use for create decals.
void Dragengine.Utils.DecalBuilder.setTransform | ( | TexMatrix2 | transform | ) |
Transform to set for created decals.
void Dragengine.Utils.DecalBuilder.setVisible | ( | bool | visible | ) |
Set if decal is visible after being created.
void Dragengine.Utils.DecalBuilder.setVisitor | ( | ElementVisitor | visitor | ) |
Set visitor to use to create the decals.