Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorLookAt.Instance Class Reference

Behavior instance. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorLookAt.Instance:
Dragengine.Scenery.DefaultECBehaviorInstance Dragengine.Scenery.ECBehaviorInstance

Public Member Functions

void addListener (Listener listener)
 Add listener. More...
 
void addListenerFactory (Block blockFactory)
 Add listener factory using block. More...
 
void addListenerFactory (ListenerFactory factory)
 Add listener factory. More...
 
void clearTestCollider ()
 Clear test collider reverting to ray-tracing. More...
 
void createListeners (Instance instance)
 Create listeners from factories adding them to behavior instance. More...
 
void dispose ()
 Dispose of composeable instance. More...
 
void dispose ()
 Dispose of behavior. More...
 
void forEachListenerFactory (Block ablock)
 Visit listener factories with block with argument ListenerFactory. More...
 
ECBehaviorCollider.Instance getCollider ()
 Collider behavior instance. More...
 
ECBehaviorCollider getCollider ()
 Collider behavior or null. More...
 
ECBehaviorColliderAI.Instance getColliderAI ()
 ColliderAI behavior instance. More...
 
ECBehaviorColliderAI getColliderAI ()
 Collider AI behavior or null. More...
 
ECComposeCollisionFilter getCollisionFilter ()
 Collision filter for AI collider. More...
 
ECBehaviorComponent.Instance getComponent ()
 Component behavior instance or null if not used. More...
 
ECBehaviorComponent getComponent ()
 Component behavior or null. More...
 
ECBehaviorLookAt getECBehavior ()
 Behavior. More...
 
bool getEnabled ()
 Enable look-at. More...
 
ECBehaviorLocomotion.Instance getLocomotion ()
 Locomotion behavior instance or null if not used. More...
 
ECBehaviorLocomotion getLocomotion ()
 Locomotion behavior or null. More...
 
BehaviorElement getLookAtBehaviorElement ()
 Look-at element if of type BehaviorElement or null. More...
 
int getLookAtBone ()
 Look-at bone or -1. More...
 
String getLookAtBoneName ()
 Look-at bone name or null. More...
 
DVector getLookAtDirection ()
 Test direction used for last look-at test. More...
 
float getLookAtDistance ()
 Distance in meters to look-at hit point. More...
 
Element getLookAtElement ()
 Look-at element or null. More...
 
DVector getLookAtHitPoint ()
 Look-at hit point or null. More...
 
DVector getLookAtOrigin ()
 Test origin used for last look-at test. More...
 
Vector getOrigin ()
 Test origin. More...
 
ECPVector getOrigin ()
 Test origin. More...
 
float getRange ()
 Test range. More...
 
ECPFloat getRange ()
 Test range. More...
 
String getTestBone ()
 Name of test bone name or null to use component. More...
 
ECPString getTestBone ()
 Test bone. More...
 
bool getUseLocomotion ()
 Use locomotion. More...
 
bool hasLookAtElement ()
 Is looking at an element. More...
 
bool hasNotLookAtElement ()
 Is not looking at an element. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
Instance new (BehaviorElementClass eclass, ECBehaviorCollider collider, ECBehaviorComponent component, ECBehaviorLocomotion locomotion)
 
Instance new (BehaviorElementClass eclass, ECBehaviorCollider collider, ECBehaviorComponent component, ECBehaviorLocomotion locomotion, String prefix)
 
Instance new (BehaviorElementClass eclass, ECBehaviorColliderAI colliderAI, ECBehaviorComponent component, ECBehaviorLocomotion locomotion)
 Create behavior element class. More...
 
Instance new (BehaviorElementClass eclass, ECBehaviorColliderAI colliderAI, ECBehaviorComponent component, ECBehaviorLocomotion locomotion, String prefix)
 
Instance new (ECBehaviorLookAt ecbehavior, BehaviorElement element)
 Create element. More...
 
void postThink (float elapsed)
 Post thinking after physics processing is finished. More...
 
void removeListener (Listener listener)
 Remove listener. More...
 
