|
Drag[en]gine Script Module DragonScript 1.35
|
Place camera relative player controlled actor with orbit support. More...
Classes | |
| class | ActorChanged |
| Tracker listener. More... | |
Public Member Functions | |
| ECBehaviorPlayerControllable.Instance | getActor () |
| Actor or null. | |
| ECBehaviorColliderAI.Instance | getColliderAI () |
| Collider AI or null if absent. | |
| bool | getLockAzimuth () |
| Do not update azimuth from locomotion changes. | |
| bool | getLockElevation () |
| Do not update elevation from locomotion changes. | |
| ECBehaviorLocomotion.Instance | getLocomotion () |
| Locomotion or null if absent. | |
| ECBehaviorPlayerControllable.Tracker | getTracker () |
| Tracker or null. | |
| PlayerControlledActorCameraDirector | new () |
| Create camera director. | |
| PlayerControlledActorCameraDirector | new (Camera camera, Microphone microphone) |
| Create camera director. | |
| PlayerControlledActorCameraDirector | new (Camera camera, Microphone microphone, ECBehaviorPlayerControllable.Tracker tracker) |
| Create camera director. | |
| void | setActor (ECBehaviorPlayerControllable.Instance actor) |
| Set actor or null. | |
| void | setLockAzimuth (bool lock) |
| Set to not update azimuth from locomotion changes. | |
| void | setLockElevation (bool lock) |
| Set to not update elevation from locomotion changes. | |
| void | setPivotAboveGround (float distance) |
| Set pivot point at desired distance above ground. | |
| void | setTracker (ECBehaviorPlayerControllable.Tracker tracker) |
| Set tracker or null. | |
| void | updateCamera (float elapsed) |
| Update camera. | |
| void | updateMicrophone (float elapsed) |
| Update microphone. | |
| Public Member Functions inherited from Dragengine.CameraDirectors.ElementCameraDirector | |
| float | getAzimuth () |
| Vertical rotation. | |
| String | getBone () |
| Bone name. | |
| DMatrix | getCameraMatrix () |
| Camera matrix. | |
| ECBehaviorComponent.Instance | getComponentBehavior () |
| Component behavior or null. | |
| float | getDistance () |
| Distance. | |
| Element | getElement () |
| Element. | |
| float | getElevation () |
| Horizontal rotation. | |
| DMatrix | getLocalMatrix () |
| Local matrix. | |
| DVector | getPivot () |
| Rotation point. | |
| bool | getUseOrientation () |
| Use element orientation. | |
| ElementCameraDirector | new (Element element) |
| Create camera director. | |
| ElementCameraDirector | new (Element element, Camera camera, Microphone microphone) |
| Create camera director. | |
| void | setAzimuth (float azimuth) |
| Set vertical rotation. | |
| void | setBone (String bone) |
| Set bone name. | |
| void | setDistance (float distance) |
| Set distance. | |
| void | setElement (Element element) |
| Set element. | |
| void | setElevation (float elevation) |
| Set horizontal rotation. | |
| void | setLocalMatrix (DMatrix localMatrix) |
| Set local matrix. | |
| void | setLocalMatrix (Vector position, Vector rotation) |
| Set local matrix from position and rotation. | |
| void | setPivot (DVector pivot) |
| Set rotation point. | |
| void | setUseOrientation (bool useOrientation) |
| Set use element orientation. | |
| Public Member Functions inherited from Dragengine.CameraDirectors.CameraDirector | |
| void | activate () |
| Director has been activated. | |
| void | applyParameters (Camera camera) |
| Apply parameters to camera. | |
| void | applyParameters (Microphone microphone) |
| Apply parameters to microphone. | |
| void | copyParameters (Camera camera) |
| Copy parameters from camera. | |
| void | copyParameters (CameraDirector director) |
| Copy parameters from camera director. | |
| void | copyParameters (Microphone microphone) |
| Copy parameters from microphone. | |
| void | deactivate () |
| Director has been deactivated. | |
| float | getAdaptionTime () |
| Adaption time. | |
| float | getBloomBlend () |
| Bloom blend as multiplier of intensity beyond bloom intensity. | |
| float | getBloomIntensity () |
| Bloom intensity multiplier. | |
| float | getBloomSize () |
| Bloom size as percentage of screen width. | |
| float | getBloomStrength () |
| Bloom strength as multiplier of intensity beyond bloom intensity. | |
| Camera | getCamera () |
| Camera to modify. | |
| bool | getEnableAuralization () |
| Enable auralization if supported. | |
| bool | getEnableGI () |
| Enable global illumination (GI) if supported. | |
| bool | getEnableHDRR () |
| Enable high definition range rendering (HDRR) if supported. | |
| float | getExposure () |
| Exposure. | |
| float | getFov () |
| Field of view. | |
| float | getFovRatio () |
| Field of view ratio (height / width). | |
| float | getHighestIntensity () |
| Highest intensity. | |
| float | getImageDistance () |
| Camera image distance. | |
| LayerMask | getLayerMask () |
| Layer mask or null if not set. | |
| float | getLowestIntensity () |
| Lowest intensity. | |
| Microphone | getMicrophone () |
| Microphone to modify. | |
| CurveBezier | getToneMapCurve () |
| Custom tone mapping curve or empty curve to disable. | |
| float | getViewDistance () |
| Camera view distance. | |
| float | getWhiteIntensity () |
| White intensity multiplier. | |
| void | initCameraParameters () |
| Init camera parameters. | |
| void | initMicrophoneParameters () |
| Init microphone parameters. | |
| void | resetCameraAdaptedIntensity () |
| Request graphic module to reset camera adapted intensity to optimal value. | |
| void | setAdaptionTime (float time) |
| Set adaption time. | |
| void | setBloomBlend (float blend) |
| Set bloom blend as multiplier of intensity beyond bloom intensity. | |
| void | setBloomIntensity (float intensity) |
| Set bloom intensity multiplier. | |
| void | setBloomSize (float size) |
| Bloom size as percentage of screen width. | |
| void | setBloomStrength (float strength) |
| Set bloom strength as multiplier of intensity beyond bloom intensity. | |
| void | setCamera (Camera camera) |
| Set camera to modify. | |
| void | setEnableAuralization (bool enable) |
| Set to enable auralization if supported. | |
| void | setEnableGI (bool enable) |
| Set to enable global illumination (GI) if supported. | |
| void | setEnableHDRR (bool enable) |
| Set to enable high definition range rendering (HDRR) if supported. | |
| void | setExposure (float exposure) |
| Set exposure. | |
| void | setFov (float fov) |
| Set field of view. | |
| void | setFovRatio (float ratio) |
| Set field of view ratio (height / width). | |
| void | setHighestIntensity (float intensity) |
| Set highest intensity. | |
| void | setImageDistance (float distance) |
| Set camera image distance. | |
| void | setLayerMask (LayerMask layerMask) |
| Set layer mask or null if not set. | |
| void | setLowestIntensity (float intensity) |
| Set lowest intensity. | |
| void | setMicrophone (Microphone microphone) |
| Set microphone to modify. | |
| void | setToneMapCurve (CurveBezier curve) |
| Set custom tone mapping curve or empty curve to disable. | |
| void | setViewDistance (float distance) |
| Set camera view distance. | |
| void | setWhiteIntensity (float intensity) |
| Set white intensity multiplier. | |
| void | update (float elapsed) |
| Update director. | |
Protected Member Functions | |
| void | actorChanged () |
| Player controlled actor changed. | |
| void | initBehaviors (BehaviorElement element) |
| Init behaviors. | |
Protected Attributes | |
| ECBehaviorColliderAI.Instance | colliderAI |
| Collider AI or null if absent. | |
| ECBehaviorLocomotion.Instance | locomotion |
| Locomotion or null if absent. | |
| Protected Attributes inherited from Dragengine.CameraDirectors.ElementCameraDirector | |
| ECBehaviorComponent.Instance | componentBehavior |
| Component behavior or null. | |
Place camera relative player controlled actor with orbit support.
Extends ElementCameraDirector with support to set the tracked element from the player controlled actor set in BaseGameApp at every update call. Using this class the game can switch player control from one actor to another without needing to update the camera directory unless different actors require different parameters.
For convenience the actorChanged() hook method is called whenever the actor switched.
The pivot point is set at the center of the actor head. For best results this should be straight above the actor position. The setPivotAboveGround() takes care of The actor locomotion is used to obtain the actor looking direction. The camera director azimuth and elevation are set to match the looking direction. The distance is not changed and can be set by users of the class to place the camera behind the actor for example for 3rd person views.
Updating azimuth and elevation from locomotion can be optionally disabled. This is useful for third person cameras with locked elevation or azimuth.
|
protected |
Player controlled actor changed.
Called after the new actor has been assigned to the camera directory. Hook method for subclass to apply additional logic for actor switching.
Reimplemented in Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.
References actorChanged(), colliderAI, getLockAzimuth(), getLockElevation(), getLocomotion(), Dragengine.CameraDirectors.CameraDirector.getMicrophone(), locomotion, pLockAzimuth, Dragengine.CameraDirectors.ElementCameraDirector.setAzimuth(), Dragengine.CameraDirectors.ElementCameraDirector.setElevation(), setLockAzimuth(), setLockElevation(), Dragengine.CameraDirectors.ElementCameraDirector.setPivot(), setPivotAboveGround(), updateCamera(), and updateMicrophone().
Referenced by actorChanged(), and setLockAzimuth().
| ECBehaviorPlayerControllable.Instance Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getActor | ( | ) |
Actor or null.
References new().
Referenced by Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.getCameraMatrix(), and updateCamera().
| ECBehaviorColliderAI.Instance Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getColliderAI | ( | ) |
Collider AI or null if absent.
References getTracker(), and pTracker.
Referenced by setLockElevation().
| bool Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getLockAzimuth | ( | ) |
Do not update azimuth from locomotion changes.
References colliderAI, initBehaviors(), locomotion, and Dragengine.CameraDirectors.ElementCameraDirector.setElement().
Referenced by actorChanged().
| bool Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getLockElevation | ( | ) |
Do not update elevation from locomotion changes.
References colliderAI, initBehaviors(), and locomotion.
Referenced by actorChanged().
| ECBehaviorLocomotion.Instance Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getLocomotion | ( | ) |
Locomotion or null if absent.
References pTracker, and setTracker().
Referenced by actorChanged(), and setLockElevation().
| ECBehaviorPlayerControllable.Tracker Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.getTracker | ( | ) |
Tracker or null.
Referenced by getColliderAI().
|
protected |
Init behaviors.
Referenced by getLockAzimuth(), and getLockElevation().
| PlayerControlledActorCameraDirector Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.new | ( | ) |
Create camera director.
Pivot point is set to 1.6m above ground.
Reimplemented from Dragengine.CameraDirectors.CameraDirector.
Reimplemented in Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.
References locomotion.
Referenced by getActor(), new(), new(), and setActor().
| PlayerControlledActorCameraDirector Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.new | ( | Camera | camera, |
| Microphone | microphone ) |
Create camera director.
Pivot point is set to 1.6m above ground.
Reimplemented from Dragengine.CameraDirectors.CameraDirector.
Reimplemented in Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.
References new().
| PlayerControlledActorCameraDirector Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.new | ( | Camera | camera, |
| Microphone | microphone, | ||
| ECBehaviorPlayerControllable.Tracker | tracker ) |
Create camera director.
Pivot point is set to 1.6m above ground.
Reimplemented in Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.
References new().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.setActor | ( | ECBehaviorPlayerControllable.Instance | actor | ) |
Set actor or null.
References new(), pActorChanged, setPivotAboveGround(), and setTracker().
Referenced by setPivotAboveGround(), and updateMicrophone().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.setLockAzimuth | ( | bool | lock | ) |
Set to not update azimuth from locomotion changes.
References actorChanged().
Referenced by actorChanged().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.setLockElevation | ( | bool | lock | ) |
Set to not update elevation from locomotion changes.
References colliderAI, getColliderAI(), getLocomotion(), and locomotion.
Referenced by actorChanged().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.setPivotAboveGround | ( | float | distance | ) |
Set pivot point at desired distance above ground.
Typical value for distance is 1.6 for a adult human actor.
References pTracker, and setActor().
Referenced by actorChanged(), and setActor().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.setTracker | ( | ECBehaviorPlayerControllable.Tracker | tracker | ) |
Set tracker or null.
Referenced by getLocomotion(), and setActor().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.updateCamera | ( | float | elapsed | ) |
Update camera.
Set camera director azimuth and elevation to match actor locomotion. Azimuth is set to locomotion.getOrientation() plus locomotion.getLookHorizontal(). Elevation is set to locomotion.getLookVertical(). This equals to actor orientation around his up-axis combined with actor looking around.
If azimuth or elevation are locked the respective value is not changed at all. If locomotion is present its orientation and looking direction are used. Otherwise the azimuth and elevation are set to 0
Reimplemented from Dragengine.CameraDirectors.ElementCameraDirector.
Reimplemented in Dragengine.CameraDirectors.VRPlayerControlledActorCameraDirector.
References getActor(), and pTracker.
Referenced by actorChanged().
| void Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.updateMicrophone | ( | float | elapsed | ) |
Update microphone.
Extends the base functionality setting velocity to match actor velocity.
Reimplemented from Dragengine.CameraDirectors.CameraDirector.
References setActor(), and Dragengine.CameraDirectors.ElementCameraDirector.setElement().
Referenced by actorChanged().
|
protected |
Collider AI or null if absent.
Referenced by actorChanged(), getLockAzimuth(), getLockElevation(), and setLockElevation().
|
protected |
Locomotion or null if absent.
Referenced by actorChanged(), getLockAzimuth(), getLockElevation(), new(), and setLockElevation().
| ActorChanged Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.pActorChanged |
Referenced by setActor().
| bool Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.pLockAzimuth |
Referenced by actorChanged().
| ECBehaviorPlayerControllable.Tracker Dragengine.CameraDirectors.PlayerControlledActorCameraDirector.pTracker |
Referenced by getColliderAI(), getLocomotion(), setPivotAboveGround(), and updateCamera().