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

Behavior element behavior adding camera support. More...

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

Classes

class  Instance
 Behavior instance. More...
 

Public Member Functions

void dispose ()
 Dispose of behavior. More...
 
ECPFloat getAdaptionTime ()
 Adaption time of the eye in seconds. More...
 
ECComposeAttachResource getAttach ()
 Attach resource. More...
 
ECBehaviorCollider getCollider ()
 Collider behavior or null to not attach. More...
 
ECPBoolean getEnableGI ()
 Enable global illumination (GI) if supported. More...
 
ECPBoolean getEnableHDRR ()
 Enable high definition range rendering (HDRR) if supported. More...
 
ECPFloat getExposure ()
 Exposure. More...
 
ECPFloat getFov ()
 Vertical field of view in degrees for the entire view. More...
 
ECPFloat getFovRatio ()
 Aspect ratio of the horizontal field of view to the vertical field of view. More...
 
ECPFloat getHighestIntensity ()
 Highest intensity the eye can adapt to. More...
 
ECPFloat getImageDistance ()
 Distance to the image plane. More...
 
LayerMask getLayerMask ()
 Layer mask. More...
 
ECPFloat getLowestIntensity ()
 Lowest intensity the eye can adapt to. More...
 
ECPFloat getViewDistance ()
 Viewing distance up to which world geometry is rendered. More...
 
Instance instance (BehaviorElement element)
 Get instance in element from owner element class. More...
 
ECBehaviorCamera new (BehaviorElementClass eclass, ECBehaviorCollider collider)
 Create behavior element class. More...
 
ECBehaviorCamera new (BehaviorElementClass eclass, ECBehaviorCollider collider, String id)
 
ECBehaviorCamera new (BehaviorElementClass eclass, ECBehaviorCollider collider, String id, String prefix)
 
void setLayerMask (LayerMask layerMask)
 Set layer mask. 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 ECBehaviorCamera 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 camera support.

Behavior adds a Camera resource to the the behavior element. This behavior can be added multiple times to an element. Each instance creates one camera attached to the element collider which can be individually modified. To distinguish the cameras each instance has an identifier which can be used to retrieve a specific instance. Hence to use more than one camera use code like this in your subclass constructor:

class MyElement extends BehaviorElementClass
public func new()
ECBehaviorCamera.new(this)
ECBehaviorCamera.new(this, "subCamera")
end
end
ECBehaviorCamera new(BehaviorElementClass eclass, ECBehaviorCollider collider)
Create behavior element class.

You can now define the parameters to use for both cameras using for example the properties "camera.fov" for the first camera and "camera(subCamera).fov" for the second camera.

It is recommended to always specify an identifier even if only one camera is used. This avoids potentially name conflicts especially if other behaviors are added attaching other resources too.

If the ECBehaviorCollider behavior is present in the behavior element before this behavior is added the camera is attached. The camera is attached to the named bone if defined otherwise it is attached statically.

Element class properties have the prefix "camera{(id)}.".

This behavior does require the element class to be persistable (setPersistable).

Effects

Cameras can be equipped with effects modifying the rendering. Effects can be added to ECBehaviorCamera by adding after the camera behavior one or more camera effect behaviors.

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.ECBehaviorCamera.dispose ( )

Dispose of behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ getAdaptionTime()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getAdaptionTime ( )

Adaption time of the eye in seconds.

◆ getAttach()

ECComposeAttachResource Dragengine.Scenery.ECBehaviorCamera.getAttach ( )

Attach resource.

◆ getBehaviorIn()

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

◆ getCollider()

ECBehaviorCollider Dragengine.Scenery.ECBehaviorCamera.getCollider ( )

Collider behavior or null to not attach.

◆ getEnableGI()

ECPBoolean Dragengine.Scenery.ECBehaviorCamera.getEnableGI ( )

Enable global illumination (GI) if supported.

◆ getEnableHDRR()

ECPBoolean Dragengine.Scenery.ECBehaviorCamera.getEnableHDRR ( )

Enable high definition range rendering (HDRR) if supported.

◆ getExposure()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getExposure ( )

Exposure.

◆ getFov()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getFov ( )

Vertical field of view in degrees for the entire view.

◆ getFovRatio()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getFovRatio ( )

Aspect ratio of the horizontal field of view to the vertical field of view.

◆ getHighestIntensity()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getHighestIntensity ( )

Highest intensity the eye can adapt to.

◆ getImageDistance()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getImageDistance ( )

Distance to the image plane.

◆ getLayerMask()

LayerMask Dragengine.Scenery.ECBehaviorCamera.getLayerMask ( )

Layer mask.

◆ getLowestIntensity()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getLowestIntensity ( )

Lowest intensity the eye can adapt to.

◆ getViewDistance()

ECPFloat Dragengine.Scenery.ECBehaviorCamera.getViewDistance ( )

Viewing distance up to which world geometry is rendered.

◆ instance()

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

Get instance in element from owner element class.

◆ new() [1/3]

ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider 
)

Create behavior element class.

These values are optional and can be null: collider.

◆ new() [2/3]

ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
String  id 
)

◆ new() [3/3]

ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new ( BehaviorElementClass  eclass,
ECBehaviorCollider  collider,
String  id,
String  prefix 
)

◆ setLayerMask()

void Dragengine.Scenery.ECBehaviorCamera.setLayerMask ( LayerMask  layerMask)

Set layer mask.


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