Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.ConversationSystem.ConversationCameraDirector Class Reference

Animate camera using camera definition. More...

Inheritance diagram for Dragengine.ConversationSystem.ConversationCameraDirector:
Dragengine.CameraDirectors.CameraDirector

Public Member Functions

void advanceCameraTime (float elapsed)
 Advance the camera time.
ConversationActor getCameraActor ()
 Actor to attach the camera to or null if not set.
ConversationCoordSystem getCameraCoordSystem ()
 Coordinate system to attach the camera to or null if not set.
ConversationCameraShot getCameraShot ()
 Camera shot to use or null if not set.
ConversationTarget getCameraTarget ()
 Camera target or null if not set.
DMatrix getCoordSys ()
 Coordinate system matrix.
float getDuration ()
 Duration of the camera shot.
float getElapsed ()
 Elapsed time.
DMatrix getLockedCameraMatrix ()
 Locked camera target matrix or null if not yet set.
DMatrix getLockedLookAtMatrix ()
 Locked look-at target matrix or null if not yet set.
ConversationActor getLookAtActor ()
 Actor to look at or null if not set.
ConversationCoordSystem getLookAtCoordSystem ()
 Coordinate system to look at or null if not set.
ConversationTarget getLookAtTarget ()
 Look-at target or null if not set.
bool getLooping ()
 Camera shot is looping.
ConversationCameraDirector new (Camera camera, Microphone microphone)
 Creates conversation camera director.
void readFromFile (ConversationPlayback playback, PersistencyEnvironment env, FileReader reader)
 Read from file.
void setCameraActor (ConversationActor actor)
 Set actor to attach the camera to or null if not set.
void setCameraCoordSystem (ConversationCoordSystem coordSystem)
 Set coordinate system to attach the camera to or null if not set.
void setCameraShot (ConversationCameraShot cameraShot)
 Set camera shot to use or null if not set.
void setCameraTarget (ConversationTarget target)
 Set camera target or null if not set.
void setCoordSys (DMatrix matrix)
 Set coordinate system matrix.
void setDuration (float duration)
 Set duration of the camera shot.
void setElapsed (float elapsed)
 Set elapsed time.
void setLockedCameraMatrix (DMatrix matrix)
 Set locked camera target matrix or null if not yet set.
void setLockedLookAtMatrix (DMatrix matrix)
 Set locked look-at target matrix or null if not yet set.
void setLookAtActor (ConversationActor actor)
 Set actor to look at or null if not set.
void setLookAtCoordSystem (ConversationCoordSystem coordSystem)
 Set coordinate system to look at or null if not set.
void setLookAtTarget (ConversationTarget target)
 Set look-at target or null if not set.
void setLooping (bool looping)
 Set if camera shot is looping.
void updateCamera (float elapsed)
 Update camera.
void updateConstant ()
 Update camera using the constant method.
void updateLinear ()
 Update camera using the linear method.
void updateUsing (DVector offsetCamera, DVector offsetLookAt, DVector cameraOrbit, DVector position, DVector rotation, float cameraDistance, float fov)
 Update camera using calculated parameters.
void updateUsingCalculated (DVector position, Quaternion orientation, float fov, DVector lookAt)
 Set camera position and orientation from calculated values.
void writeToFile (PersistencyEnvironment env, FileWriter writer)
 Write to file.
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.
CameraDirector new ()
 Create camera director.
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.
void updateMicrophone (float elapsed)
 Update microphone.

Protected Member Functions

bool getCameraShotChanged ()
 Camera shot changed.
void onCameraChanged ()
 Camera shot changed hook method.

Additional Inherited Members

Public Attributes inherited from Dragengine.CameraDirectors.CameraDirector
final float fovFirstPerson = 90
 Typical first person FOV.
final float fovLongTele = 6.87
 Long tele camera FOV.
final float fovMediumTele = 10.29
 Medium tele camera FOV.
final float fovNormal = 39.6
 Normal camera FOV.
final float fovShortFirstPerson = 75
 Shorter first person FOV.
final float fovShortTele = 22.62
 Short tele camera FOV.
final float fovUltraWide = 83.97
 Ultra wide camera FOV.
final float fovWide = 65.47
 Wide camera FOV.
float pAdaptionTime
float pBloomBlend
float pBloomIntensity
float pBloomSize
float pBloomStrength
Camera pCamera
bool pEnableAuralization
bool pEnableGI
bool pEnableHDRR
float pExposure
float pFov
float pFovRatio
float pHighestIntensity
float pImageDistance
LayerMask pLayerMask
float pLowestIntensity
Microphone pMicrophone
CurveBezier pToneMapCurve
float pViewDistance
float pWhiteIntensity