void setCollisionFilter (CollisionFilter filter)
 Set test collision filter. More...
 
void setEnabled (bool enabled)
 Set if look-at is enabled. More...
 
void setLookAtElement (Element element, int bone, String boneName, float distance)
 Set look-at element. More...
 
void setRange (float range)
 Set test range. More...
 
void setSphereTestCollider (float radius)
 Set shape of test collider to sphere. More...
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void addToGameWorld ()
 Add element to game world. More...
 
void attachToParent (Element parent)
 Attach element to object set by the mapper in the IGDE World Editor. More...
 
void enterFrame ()
 Frame update started. More...
 
void geometryChanged ()
 Position or orientation changed. More...
 
BehaviorElement getElement ()
 Behavior element to apply behavior to. More...
 
int getInstanceIndex ()
 Behavior instance index. More...
 
DefaultECBehaviorInstance new (BehaviorElement element)
 Create default composeable instance. More...
 
void readFromFile (PersistencyEnvironment env, FileReader reader)
 Read behavior instance from file. More...
 
void removeFromGameWorld ()
 Remove element from game world. More...
 
bool requiresEnterFrame ()
 Behavior instance requires enterFrame() to be called. More...
 
bool requiresThink ()
 Behavior instance requires think() to be called. More...
 
void stateChanged ()
 State changed (visble, touchable). More...
 
void think (float elapsed)
 Think about what to do for the next frame update. More...
 
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write behavior instance to file. More...
 

Static Public Member Functions

static ECBehaviorLookAt getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 

Public Attributes

ECBehaviorCollider.Instance pCollider
 
ECBehaviorCollider pCollider
 
ECBehaviorColliderAI.Instance pColliderAI
 
ECBehaviorColliderAI pColliderAI
 
ECComposeCollisionFilter pCollisionFilter
 
ECBehaviorComponent.Instance pComponent
 
ECBehaviorComponent pComponent
 
ECBehaviorLookAt pECBehavior
 
bool pHasOrigin
 
Array pListenerFactories
 
Array pListeners
 
ECBehaviorLocomotion.Instance pLocomotion
 
ECBehaviorLocomotion pLocomotion
 
int pLookAtBone
 
String pLookAtBoneName
 
DVector pLookAtDirection
 
float pLookAtDistance
 
Element pLookAtElement
 
DVector pLookAtHitPoint
 
DVector pLookAtOrigin
 
Vector pOrigin
 
ECPVector pOrigin
 
float pRange
 
ECPFloat pRange
 
ColliderCollisionTest pTest
 
String pTestBone
 
ECPString pTestBone
 
bool pUseLocomotion
 

Protected Member Functions

void evaluateTest ()
 Evaluate last test. More...
 
ColliderCollisionTest getTest ()
 Collision test. More...
 
void update (float elapsed)
 Update. More...
 
void updateTestParameters ()
 Update test parameters. More...
 
- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehaviorInstance
void setRequiresEnterFrame (bool required)
 Set if behavior instance requires enterFrame() to be called. More...
 
void setRequiresThink (bool required)
 Set if behavior instance requires think() to be called. More...
 

Detailed Description

Behavior instance.

Member Function Documentation

◆ addListener()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.addListener ( Listener  listener)

Add listener.

◆ addListenerFactory() [1/2]

void Dragengine.Scenery.ECBehaviorLookAt.Instance.addListenerFactory ( Block  blockFactory)

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

void Dragengine.Scenery.ECBehaviorLookAt.Instance.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ clearTestCollider()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.clearTestCollider ( )

Clear test collider reverting to ray-tracing.

◆ createListeners()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.createListeners ( Instance  instance)

Create listeners from factories adding them to behavior instance.

◆ dispose() [1/2]

void Dragengine.Scenery.ECBehaviorLookAt.Instance.dispose ( )

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ dispose() [2/2]

void Dragengine.Scenery.ECBehaviorLookAt.Instance.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ evaluateTest()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.evaluateTest ( )
protected

Evaluate last test.

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ getBehaviorIn()

static ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookAt.Instance.getBehaviorIn ( BehaviorElementClass  eclass)
static

Get behavior in element class or null if absent.

Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorLookAt.

◆ getCollider() [1/2]

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollider ( )

Collider behavior instance.

◆ getCollider() [2/2]

ECBehaviorCollider Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollider ( )

Collider behavior or null.

◆ getColliderAI() [1/2]

ECBehaviorColliderAI.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getColliderAI ( )

ColliderAI behavior instance.

◆ getColliderAI() [2/2]

ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorLookAt.Instance.getColliderAI ( )

Collider AI behavior or null.

◆ getCollisionFilter()

ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorLookAt.Instance.getCollisionFilter ( )

Collision filter for AI collider.

◆ getComponent() [1/2]

ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getComponent ( )

Component behavior instance or null if not used.

◆ getComponent() [2/2]

ECBehaviorComponent Dragengine.Scenery.ECBehaviorLookAt.Instance.getComponent ( )

Component behavior or null.

◆ getECBehavior()

ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookAt.Instance.getECBehavior ( )

Behavior.

◆ getEnabled()

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.getEnabled ( )

Enable look-at.

◆ getLocomotion() [1/2]

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.getLocomotion ( )

Locomotion behavior instance or null if not used.

◆ getLocomotion() [2/2]

ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorLookAt.Instance.getLocomotion ( )

Locomotion behavior or null.

◆ getLookAtBehaviorElement()

BehaviorElement Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBehaviorElement ( )

Look-at element if of type BehaviorElement or null.

Version
1.4

◆ getLookAtBone()

int Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBone ( )

Look-at bone or -1.

◆ getLookAtBoneName()

String Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtBoneName ( )

Look-at bone name or null.

◆ getLookAtDirection()

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtDirection ( )

Test direction used for last look-at test.

◆ getLookAtDistance()

float Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtDistance ( )

Distance in meters to look-at hit point.

◆ getLookAtElement()

Element Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtElement ( )

Look-at element or null.

◆ getLookAtHitPoint()

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtHitPoint ( )

Look-at hit point or null.

◆ getLookAtOrigin()

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getLookAtOrigin ( )

Test origin used for last look-at test.

◆ getOrigin() [1/2]

Vector Dragengine.Scenery.ECBehaviorLookAt.Instance.getOrigin ( )

Test origin.

◆ getOrigin() [2/2]

ECPVector Dragengine.Scenery.ECBehaviorLookAt.Instance.getOrigin ( )

Test origin.

◆ getRange() [1/2]

float Dragengine.Scenery.ECBehaviorLookAt.Instance.getRange ( )

Test range.

◆ getRange() [2/2]

ECPFloat Dragengine.Scenery.ECBehaviorLookAt.Instance.getRange ( )

Test range.

◆ getTest()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorLookAt.Instance.getTest ( )
protected

Collision test.

◆ getTestBone() [1/2]

String Dragengine.Scenery.ECBehaviorLookAt.Instance.getTestBone ( )

Name of test bone name or null to use component.

Version
1.19

◆ getTestBone() [2/2]

ECPString Dragengine.Scenery.ECBehaviorLookAt.Instance.getTestBone ( )

Test bone.

◆ getUseLocomotion()

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.getUseLocomotion ( )

Use locomotion.

◆ hasLookAtElement()

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.hasLookAtElement ( )

Is looking at an element.

◆ hasNotLookAtElement()

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.hasNotLookAtElement ( )

Is not looking at an element.

◆ init()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.init ( StubElement  stub)

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new() [1/5]

Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
ECBehaviorComponent  component,
ECBehaviorLocomotion  locomotion 
)

◆ new() [2/5]

Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
ECBehaviorComponent  component,
ECBehaviorLocomotion  locomotion,
String  prefix 
)

◆ new() [3/5]

Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorColliderAI  colliderAI,
ECBehaviorComponent  component,
ECBehaviorLocomotion  locomotion 
)

Create behavior element class.

These values are optional and can be null: component, locomotion.

