Drag[en]gine Game Engine  1.0
deCamera Class Reference

World camera. More...

#include <deCamera.h>

Inheritance diagram for deCamera:
deResource deObject

Public Member Functions

Management
const decDVectorGetPosition () const
 
void SetPosition (const decDVector &position)
 
const decQuaternionGetOrientation () const
 
void SetOrientation (const decQuaternion &orientation)
 
float GetFov () const
 
void SetFov (float fov)
 
float GetFovRatio () const
 
void SetFovRatio (float ratio)
 
float GetImageDistance () const
 
void SetImageDistance (float distance)
 
float GetViewDistance () const
 
void SetViewDistance (float distance)
 
float GetExposure () const
 
void SetExposure (float exposure)
 
float GetLowestIntensity () const
 
void SetLowestIntensity (float lowestIntensity)
 
float GetHighestIntensity () const
 
void SetHighestIntensity (float highestIntensity)
 
float GetAdaptionTime () const
 
void SetAdaptionTime (float adaptionTime)
 
decLayerMaskGetLayerMask ()
 
const decLayerMaskGetLayerMask () const
 
void NotifyLayerMaskChanged ()
 
Effects
int GetEffectCount () const
 
deEffectGetEffectAt (int index) const
 
void AddEffect (deEffect *effect)
 
void RemoveEffect (deEffect *effect)
 
void RemoveAllEffects ()
 
System Peers
deBaseGraphicCameraGetGraphicCamera () const
 
void SetGraphicCamera (deBaseGraphicCamera *camera)
 
Linked List
deWorldGetParentWorld () const
 Parent world or NULL. More...
 
void SetParentWorld (deWorld *world)
 Set parent world or NULL. More...
 
deCameraGetLLWorldPrev () const
 Previous camera in the parent world linked list. More...
 
void SetLLWorldPrev (deCamera *camera)
 Set next camera in the parent world linked list. More...
 
deCameraGetLLWorldNext () const
 Next camera in the parent world linked list. More...
 
void SetLLWorldNext (deCamera *camera)
 Set next camera in the parent world linked list. More...
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deCamera (deCameraManager *manager)
 
 ~deCamera ()
 Clean up camera. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

World camera.

A world camera defines the camera parameters used for rendering a world. Cameras have various parameters useful to alter the way the world is rendered.

The exposure is used to increase or decrease the overall luminance of the rendered world. Typically this is used to simulate accomodation of eyes to different levels of light luminance.

In photography the exposure is chosen to not cause images to be overbright. In games though overbrighting is often used as a gameplay element to simulate per-pixel overbrighting while venturing into a room with glaring light while the eyes are still accomodated to night light conditions. Overbrighting can be done in two ways. For overbrighting affecting the entire screen like flashbangs for example using a post processing color matrix effect is the best way. For overbrighting on a per pixel basis the camera object exposes two parameters. The overbright lower parameter indicates the luminance of a pixel after applying the exposure where the overbrighting effect takes effect. The overbright upper parameter indicates the luminance where the overbright effect reaches full scale. Typically the pixel in question is pushed towards white inbetween the limits. The exact behavior is left to the graphcis module. If you specific control using post processing effects might be better.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deCamera()

deCamera::deCamera ( deCameraManager manager)

Creates a new camera object with the given resource manager.

◆ ~deCamera()

deCamera::~deCamera ( )
protected

Clean up camera.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ AddEffect()

void deCamera::AddEffect ( deEffect effect)

Adds an effect.

Referenced by GetLayerMask().

◆ GetAdaptionTime()

float deCamera::GetAdaptionTime ( ) const
inline

Retrieves the adaption time of the eye in seconds.

References SetAdaptionTime().

◆ GetEffectAt()

deEffect* deCamera::GetEffectAt ( int  index) const

Retrieves the effect at the given index.

Referenced by GetLayerMask().

◆ GetEffectCount()

int deCamera::GetEffectCount ( ) const

Retrieves the count of effects.

Referenced by GetLayerMask().

◆ GetExposure()

float deCamera::GetExposure ( ) const
inline

Retrieves the exposure.

References SetExposure().

◆ GetFov()

float deCamera::GetFov ( ) const
inline

Retrieves the vertical field of view in radians for the entire view.

References SetFov().

◆ GetFovRatio()

float deCamera::GetFovRatio ( ) const
inline

Retrieves the aspect ratio of the horizontal field of view to the vertical field of view.

References SetFovRatio().

◆ GetGraphicCamera()

deBaseGraphicCamera* deCamera::GetGraphicCamera ( ) const
inline

Retrieves the graphic system camera peer.

