Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECBehaviorVRHandPointAt Class Reference

Behavior adding support to VR Hand behavior to know what element they are pointing at. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorVRHandPointAt:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

Classes

class  BlockListenerFactory
 Factory creating listeners using block. More...
 
class  DefaultListener
 Default implementation of behavior instance listener. More...
 
class  Instance
 Behavior instance. More...
 
interface  Listener
 Listener for behavior instance events. More...
 
interface  ListenerFactory
 Factory creating listeners. More...
 

Public Member Functions

void addListenerFactory (Block blockFactory)
 Add listener factory using block. More...
 
void addListenerFactory (ListenerFactory factory)
 Add listener factory. More...
 
void createListeners (Instance instance)
 Create listeners from factories adding them to behavior instance. More...
 
void dispose ()
 Dispose of behavior. More...
 
void forEachListenerFactory (Block ablock)
 Visit listener factories with block with argument ListenerFactory. More...
 
ECComposeCollisionFilter getCollisionFilter ()
 Collision filter for AI collider. More...
 
ECBehaviorCollider getIgnoreCollider ()
 Collider to ignore during collision testing or null. More...
 
ECPVector getOrigin ()
 Test origin. More...
 
ECPFloat getRange ()
 Test range. More...
 
ECPVector getRotation ()
 Test direction rotation. More...
 
ECPShapeList getShape ()
 Test shape. More...
 
ECPString getTestBone ()
 Test bone. More...
 
ECBehaviorVRHand getVRHand ()
 VR Hand behavior or null. More...
 
ECBehaviorVRHandPointAt new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand)
 Create behavior element class. More...
 
ECBehaviorVRHandPointAt new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, String id)
 Create behavior element class. More...
 
ECBehaviorVRHandPointAt new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, String id, String prefix)
 Create behavior element class. More...
 
void setIgnoreCollider (ECBehaviorCollider collider)
 Set collider to ignore during collision testing or null. More...
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void assignInstanceIndex (int instanceIndex)
 Assign instance index. More...
 
String getBehaviorID ()
 Unique identifier of behavior. More...
 
String getID ()
 Identifier. More...
 
int getInstanceIndex ()
 Instance index. More...
 
void loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance)
 Load instance data of another behavior. More...
 
bool supportsBehaviorID (String identifier)
 Behavior supports loading instance data of another behavior. More...
 
- Public Member Functions inherited from Dragengine.Scenery.ECBehavior
ECBehaviorInstance createInstance (BehaviorElement element)
 Create Behavior instance. More...
 

Static Public Member Functions

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

Public Attributes

ECComposeCollisionFilter pCollisionFilter
 
ECBehaviorCollider pIgnoreCollider
 
Array pListenerFactories
 
ECPVector pOrigin
 
ECPFloat pRange
 
ECPVector pRotation
 
ECPShapeList pShape
 
ECPString pTestBone
 
ECBehaviorVRHand pVRHand
 

Additional Inherited Members

- Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
DefaultECBehavior new (BehaviorElementClass eclass)
 Create default composeable behavior with empty identifier. More...
 
DefaultECBehavior new (BehaviorElementClass eclass, String id)
 Create default composeable behavior. More...
 
void setBehaviorID (String identifier)
 Set behavior identifier. More...
 
void useClassNameAsBehaviorID ()
 Set behavior identifier to "<class-name>:<identifier>". More...
 
void useFullyQualifiedClassNameAsBehaviorID ()
 Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More...
 

Detailed Description

Behavior adding support to VR Hand behavior to know what element they are pointing at.

Version
1.7

Behavior uses one collider collision test located attached controller collider facing forward.

If hand component is present and a test bone is set the collision test will be attached to the component bone.

By default the test direction is rotated by -45 degrees along the X axis. This accounts for VR hand controllers typically having their Z axis along the grip direction. This causes the point at detection to point 45 degrees upwards. For easier usage rotating the point at detection direction downwards by 45 degrees helps.

