Drag[en]gine Script Module DragonScript
1.23
|
Behavior element behavior adding camera support. More...
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... | |
LoadCamera | getLoadCamera () |
Camera loader or null. More... | |
ECPFloat | getLowestIntensity () |
Lowest intensity the eye can adapt to. More... | |
ECPString | getPathParameters () |
Path to camera parameters file (*.decamera) to use or null/empty string. 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... | |
void | setLoadCamera (LoadCamera loader) |
Set camera loader 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 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... | |
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:
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).
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.
void Dragengine.Scenery.ECBehaviorCamera.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getAdaptionTime | ( | ) |
Adaption time of the eye in seconds.
ECComposeAttachResource Dragengine.Scenery.ECBehaviorCamera.getAttach | ( | ) |
Attach resource.
|
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.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorCamera.getCollider | ( | ) |
Collider behavior or null to not attach.
ECPBoolean Dragengine.Scenery.ECBehaviorCamera.getEnableGI | ( | ) |
Enable global illumination (GI) if supported.
ECPBoolean Dragengine.Scenery.ECBehaviorCamera.getEnableHDRR | ( | ) |
Enable high definition range rendering (HDRR) if supported.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getExposure | ( | ) |
Exposure.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getFov | ( | ) |
Vertical field of view in degrees for the entire view.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getFovRatio | ( | ) |
Aspect ratio of the horizontal field of view to the vertical field of view.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getHighestIntensity | ( | ) |
Highest intensity the eye can adapt to.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getImageDistance | ( | ) |
Distance to the image plane.
LayerMask Dragengine.Scenery.ECBehaviorCamera.getLayerMask | ( | ) |
Layer mask.
LoadCamera Dragengine.Scenery.ECBehaviorCamera.getLoadCamera | ( | ) |
Camera loader or null.
By default set to BaseGameApp.getApp().getLoaders().getCamera() if BaseGameApp.getApp() is not null.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getLowestIntensity | ( | ) |
Lowest intensity the eye can adapt to.
ECPString Dragengine.Scenery.ECBehaviorCamera.getPathParameters | ( | ) |
Path to camera parameters file (*.decamera) to use or null/empty string.
If not null/empty path the settings override the manual settings. Requires camera loader to be set.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.getViewDistance | ( | ) |
Viewing distance up to which world geometry is rendered.
Instance Dragengine.Scenery.ECBehaviorCamera.instance | ( | BehaviorElement | element | ) |
Get instance in element from owner element class.
ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider | ||
) |
Create behavior element class.
These values are optional and can be null: collider.
ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | id | ||
) |
ECBehaviorCamera Dragengine.Scenery.ECBehaviorCamera.new | ( | BehaviorElementClass | eclass, |
ECBehaviorCollider | collider, | ||
String | id, | ||
String | prefix | ||
) |
void Dragengine.Scenery.ECBehaviorCamera.setLayerMask | ( | LayerMask | layerMask | ) |
Set layer mask.
void Dragengine.Scenery.ECBehaviorCamera.setLoadCamera | ( | LoadCamera | loader | ) |
Set camera loader or null.
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pAdaptionTime |
ECComposeAttachResource Dragengine.Scenery.ECBehaviorCamera.pAttach |
ECBehaviorCollider Dragengine.Scenery.ECBehaviorCamera.pCollider |
ECPBoolean Dragengine.Scenery.ECBehaviorCamera.pEnableGI |
ECPBoolean Dragengine.Scenery.ECBehaviorCamera.pEnableHDRR |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pExposure |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pFov |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pFovRatio |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pHighestIntensity |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pImageDistance |
LayerMask Dragengine.Scenery.ECBehaviorCamera.pLayerMask |
LoadCamera Dragengine.Scenery.ECBehaviorCamera.pLoadCamera |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pLowestIntensity |
ECPString Dragengine.Scenery.ECBehaviorCamera.pPathParameters |
ECPFloat Dragengine.Scenery.ECBehaviorCamera.pViewDistance |