Detailed Description

Animate camera using camera definition.

The conversation playback is responsible to set camera definition to use as well as updating the camera director.

Member Function Documentation

◆ advanceCameraTime()

void Dragengine.ConversationSystem.ConversationCameraDirector.advanceCameraTime ( float elapsed)

Advance the camera time.

This call is different from update(float) as this one is used by the conversation playback to set the proper camera time. The update(float) call is called by the game state thus the timing would be disturbed.

References getCameraCoordSystem().

Referenced by writeToFile().

◆ getCameraActor()

ConversationActor Dragengine.ConversationSystem.ConversationCameraDirector.getCameraActor ( )

Actor to attach the camera to or null if not set.

Referenced by setLockedLookAtMatrix().

◆ getCameraCoordSystem()

ConversationCoordSystem Dragengine.ConversationSystem.ConversationCameraDirector.getCameraCoordSystem ( )

Coordinate system to attach the camera to or null if not set.

References setLooping().

Referenced by advanceCameraTime().

◆ getCameraShot()

ConversationCameraShot Dragengine.ConversationSystem.ConversationCameraDirector.getCameraShot ( )

Camera shot to use or null if not set.

Referenced by setElapsed().

◆ getCameraShotChanged()

bool Dragengine.ConversationSystem.ConversationCameraDirector.getCameraShotChanged ( )
protected

Camera shot changed.

Version
1.6

References getLookAtActor(), and setLookAtActor().

Referenced by writeToFile().

◆ getCameraTarget()

ConversationTarget Dragengine.ConversationSystem.ConversationCameraDirector.getCameraTarget ( )

Camera target or null if not set.

References getElapsed().

Referenced by getLookAtCoordSystem().

◆ getCoordSys()

DMatrix Dragengine.ConversationSystem.ConversationCameraDirector.getCoordSys ( )

Coordinate system matrix.

References setCameraTarget().

Referenced by updateUsing().

◆ getDuration()

float Dragengine.ConversationSystem.ConversationCameraDirector.getDuration ( )

Duration of the camera shot.

Referenced by setLookAtTarget().

◆ getElapsed()

float Dragengine.ConversationSystem.ConversationCameraDirector.getElapsed ( )

Elapsed time.

Referenced by getCameraTarget().

◆ getLockedCameraMatrix()

DMatrix Dragengine.ConversationSystem.ConversationCameraDirector.getLockedCameraMatrix ( )

Locked camera target matrix or null if not yet set.

Referenced by updateUsingCalculated().

◆ getLockedLookAtMatrix()

DMatrix Dragengine.ConversationSystem.ConversationCameraDirector.getLockedLookAtMatrix ( )

Locked look-at target matrix or null if not yet set.

Referenced by updateCamera().

◆ getLookAtActor()

ConversationActor Dragengine.ConversationSystem.ConversationCameraDirector.getLookAtActor ( )

Actor to look at or null if not set.

Referenced by getCameraShotChanged().

◆ getLookAtCoordSystem()

ConversationCoordSystem Dragengine.ConversationSystem.ConversationCameraDirector.getLookAtCoordSystem ( )

Coordinate system to look at or null if not set.

References getCameraTarget().

Referenced by updateUsing().

◆ getLookAtTarget()

ConversationTarget Dragengine.ConversationSystem.ConversationCameraDirector.getLookAtTarget ( )

Look-at target or null if not set.

References setElapsed().

Referenced by setCoordSys().

◆ getLooping()

bool Dragengine.ConversationSystem.ConversationCameraDirector.getLooping ( )

Camera shot is looping.

Referenced by setLookAtActor().

◆ new()

◆ onCameraChanged()

void Dragengine.ConversationSystem.ConversationCameraDirector.onCameraChanged ( )
protected

Camera shot changed hook method.

Version
1.6

Called once by updateCamera() after camera shot changed.

References setLockedLookAtMatrix().

Referenced by writeToFile().

◆ readFromFile()

void Dragengine.ConversationSystem.ConversationCameraDirector.readFromFile ( ConversationPlayback playback,
PersistencyEnvironment env,
FileReader reader )

Read from file.

Referenced by writeToFile().

◆ setCameraActor()

void Dragengine.ConversationSystem.ConversationCameraDirector.setCameraActor ( ConversationActor actor)

Set actor to attach the camera to or null if not set.

References setDuration().

Referenced by setLockedLookAtMatrix().

◆ setCameraCoordSystem()