By default point-at is disabled for backward compatibility.

Requires these behaviors to be present:

To this behavior add it and set the class properties. Add listener to be notified if the pointed at element changes or query the current state.

Interaction with ECBehaviorVRHandPointedAt

If the pointed at element has ECBehaviorVRHandPointedAt instance it will be updated by adding and removing the owner element.

Member Function Documentation

◆ addListenerFactory() [1/2]

void Dragengine.Scenery.ECBehaviorVRHandPointAt.addListenerFactory ( Block  blockFactory)

Add listener factory using block.

Block receives as parameter Instance and returns Listener.

◆ addListenerFactory() [2/2]

void Dragengine.Scenery.ECBehaviorVRHandPointAt.addListenerFactory ( ListenerFactory  factory)

Add listener factory.

◆ createListeners()

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

Create listeners from factories adding them to behavior instance.

◆ dispose()

void Dragengine.Scenery.ECBehaviorVRHandPointAt.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ forEachListenerFactory()

void Dragengine.Scenery.ECBehaviorVRHandPointAt.forEachListenerFactory ( Block  ablock)

Visit listener factories with block with argument ListenerFactory.

◆ getBehaviorIn()

static ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.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 ECBehaviorVRHandPointAt.

◆ getCollisionFilter()

ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorVRHandPointAt.getCollisionFilter ( )

Collision filter for AI collider.

◆ getIgnoreCollider()

ECBehaviorCollider Dragengine.Scenery.ECBehaviorVRHandPointAt.getIgnoreCollider ( )

Collider to ignore during collision testing or null.

◆ getOrigin()

ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.getOrigin ( )

Test origin.

◆ getRange()

ECPFloat Dragengine.Scenery.ECBehaviorVRHandPointAt.getRange ( )

Test range.

◆ getRotation()

ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.getRotation ( )

Test direction rotation.

◆ getShape()

ECPShapeList Dragengine.Scenery.ECBehaviorVRHandPointAt.getShape ( )

Test shape.

Version
1.9

◆ getTestBone()

ECPString Dragengine.Scenery.ECBehaviorVRHandPointAt.getTestBone ( )

Test bone.

◆ getVRHand()

ECBehaviorVRHand Dragengine.Scenery.ECBehaviorVRHandPointAt.getVRHand ( )

VR Hand behavior or null.

◆ new() [1/3]

ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new ( BehaviorElementClass  eclass,
ECBehaviorVRHand  vrHand 
)

Create behavior element class.

◆ new() [2/3]

ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new ( BehaviorElementClass  eclass,
ECBehaviorVRHand  vrHand,
String  id 
)

Create behavior element class.

◆ new() [3/3]

ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new ( BehaviorElementClass  eclass,
ECBehaviorVRHand  vrHand,
String  id,
String  prefix 
)

Create behavior element class.

◆ setIgnoreCollider()

void Dragengine.Scenery.ECBehaviorVRHandPointAt.setIgnoreCollider ( ECBehaviorCollider  collider)

Set collider to ignore during collision testing or null.

Member Data Documentation

◆ pCollisionFilter

ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorVRHandPointAt.pCollisionFilter

◆ pIgnoreCollider

ECBehaviorCollider Dragengine.Scenery.ECBehaviorVRHandPointAt.pIgnoreCollider

◆ pListenerFactories

Array Dragengine.Scenery.ECBehaviorVRHandPointAt.pListenerFactories

◆ pOrigin

ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.pOrigin

◆ pRange

ECPFloat Dragengine.Scenery.ECBehaviorVRHandPointAt.pRange

◆ pRotation

ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.pRotation

◆ pShape

ECPShapeList Dragengine.Scenery.ECBehaviorVRHandPointAt.pShape

◆ pTestBone

ECPString Dragengine.Scenery.ECBehaviorVRHandPointAt.pTestBone

◆ pVRHand

ECBehaviorVRHand Dragengine.Scenery.ECBehaviorVRHandPointAt.pVRHand

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