◆ new() [4/5]

Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new ( BehaviorElementClass  eclass,
ECBehaviorColliderAI  colliderAI,
ECBehaviorComponent  component,
ECBehaviorLocomotion  locomotion,
String  prefix 
)

◆ new() [5/5]

Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.new ( ECBehaviorLookAt  ecbehavior,
BehaviorElement  element 
)

Create element.

◆ postThink()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.postThink ( float  elapsed)

Post thinking after physics processing is finished.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ removeListener()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.removeListener ( Listener  listener)

Remove listener.

◆ setCollisionFilter()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.setCollisionFilter ( CollisionFilter  filter)

Set test collision filter.

◆ setEnabled()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.setEnabled ( bool  enabled)

Set if look-at is enabled.

◆ setLookAtElement()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.setLookAtElement ( Element  element,
int  bone,
String  boneName,
float  distance 
)

Set look-at element.

◆ setRange()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.setRange ( float  range)

Set test range.

◆ setSphereTestCollider()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.setSphereTestCollider ( float  radius)

Set shape of test collider to sphere.

By default no shape is set in which case ra-ytesting is used. Using shapes like a sphere is useful to enlarge the hit area for example with 3rd person views.

◆ update()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.update ( float  elapsed)
protected

Update.

◆ updateTestParameters()

void Dragengine.Scenery.ECBehaviorLookAt.Instance.updateTestParameters ( )
protected

Update test parameters.

Member Data Documentation

◆ pCollider [1/2]

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollider

◆ pCollider [2/2]

ECBehaviorCollider Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollider

◆ pColliderAI [1/2]

ECBehaviorColliderAI.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pColliderAI

◆ pColliderAI [2/2]

ECBehaviorColliderAI Dragengine.Scenery.ECBehaviorLookAt.Instance.pColliderAI

◆ pCollisionFilter

ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorLookAt.Instance.pCollisionFilter

◆ pComponent [1/2]

ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pComponent

◆ pComponent [2/2]

ECBehaviorComponent Dragengine.Scenery.ECBehaviorLookAt.Instance.pComponent

◆ pECBehavior

ECBehaviorLookAt Dragengine.Scenery.ECBehaviorLookAt.Instance.pECBehavior

◆ pHasOrigin

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.pHasOrigin

◆ pListenerFactories

Array Dragengine.Scenery.ECBehaviorLookAt.Instance.pListenerFactories

◆ pListeners

Array Dragengine.Scenery.ECBehaviorLookAt.Instance.pListeners

◆ pLocomotion [1/2]

ECBehaviorLocomotion.Instance Dragengine.Scenery.ECBehaviorLookAt.Instance.pLocomotion

◆ pLocomotion [2/2]

ECBehaviorLocomotion Dragengine.Scenery.ECBehaviorLookAt.Instance.pLocomotion

◆ pLookAtBone

int Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtBone

◆ pLookAtBoneName

String Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtBoneName

◆ pLookAtDirection

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtDirection

◆ pLookAtDistance

float Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtDistance

◆ pLookAtElement

Element Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtElement

◆ pLookAtHitPoint

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtHitPoint

◆ pLookAtOrigin

DVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pLookAtOrigin

◆ pOrigin [1/2]

Vector Dragengine.Scenery.ECBehaviorLookAt.Instance.pOrigin

◆ pOrigin [2/2]

ECPVector Dragengine.Scenery.ECBehaviorLookAt.Instance.pOrigin

◆ pRange [1/2]

float Dragengine.Scenery.ECBehaviorLookAt.Instance.pRange

◆ pRange [2/2]

ECPFloat Dragengine.Scenery.ECBehaviorLookAt.Instance.pRange

◆ pTest

ColliderCollisionTest Dragengine.Scenery.ECBehaviorLookAt.Instance.pTest

◆ pTestBone [1/2]

String Dragengine.Scenery.ECBehaviorLookAt.Instance.pTestBone

◆ pTestBone [2/2]

ECPString Dragengine.Scenery.ECBehaviorLookAt.Instance.pTestBone

◆ pUseLocomotion

bool Dragengine.Scenery.ECBehaviorLookAt.Instance.pUseLocomotion

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