Drag[en]gine Script Module DragonScript 1.32.1
Loading...
Searching...
No Matches
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  Factory
 Behavior factory. More...
 
class  Instance
 Behavior instance. More...
 

Public Member Functions

void dispose ()
 Dispose of behavior.
 
ECComposeBTSM getBTSMs ()
 Compose behavior trees and state machines.
 
ECPColor getColor ()
 Color of beam.
 
ECPString getControllerBlue ()
 Controller blue name.
 
ECPString getControllerGreen ()
 Controller green name.
 
ECPString getControllerIntensity ()
 Controller intensity name.
 
ECPString getControllerLength ()
 Controller length name.
 
ECPString getControllerRed ()
 Controller red name.
 
ECPFloat getIntensity ()
 Intensity of beam.
 
ECPFloat getLength ()
 Length of beam in meters.
 
ECBehaviorParticleEmitter getParticleEmitter ()
 Particle emitter behavior.
 
String getPrefix ()
 Prefix.
 
ECBehaviorVRHandPointAt getVRHandPointAt ()
 VR Hand Point At behavior.
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class.
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt)
 Create behavior element class.
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id)
 Create behavior element class.
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id, String subID)
 Create behavior element class.
 
ECBehaviorVRHandLaserPointer new (BehaviorElementClass eclass, ECBehaviorVRHandPointAt vrHandPointAt, String id, String subID, String prefix)
 Create behavior element class.
 
- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void assignInstanceIndex (int instanceIndex)
 Assign instance index.
 
String getBehaviorID ()
 Unique identifier of behavior.
 
String getID ()
 Identifier.
 
int getInstanceIndex ()
 Instance index.
 
void loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance)
 Load instance data of another behavior.
 
bool supportsBehaviorID (String identifier)
 Behavior supports loading instance data of another behavior.
 
- Public Member Functions inherited from Dragengine.Scenery.ECBehavior
ECBehaviorInstance createInstance (BehaviorElement element)
 Create Behavior instance.
 

Static Public Member Functions

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

Public Attributes

ECComposeBTSM pBTSMs
 
ECPColor pColor
 
ECPString pControllerBlue
 
ECPString pControllerGreen
 
ECPString pControllerIntensity
 
ECPString pControllerLength
 
ECPString pControllerRed
 
ECPFloat pIntensity
 
ECPFloat pLength
 
ECBehaviorParticleEmitter pParticleEmitter
 
String pPrefix
 
ECBehaviorVRHandPointAt pVRHandPointAt
 

Additional Inherited Members

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

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

See also
https://developer.dragondreams.ch/wiki/doku.php/dragengine:modules:dragonscript:behavior_vrhandlaserpointer

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.

◆ getBTSMs()

ECComposeBTSM Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getBTSMs ( )

Compose behavior trees and state machines.

Version
1.26

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

◆ getPrefix()

String Dragengine.Scenery.ECBehaviorVRHandLaserPointer.getPrefix ( )

Prefix.

Version
1.26

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

Member Data Documentation

◆ pBTSMs

ECComposeBTSM Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pBTSMs

◆ pColor

ECPColor Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pColor

◆ pControllerBlue

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pControllerBlue

◆ pControllerGreen

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pControllerGreen

◆ pControllerIntensity

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pControllerIntensity

◆ pControllerLength

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pControllerLength

◆ pControllerRed

ECPString Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pControllerRed

◆ pIntensity

ECPFloat Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pIntensity

◆ pLength

ECPFloat Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pLength

◆ pParticleEmitter

ECBehaviorParticleEmitter Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pParticleEmitter

◆ pPrefix

String Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pPrefix

◆ pVRHandPointAt

ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandLaserPointer.pVRHandPointAt

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