Drag[en]gine Script Module DragonScript  1.23
Dragengine.Utils.DecalBuilder Class Reference

Create decals based on a decal definition for each visited element using a visitor. More...

Inheritance diagram for Dragengine.Utils.DecalBuilder:
Dragengine.Scenery.ColliderListener

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.

Detailed Description

Create decals based on a decal definition for each visited element using a visitor.

Member Function Documentation

◆ canHitCollider()

bool Dragengine.Utils.DecalBuilder.canHitCollider ( Collider  owner,
Collider  collider 
)

Colliders can hit each other.

Implements Dragengine.Scenery.ColliderListener.

◆ colliderChanged()

void Dragengine.Utils.DecalBuilder.colliderChanged ( Collider  owner)

Collider changed which does not happen for this use of the listener.

Implements Dragengine.Scenery.ColliderListener.

◆ collisionResponse()

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.

◆ createComponentDecal()

Decal Dragengine.Utils.DecalBuilder.createComponentDecal ( Element  element,
Component  component 
)

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.

◆ createDecals() [1/2]

void Dragengine.Utils.DecalBuilder.createDecals ( World  world)

Create decals from stored decal definition for matching elements in the world.

◆ createDecals() [2/2]

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.

◆ dispose()

void Dragengine.Utils.DecalBuilder.dispose ( )

Dispose of decal builder to break reference loops.

◆ getCollisionFilter()

CollisionFilter Dragengine.Utils.DecalBuilder.getCollisionFilter ( )

Collision filter limiting the elements to attach decals to.

◆ getMatrix()

DMatrix Dragengine.Utils.DecalBuilder.getMatrix ( )

Projection matrix constructed from position and orientation.

◆ getOrientation()

Quaternion Dragengine.Utils.DecalBuilder.getOrientation ( )

Orientation of projection.

◆ getPosition()

DVector Dragengine.Utils.DecalBuilder.getPosition ( )

Position from to project.

◆ getPropertyBoolFor()

bool Dragengine.Utils.DecalBuilder.getPropertyBoolFor ( String  key,
bool  default 
)

Boolean property value or default value if absent.

◆ getPropertyCount()

int Dragengine.Utils.DecalBuilder.getPropertyCount ( )

Number of properties.

◆ getPropertyFloatFor()

float Dragengine.Utils.DecalBuilder.getPropertyFloatFor ( String  key,
float  default 
)

Floating point property value or default value if absent.

◆ getPropertyIntFor()

int Dragengine.Utils.DecalBuilder.getPropertyIntFor ( String  key,
int  default 
)

Integer property value or default value if absent.

◆ getPropertyKeys()

Array Dragengine.Utils.DecalBuilder.getPropertyKeys ( )

Property keys (String array).

◆ getPropertyValueFor()

String Dragengine.Utils.DecalBuilder.getPropertyValueFor ( String  key,
String  default 
)

Value of property or default value if absent.

◆ getSize()

Vector Dragengine.Utils.DecalBuilder.getSize ( )

Size of projection.

◆ getSkin()

Skin Dragengine.Utils.DecalBuilder.getSkin ( )

Skin to use for create decals.

◆ getTransform()

TexMatrix2 Dragengine.Utils.DecalBuilder.getTransform ( )

Retrieves the texture coordinates transformation.

◆ getVisible()

bool Dragengine.Utils.DecalBuilder.getVisible ( )

Decal is visible after being created.

◆ getVisitor()

ElementVisitor Dragengine.Utils.DecalBuilder.getVisitor ( )

Visitor to use to create the decals.

◆ hasPropertyWithKey()

bool Dragengine.Utils.DecalBuilder.hasPropertyWithKey ( String  key)

Property key is present.

◆ new()

DecalBuilder Dragengine.Utils.DecalBuilder.new ( )

Create decal builder.

◆ removeAllProperties()

void Dragengine.Utils.DecalBuilder.removeAllProperties ( )

Remove all properties.

◆ setCollisionFilter()

void Dragengine.Utils.DecalBuilder.setCollisionFilter ( CollisionFilter  collisionFilter)

Set collision filter limiting the elements to attach decals to.

◆ setPositionAndOrientation()

void Dragengine.Utils.DecalBuilder.setPositionAndOrientation ( DVector  position,
Quaternion  orientation 
)

Set projection position and orientation.

◆ setPropertyValueFor()

void Dragengine.Utils.DecalBuilder.setPropertyValueFor ( String  key,
String  value 
)

Set property.

◆ setSize()

void Dragengine.Utils.DecalBuilder.setSize ( Vector  size)

Set size of projection.

◆ setSkin()

void Dragengine.Utils.DecalBuilder.setSkin ( Skin  skin)

Set skin to use for create decals.

◆ setTransform()

void Dragengine.Utils.DecalBuilder.setTransform ( TexMatrix2  transform)

Transform to set for created decals.

◆ setVisible()

void Dragengine.Utils.DecalBuilder.setVisible ( bool  visible)

Set if decal is visible after being created.

◆ setVisitor()

void Dragengine.Utils.DecalBuilder.setVisitor ( ElementVisitor  visitor)

Set visitor to use to create the decals.


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