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

Behavior element behavior adding VR Hand Controller Laser Pointer support to actor. More...

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

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

void dispose ()
 Dispose of behavior. More...
 
ECPColor getColor ()
 Color of beam. More...
 
ECPString getControllerBlue ()
 Controller blue name. More...
 
ECPString getControllerGreen ()
 Controller green name. More...
 
ECPString getControllerIntensity ()
 Controller intensity name. More...
 
ECPString getControllerLength ()
 Controller length name. More...
 
ECPString getControllerRed ()
 Controller red name. More...
 
ECPFloat getIntensity ()
 Intensity of beam. More...
 
ECPFloat getLength ()
 Length of beam in meters. More...
 
ECBehaviorParticleEmitter getParticleEmitter ()
 Particle emitter behavior. More...
 
ECBehaviorVRHandPointAt getVRHandPointAt ()
 VR Hand Point At behavior. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt)
 Create behavior element class. More...
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id)
 Create behavior element class. More...
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id, String subID)
 Create behavior element class. More...
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id, String subID, String prefix)
 Create behavior element class. 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 ECBehaviorVRHandLaserPointer getBehaviorIn (BehaviorElementClass eclass)
 Get behavior in element class or null if absent. More...
 

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 element behavior adding VR Hand Controller Laser Pointer support to actor.

Version
1.7

VR Hand Controllers often use a laser pointer type interaction.

This behavior adds a particle emitter representing the laser pointer. The behavior attaches itself to a ECBehaviorVRHandPointAt. The enable casting of the particle emitter is linked to the enabled state of ECBehaviorVRHandPointAt.

Named controllers can be used to set typically laserpointer parameters at runtime if the named controllers exist. The following named controllers are supported:

  • "length": Length of unobstructed beam in meters.
  • "intensity": Intensity of beam.
  • "red": Red color component of beam.
  • "green": Green color component of beam.
  • "blue": Blue color component of beam.

Additional named controllers can be added if required. The default particle emitter used is "/shareddata/particles/laserpointer/laserpointer.depemit". This particle emitter defines the controller ranges like this:

  • "length": Between 0m to 10m
  • "intensity": Between 0 to 1. The beam skin uses camera adapted intensity hence 1 represents full bright intensits compared to camera upper intensity
  • "red", "green", "blue": All betwen 0 to 1.

The default particle emitter is set to use custom collision response. This behavior implements the response to make the beam stop at the first hit obstacle. The collision filter from ECBehaviorVRHandPointAt is copied to the particle emitter to ensure the results are comparable.

The particle emitter is aligned with the test direction.

This behavior does not require persistable element class (setPersistable).

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.ECBehaviorVRHandLaserPointer.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ getBehaviorIn()

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

◆ getColor()

ECPColor Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getColor ( )

Color of beam.

◆ getControllerBlue()

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getControllerBlue ( )

Controller blue name.

◆ getControllerGreen()

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getControllerGreen ( )

Controller green name.

◆ getControllerIntensity()

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getControllerIntensity ( )

Controller intensity name.

◆ getControllerLength()

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getControllerLength ( )

Controller length name.

◆ getControllerRed()

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getControllerRed ( )

Controller red name.

◆ getIntensity()

ECPFloat Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getIntensity ( )

Intensity of beam.

◆ getLength()

ECPFloat Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getLength ( )

Length of beam in meters.

◆ getParticleEmitter()

ECBehaviorParticleEmitter Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getParticleEmitter ( )

Particle emitter behavior.

◆ getVRHandPointAt()

ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getVRHandPointAt ( )

VR Hand Point At behavior.

◆ instance()

Instance Dragengine.Scenery.ECBehaviorVRHandLaserPointer.instance ( BehaviorElement  element)

Get instance in element from owner element class.

◆ new() [1/4]

ECBehaviorVRHandLaserPointer Dragengine.Scenery.ECBehaviorVRHandLaserPointer.new ( BehaviorElementClass  eclass,
ECBehaviorVRHandPointAt  vrHandPointAt 
)

Create behavior element class.

◆ new() [2/4]

ECBehaviorVRHandLaserPointer Dragengine.Scenery.ECBehaviorVRHandLaserPointer.new ( BehaviorElementClass  eclass,
ECBehaviorVRHandPointAt  vrHandPointAt,
String  id 
)

Create behavior element class.

◆ new() [3/4]

ECBehaviorVRHandLaserPointer Dragengine.Scenery.ECBehaviorVRHandLaserPointer.new ( BehaviorElementClass  eclass,
ECBehaviorVRHandPointAt  vrHandPointAt,
String  id,
String  subID 
)

Create behavior element class.

◆ new() [4/4]

ECBehaviorVRHandLaserPointer Dragengine.Scenery.ECBehaviorVRHandLaserPointer.new ( BehaviorElementClass  eclass,
ECBehaviorVRHandPointAt  vrHandPointAt,
String  id,
String  subID,
String  prefix 
)

Create behavior element class.


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