Drag[en]gine Script Module DragonScript  1.21
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 clear ()
 Stop hit scans clearing results as if nothing is hit. More...
 
void dispose ()
 Dispose of composeable instance. More...
 
void forEachTest (Block ablock)
 Visit collision tests using block. More...
 
String getBone ()
 Test bone. More...
 
ECBehaviorCollider.Instance getCollider ()
 Collider behavior. More...
 
CollisionFilter getCollisionFilter ()
 Collision filter. More...
 
ECBehaviorComponent.Instance getComponent ()
 Collider behavior or null if not used. More...
 
Vector getDirection ()
 Normalized test direction. More...
 
ECBehaviorHitScan getECBehavior ()
 Behavior. 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...
 
void init (StubElement stub)
 Initialize element from stub. More...
 
Instance new (ECBehaviorHitScan ecbehavior, BehaviorElement element)
 Create element. More...
 
void resetTestDirections ()
 Set direction of all tests to viewMatrix * direction * range. 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 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 ()
 Start a single collision test. More...
 
void start (int count)
 Start collision tests. More...
 
void startCircular (int count, float angle)
 Start collision tests arranging them in a circular pattern. More...
 
void startCone (int count, float angle)
 Start collision tests arranging them randomly in a small cone cap. More...
 
void startRectangular (int count, float angleX, float angleY)
 Start collision tests arranging them randomly across a small sphere segment. More...
 
void startRectangularUniform (int countX, int countY, float angleX, float angleY)
 Start collision tests arranging them evenly across a small sphere segment. 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...
 

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

◆ clear()

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

Stop hit scans clearing results as if nothing is hit.

◆ dispose()

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

Dispose of composeable instance.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

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

◆ getCollisionFilter()

CollisionFilter Dragengine.Scenery.ECBehaviorHitScan.Instance.getCollisionFilter ( )

Collision filter.

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

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

◆ init()

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

Initialize element from stub.

Reimplemented from Dragengine.Scenery.DefaultECBehaviorInstance.

◆ new()

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

Create element.

◆ resetTestDirections()

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

Set direction of all tests to viewMatrix * direction * range.

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

◆ 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() [1/2]

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

Start a single collision test.

After call returns one collision tests is attached to the collider and ready to run using the last configuration used.

◆ start() [2/2]

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.

◆ startCircular()

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

Start collision tests arranging them in a circular pattern.

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

Parameters
angleOpening angle in degrees (angle across diameter).

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

◆ startRectangular()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.startRectangular ( int  count,
float  angleX,
float  angleY 
)

Start collision tests arranging them randomly across a small sphere segment.

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

The segment has a rectangular shape. This method can be used for weapons with rectangular spreads like a duckbill modification.

Parameters
angleXHorizontal opening angle in degrees (angle across width).
angleYVertical opening angle in degrees (angle across height).

◆ startRectangularUniform()

void Dragengine.Scenery.ECBehaviorHitScan.Instance.startRectangularUniform ( int  countX,
int  countY,
float  angleX,
float  angleY 
)

Start collision tests arranging them evenly across a small sphere segment.

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

The segment has a rectangular shape. This method can be used for testing actor visibility by using the actor height and size.

Parameters
countXCount of columns.
countYCount of rows.
angleXHorizontal opening angle in degrees (angle across width).
angleYVertical opening angle in degrees (angle across height).

◆ stop()

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

Stop hit scans.


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