void Dragengine.ConversationSystem.ConversationCameraDirector.setCameraCoordSystem ( ConversationCoordSystem coordSystem)

Set coordinate system to attach the camera to or null if not set.

Referenced by updateLinear().

◆ setCameraShot()

void Dragengine.ConversationSystem.ConversationCameraDirector.setCameraShot ( ConversationCameraShot cameraShot)

Set camera shot to use or null if not set.

References new().

Referenced by setDuration().

◆ setCameraTarget()

void Dragengine.ConversationSystem.ConversationCameraDirector.setCameraTarget ( ConversationTarget target)

Set camera target or null if not set.

Referenced by getCoordSys().

◆ setCoordSys()

void Dragengine.ConversationSystem.ConversationCameraDirector.setCoordSys ( DMatrix matrix)

Set coordinate system matrix.

References getLookAtTarget().

Referenced by updateUsingCalculated().

◆ setDuration()

void Dragengine.ConversationSystem.ConversationCameraDirector.setDuration ( float duration)

Set duration of the camera shot.

References setCameraShot().

Referenced by setCameraActor().

◆ setElapsed()

void Dragengine.ConversationSystem.ConversationCameraDirector.setElapsed ( float elapsed)

Set elapsed time.

References getCameraShot().

Referenced by getLookAtTarget().

◆ setLockedCameraMatrix()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLockedCameraMatrix ( DMatrix matrix)

Set locked camera target matrix or null if not yet set.

References setLookAtTarget().

Referenced by updateUsingCalculated().

◆ setLockedLookAtMatrix()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLockedLookAtMatrix ( DMatrix matrix)

Set locked look-at target matrix or null if not yet set.

References getCameraActor(), and setCameraActor().

Referenced by onCameraChanged().

◆ setLookAtActor()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLookAtActor ( ConversationActor actor)

Set actor to look at or null if not set.

References getLooping().

Referenced by getCameraShotChanged().

◆ setLookAtCoordSystem()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLookAtCoordSystem ( ConversationCoordSystem coordSystem)

Set coordinate system to look at or null if not set.

Referenced by updateUsing().

◆ setLookAtTarget()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLookAtTarget ( ConversationTarget target)

Set look-at target or null if not set.

References getDuration().

Referenced by setLockedCameraMatrix().

◆ setLooping()

void Dragengine.ConversationSystem.ConversationCameraDirector.setLooping ( bool looping)

Set if camera shot is looping.

Referenced by getCameraCoordSystem().

◆ updateCamera()

void Dragengine.ConversationSystem.ConversationCameraDirector.updateCamera ( float elapsed)

Update camera.

Updates camera using super.updateCamera() or updateLinear() if a camera shot is set.

Version 1.6 and later

If camera shot changed calls resetAdaptedIntensity() on camera. This ensures camera is fully adapted to the lighting conditions. This is required if the camera switches between locations of drastically different lighting conditions.

If camera shot changed calls onCameraChanged().

Reimplemented from Dragengine.CameraDirectors.CameraDirector.

References getLockedLookAtMatrix().

Referenced by writeToFile().

◆ updateConstant()

void Dragengine.ConversationSystem.ConversationCameraDirector.updateConstant ( )

Update camera using the constant method.

Referenced by writeToFile().

◆ updateLinear()

void Dragengine.ConversationSystem.ConversationCameraDirector.updateLinear ( )

Update camera using the linear method.

References setCameraCoordSystem().

Referenced by writeToFile().

◆ updateUsing()

void Dragengine.ConversationSystem.ConversationCameraDirector.updateUsing ( DVector offsetCamera,
DVector offsetLookAt,
DVector cameraOrbit,
DVector position,
DVector rotation,
float cameraDistance,
float fov )

Update camera using calculated parameters.

References getCoordSys(), getLookAtCoordSystem(), and setLookAtCoordSystem().

Referenced by writeToFile().

◆ updateUsingCalculated()

void Dragengine.ConversationSystem.ConversationCameraDirector.updateUsingCalculated ( DVector position,
Quaternion orientation,
float fov,
DVector lookAt )

Set camera position and orientation from calculated values.

Allows subclasses to modify the calculated values before updating the camera position and orientation.

The default implementation sets the values the to the camera without further processing.

Parameters
positionCamera position after calculation.
orientationCamera orientation after calculation.
fovCamera field of view after calculation.
lookAtCamera look-at position after calculation.

References getLockedCameraMatrix(), new(), setCoordSys(), and setLockedCameraMatrix().

Referenced by writeToFile().

◆ writeToFile()


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