Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
void colliderChanged (Collider owner)
 Collider changed which does not happen for this use of the listener.
void collisionResponse (Collider owner, CollisionInfo info)
 Collision detected.
Decal createComponentDecal (Element element, Component component)
 Create decal for component.
void createDecals (World world)
 Create decals from stored decal definition for matching elements in the world.
void createDecals (World world, Array collectDecals)
 Create decals from stored decal definition for matching elements in the world.
void dispose ()
 Dispose of decal builder to break reference loops.
CollisionFilter getCollisionFilter ()
 Collision filter limiting the elements to attach decals to.
DMatrix getMatrix ()
 Projection matrix constructed from position and orientation.
Quaternion getOrientation ()
 Orientation of projection.
DVector getPosition ()
 Position from to project.
bool getPropertyBoolFor (String key, bool default)
 Boolean property value or default value if absent.
int getPropertyCount ()
 Number of properties.
float getPropertyFloatFor (String key, float default)
 Floating point property value or default value if absent.
int getPropertyIntFor (String key, int default)
 Integer property value or default value if absent.
Array getPropertyKeys ()
 Property keys (String array).
String getPropertyValueFor (String key, String default)
 Value of property or default value if absent.
Vector getSize ()
 Size of projection.
Skin getSkin ()
 Skin to use for create decals.
TexMatrix2 getTransform ()
bool getVisible ()
 Decal is visible after being created.
ElementVisitor getVisitor ()
 Visitor to use to create the decals.
bool hasPropertyWithKey (String key)
 Property key is present.
DecalBuilder new ()
 Create decal builder.
void removeAllProperties ()
 Remove all properties.
void setCollisionFilter (CollisionFilter collisionFilter)
 Set collision filter limiting the elements to attach decals to.
void setPositionAndOrientation (DVector position, Quaternion orientation)
 Set projection position and orientation.
void setPropertyValueFor (String key, String value)
 Set property.
void setSize (Vector size)
 Set size of projection.
void setSkin (Skin skin)
 Set skin to use for create decals.
void setTransform (TexMatrix2 transform)
 Transform to set for created decals.
void setVisible (bool visible)
 Set if decal is visible after being created.
void setVisitor (ElementVisitor visitor)
 Set visitor to use to create the decals.
Public Member Functions inherited from Dragengine.Scenery.ColliderListener

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.

Referenced by colliderChanged().

◆ colliderChanged()

◆ 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.

References getVisitor().

Referenced by colliderChanged().

◆ 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.

References setSkin().

Referenced by colliderChanged().

◆ createDecals() [1/2]

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

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

References getSize().

Referenced by colliderChanged().

◆ 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.

References getSkin(), new(), and setSize().

◆ dispose()

void Dragengine.Utils.DecalBuilder.dispose ( )

Dispose of decal builder to break reference loops.

Referenced by setSkin().

◆ getCollisionFilter()

CollisionFilter Dragengine.Utils.DecalBuilder.getCollisionFilter ( )

Collision filter limiting the elements to attach decals to.

Referenced by getPropertyIntFor().

◆ getMatrix()

DMatrix Dragengine.Utils.DecalBuilder.getMatrix ( )

Projection matrix constructed from position and orientation.

References new().

Referenced by setCollisionFilter().

◆ getOrientation()

Quaternion Dragengine.Utils.DecalBuilder.getOrientation ( )

Orientation of projection.

Referenced by setTransform().

◆ getPosition()

DVector Dragengine.Utils.DecalBuilder.getPosition ( )

Position from to project.

Referenced by setVisible().

◆ getPropertyBoolFor()

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

Boolean property value or default value if absent.

Referenced by colliderChanged().

◆ getPropertyCount()

int Dragengine.Utils.DecalBuilder.getPropertyCount ( )

Number of properties.

Referenced by colliderChanged().

◆ getPropertyFloatFor()

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

Floating point property value or default value if absent.

References new(), and setCollisionFilter().

Referenced by colliderChanged().

◆ getPropertyIntFor()

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

Integer property value or default value if absent.

References getCollisionFilter().

Referenced by colliderChanged().

◆ getPropertyKeys()

Array Dragengine.Utils.DecalBuilder.getPropertyKeys ( )

Property keys (String array).

References getVisible().

Referenced by colliderChanged().

◆ getPropertyValueFor()

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

Value of property or default value if absent.

References setVisible().

Referenced by colliderChanged().

◆ getSize()

Vector Dragengine.Utils.DecalBuilder.getSize ( )

Size of projection.

References new().

Referenced by createDecals().

◆ getSkin()

Skin Dragengine.Utils.DecalBuilder.getSkin ( )

Skin to use for create decals.

References new().

Referenced by createDecals().

◆ getTransform()

TexMatrix2 Dragengine.Utils.DecalBuilder.getTransform ( )

Retrieves the texture coordinates transformation.

Referenced by setPropertyValueFor().

◆ getVisible()

bool Dragengine.Utils.DecalBuilder.getVisible ( )

Decal is visible after being created.

Referenced by getPropertyKeys().

◆ getVisitor()

ElementVisitor Dragengine.Utils.DecalBuilder.getVisitor ( )

Visitor to use to create the decals.

References setPositionAndOrientation().

Referenced by collisionResponse().

◆ hasPropertyWithKey()

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

Property key is present.

Referenced by colliderChanged().

◆ new()

DecalBuilder Dragengine.Utils.DecalBuilder.new ( )

◆ removeAllProperties()

void Dragengine.Utils.DecalBuilder.removeAllProperties ( )

Remove all properties.

References setTransform().

Referenced by colliderChanged().

◆ setCollisionFilter()

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

Set collision filter limiting the elements to attach decals to.

References getMatrix().

Referenced by colliderChanged(), and getPropertyFloatFor().

◆ setPositionAndOrientation()

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

Set projection position and orientation.

References new().

Referenced by getVisitor().

◆ setPropertyValueFor()

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

Set property.

References getTransform().

Referenced by colliderChanged().

◆ setSize()

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

Set size of projection.

Referenced by colliderChanged(), and createDecals().

◆ setSkin()

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

Set skin to use for create decals.

References dispose().

Referenced by colliderChanged(), and createComponentDecal().

◆ setTransform()

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

Transform to set for created decals.

References getOrientation().

Referenced by colliderChanged(), and removeAllProperties().

◆ setVisible()

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

Set if decal is visible after being created.

References getPosition().

Referenced by getPropertyValueFor().

◆ setVisitor()

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

Set visitor to use to create the decals.

References new().

Referenced by colliderChanged().


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