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

Behavior instance. More...

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

Public Member Functions

void dispose ()
 Dispose of composeable instance. More...
 
void forEachHit (Block ablock)
 Visit collision tests with found collisions. More...
 
void forEachTest (Block ablock)
 Visit collision tests using block. More...
 
String getBone ()
 Test bone. More...
 
ECBehaviorCollider.Instance getCollider ()
 Collider behavior. More...
 
ECBehaviorComponent.Instance getComponent ()
 Collider behavior or null if not used. More...
 
Vector getDirection ()
 Normalized test direction. More...
 
ECBehaviorHitScan getECBehavior ()
 Behavior. More...
 
float getOffset ()
 Test origin offset. More...
 
Quaternion getOrientation ()
 Test orientation. More...
 
Vector getOrigin ()
 Test origin. More...
 
float getRange ()
 Test range. More...
 
ColliderCollisionTest getTestAt (int index)
 Collision test at index. More...
 
int getTestCount ()
 Count of collision tests. More...
 
Matrix getViewMatrix ()
 View matrix. More...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
bool isRunning ()
 Hit scan is running. More...
 
Instance new (ECBehaviorHitScan ecbehavior, BehaviorElement element)
 Create element. More...
 
void setBone (String bone)
 Set test bone. More...
 
void setCollisionFilter (CollisionFilter collisionFilter)
 Set collision filter. More...
 
void setDirection (Vector direction)
 Set normalized test direction. More...
 
void setOffset (float offset)
 Set test origin offset. More...
 
void setOrientation (Quaternion orientation)
 Set test orientation. More...
 
void setOrigin (Vector origin)
 Set test origin. More...
 
void setRange (float range)
 Set test range. More...
 
void start (int count)
 Start collision tests. More...
 
void startCone (int count, float angle)
 Start collision tests arranging them randomly in a small cone cap. More...
 
void stop ()
 Stop hit scans. 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 postThink (float elapsed)
 Post thinking after physics processing is finished. 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...
 

Public Attributes

String pBone
 
ECBehaviorCollider.Instance pCollider
 
CollisionFilter pCollisionFilter
 
ECBehaviorComponent.Instance pComponent
 
Vector pDirection
 
ECBehaviorHitScan pECBehavior
 
float pOffset
 
float pOffsetByRange
 
Quaternion pOrientation
 
Vector pOrigin
 
float pRange
 
Array pTests
 
Matrix pViewMatrix
 

Additional Inherited Members

- 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

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ forEachHit()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.forEachHit ( Block  ablock)

Visit collision tests with found collisions.

Block receives ColliderCollisionTest as argument.

◆ forEachTest()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.forEachTest ( Block  ablock)

Visit collision tests using block.

Block receives ColliderCollisionTest as argument.

◆ getBone()

String Dragengine.Scenery.ECBehaviorHitScan.Instance.getBone ( )

Test bone.

◆ getCollider()

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

Collider behavior.

◆ getComponent()

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

Collider behavior or null if not used.

◆ getDirection()

Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.getDirection ( )

Normalized test direction.

◆ getECBehavior()

ECBehaviorHitScan Dragengine.Scenery.ECBehaviorHitScan.Instance.getECBehavior ( )

Behavior.

◆ getOffset()

float Dragengine.Scenery.ECBehaviorHitScan.Instance.getOffset ( )

Test origin offset.

Version
1.22

◆ getOrientation()

Quaternion Dragengine.Scenery.ECBehaviorHitScan.Instance.getOrientation ( )

Test orientation.

◆ getOrigin()

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

Test origin.

◆ getRange()

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

Test range.

◆ getTestAt()

ColliderCollisionTest Dragengine.Scenery.ECBehaviorHitScan.Instance.getTestAt ( int  index)

Collision test at index.

◆ getTestCount()

int Dragengine.Scenery.ECBehaviorHitScan.Instance.getTestCount ( )

Count of collision tests.

◆ getViewMatrix()

Matrix Dragengine.Scenery.ECBehaviorHitScan.Instance.getViewMatrix ( )

View matrix.

1.22

Same as Matrix.newFromQuaternion(Quaternion) called with getOrientation() as parameter.

This matrix is useful if you want to manually set the test direction of individual tests after starting hit scanning. The Z-Axis of the matrix points into the direction of the zero vector similar to #resetTestDirections().

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ isRunning()

bool Dragengine.Scenery.ECBehaviorHitScan.Instance.isRunning ( )

Hit scan is running.

Version
1.22

◆ new()

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

Create element.

◆ setBone()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setBone ( String  bone)

Set test bone.

◆ setCollisionFilter()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setCollisionFilter ( CollisionFilter  collisionFilter)

Set collision filter.

◆ setDirection()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setDirection ( Vector  direction)

Set normalized test direction.

◆ setOffset()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOffset ( float  offset)

Set test origin offset.

◆ setOrientation()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOrientation ( Quaternion  orientation)

Set test orientation.

◆ setOrigin()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.setOrigin ( Vector  origin)

Set test origin.

◆ setRange()

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

Set test range.

◆ start()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.start ( int  count)

Start collision tests.

After call returns the given number of collision tests are attached to the collider and ready to run using the last configuration used.

◆ startCone()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.startCone ( int  count,
float  angle 
)

Start collision tests arranging them randomly in a small cone cap.

After call returns the given number of collision tests are attached to the collider and ready to run using the last configuration used.

This method can be used for weapons with multiple projectiles like buck shots.

Parameters
angleOpening angle in degrees (angle across diameter).

◆ stop()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.stop ( )

Stop hit scans.

Member Data Documentation

◆ pBone

String Dragengine.Scenery.ECBehaviorHitScan.Instance.pBone

◆ pCollider

ECBehaviorCollider.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.pCollider

◆ pCollisionFilter

CollisionFilter Dragengine.Scenery.ECBehaviorHitScan.Instance.pCollisionFilter

◆ pComponent

ECBehaviorComponent.Instance Dragengine.Scenery.ECBehaviorHitScan.Instance.pComponent

◆ pDirection

Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.pDirection

◆ pECBehavior

ECBehaviorHitScan Dragengine.Scenery.ECBehaviorHitScan.Instance.pECBehavior

◆ pOffset

float Dragengine.Scenery.ECBehaviorHitScan.Instance.pOffset

◆ pOffsetByRange

float Dragengine.Scenery.ECBehaviorHitScan.Instance.pOffsetByRange

◆ pOrientation

Quaternion Dragengine.Scenery.ECBehaviorHitScan.Instance.pOrientation

◆ pOrigin

Vector Dragengine.Scenery.ECBehaviorHitScan.Instance.pOrigin

◆ pRange

float Dragengine.Scenery.ECBehaviorHitScan.Instance.pRange

◆ pTests

Array Dragengine.Scenery.ECBehaviorHitScan.Instance.pTests

◆ pViewMatrix

Matrix Dragengine.Scenery.ECBehaviorHitScan.Instance.pViewMatrix

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