References SetGraphicCamera().

◆ GetHighestIntensity()

float deCamera::GetHighestIntensity ( ) const
inline

Retrieves the highest intensity the eye can adapt to.

References SetHighestIntensity().

◆ GetImageDistance()

float deCamera::GetImageDistance ( ) const
inline

Retrieves the distance to the image plane.

References SetImageDistance().

◆ GetLayerMask() [1/2]

decLayerMask& deCamera::GetLayerMask ( )
inline

Retrieves the layer mask. Call NotifyLayerMaskChanged afterwards.

◆ GetLayerMask() [2/2]

const decLayerMask& deCamera::GetLayerMask ( ) const
inline

◆ GetLLWorldNext()

deCamera* deCamera::GetLLWorldNext ( ) const
inline

Next camera in the parent world linked list.

References SetLLWorldNext().

◆ GetLLWorldPrev()

deCamera* deCamera::GetLLWorldPrev ( ) const
inline

Previous camera in the parent world linked list.

References SetLLWorldPrev().

◆ GetLowestIntensity()

float deCamera::GetLowestIntensity ( ) const
inline

Retrieves the lowest intensity the eye can adapt to.

References SetLowestIntensity().

◆ GetOrientation()

const decQuaternion& deCamera::GetOrientation ( ) const
inline

Retrieves the orientation.

References SetOrientation().

◆ GetParentWorld()

deWorld* deCamera::GetParentWorld ( ) const
inline

Parent world or NULL.

References SetParentWorld().

◆ GetPosition()

const decDVector& deCamera::GetPosition ( ) const
inline

Retrieves the position.

References SetPosition().

◆ GetViewDistance()

float deCamera::GetViewDistance ( ) const
inline

Retrieves the viewing distance up to which world geometry is rendered.

References SetViewDistance().

◆ NotifyLayerMaskChanged()

void deCamera::NotifyLayerMaskChanged ( )

Notifies the peers that the layer mask changed.

Referenced by GetLayerMask().

◆ RemoveAllEffects()

void deCamera::RemoveAllEffects ( )

Removes all effects.

Referenced by GetLayerMask().

◆ RemoveEffect()

void deCamera::RemoveEffect ( deEffect effect)

Removes an effect.

Referenced by GetLayerMask().

◆ SetAdaptionTime()

void deCamera::SetAdaptionTime ( float  adaptionTime)

Sets the adaption time of the eye in seconds.

Referenced by GetAdaptionTime().

◆ SetExposure()

void deCamera::SetExposure ( float  exposure)

Sets the exposure.

Referenced by GetExposure().

◆ SetFov()

void deCamera::SetFov ( float  fov)

Sets the vertical field of view in radians of the entire view.

Referenced by GetFov().

◆ SetFovRatio()

void deCamera::SetFovRatio ( float  ratio)

Sets the aspect ratio of the horizonral field of view to the vertical field of view.

Referenced by GetFovRatio().

◆ SetGraphicCamera()

void deCamera::SetGraphicCamera ( deBaseGraphicCamera camera)

Sets the graphic system camera peer.

Referenced by GetGraphicCamera().

◆ SetHighestIntensity()

void deCamera::SetHighestIntensity ( float  highestIntensity)

Sets the highest intensity the eye can adapt to.

Referenced by GetHighestIntensity().

◆ SetImageDistance()

void deCamera::SetImageDistance ( float  distance)

Sets the distance to the image plane.

Referenced by GetImageDistance().

◆ SetLLWorldNext()

void deCamera::SetLLWorldNext ( deCamera camera)

Set next camera in the parent world linked list.

Referenced by GetLLWorldNext().

◆ SetLLWorldPrev()

void deCamera::SetLLWorldPrev ( deCamera camera)

Set next camera in the parent world linked list.

Referenced by GetLLWorldPrev().

◆ SetLowestIntensity()

void deCamera::SetLowestIntensity ( float  lowestIntensity)

Sets the lowest intensity the eye can adapt to.

Referenced by GetLowestIntensity().

◆ SetOrientation()

void deCamera::SetOrientation ( const decQuaternion orientation)

Sets the orientation.

Referenced by GetOrientation().

◆ SetParentWorld()

void deCamera::SetParentWorld ( deWorld world)

Set parent world or NULL.

Referenced by GetParentWorld().

◆ SetPosition()

void deCamera::SetPosition ( const decDVector position)

Sets the position.

Referenced by GetPosition().

◆ SetViewDistance()

void deCamera::SetViewDistance ( float  distance)

Sets the view distance up to which world geometry is rendered.

Referenced by GetViewDistance().


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