World camera. More...
#include <deCamera.h>
Public Member Functions | |
Constructors and Destructors | |
| deCamera (deCameraManager *manager) | |
| Creates a new camera object with the given resource manager. | |
| ~deCamera () | |
| Cleans up the camera. | |
Management | |
| const decDVector & | GetPosition () const |
| Retrieves the position. | |
| void | SetPosition (const decDVector &position) |
| Sets the position. | |
| const decQuaternion & | GetOrientation () const |
| Retrieves the orientation. | |
| void | SetOrientation (const decQuaternion &orientation) |
| Sets the orientation. | |
| float | GetFov () const |
| Retrieves the vertical field of view in radians for the entire view. | |
| void | SetFov (float fov) |
| Sets the vertical field of view in radians of the entire view. | |
| float | GetFovRatio () const |
| Retrieves the aspect ratio of the horizontal field of view to the vertical field of view. | |
| void | SetFovRatio (float ratio) |
| Sets the aspect ratio of the horizonral field of view to the vertical field of view. | |
| float | GetImageDistance () const |
| Retrieves the distance to the image plane. | |
| void | SetImageDistance (float distance) |
| Sets the distance to the image plane. | |
| float | GetViewDistance () const |
| Retrieves the viewing distance up to which world geometry is rendered. | |
| void | SetViewDistance (float distance) |
| Sets the view distance up to which world geometry is rendered. | |
| float | GetExposure () const |
| Retrieves the exposure. | |
| void | SetExposure (float exposure) |
| Sets the exposure. | |
| float | GetLowestIntensity () const |
| Retrieves the lowest intensity the eye can adapt to. | |
| void | SetLowestIntensity (float lowestIntensity) |
| Sets the lowest intensity the eye can adapt to. | |
| float | GetHighestIntensity () const |
| Retrieves the highest intensity the eye can adapt to. | |
| void | SetHighestIntensity (float highestIntensity) |
| Sets the highest intensity the eye can adapt to. | |
| float | GetAdaptionTime () const |
| Retrieves the adaption time of the eye in seconds. | |
| void | SetAdaptionTime (float adaptionTime) |
| Sets the adaption time of the eye in seconds. | |
| deWorld * | GetParentWorld () const |
| Retrieves the parent world or NULL if not added to a world yet. | |
| void | SetParentWorld (deWorld *world) |
| Sets the parent world or NULL if not added to a world. | |
Effects | |
| int | GetEffectCount () const |
| Retrieves the count of effects. | |
| deEffect * | GetEffectAt (int index) const |
| Retrieves the effect at the given index. | |
| void | AddEffect (deEffect *effect) |
| Adds an effect. | |
| void | RemoveEffect (deEffect *effect) |
| Removes an effect. | |
| void | RemoveAllEffects () |
| Removes all effects. | |
Render Modifiers | |
| int | GetRenderModifierCount () const |
| Retrieves the number of render modifiers. | |
| void | SetRenderModifierCount (int count) |
| Sets the number of render modifiers. | |
| bool | GetRenderModifierEnabledAt (int index) const |
| Determines if the indexed render modifier is enabled. | |
| void | SetRenderModifierEnabledAt (int index, bool enabled) |
| Sets if the indexed render modifier is enabled. | |
System Peers | |
| deBaseGraphicCamera * | GetGraphicCamera () const |
| Retrieves the graphic system camera peer. | |
| void | SetGraphicCamera (deBaseGraphicCamera *camera) |
| Sets the graphic system camera peer. | |
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.
| deCamera::deCamera | ( | deCameraManager * | manager ) |
Creates a new camera object with the given resource manager.
| deCamera::~deCamera | ( | ) |
Cleans up the camera.
| void deCamera::AddEffect | ( | deEffect * | effect ) |
Adds an effect.
| float deCamera::GetAdaptionTime | ( | ) | const [inline] |
Retrieves the adaption time of the eye in seconds.
| deEffect* deCamera::GetEffectAt | ( | int | index ) | const |
Retrieves the effect at the given index.
| int deCamera::GetEffectCount | ( | ) | const |
Retrieves the count of effects.
| float deCamera::GetExposure | ( | ) | const [inline] |
Retrieves the exposure.
| float deCamera::GetFov | ( | ) | const [inline] |
Retrieves the vertical field of view in radians for the entire view.
| float deCamera::GetFovRatio | ( | ) | const [inline] |
Retrieves the aspect ratio of the horizontal field of view to the vertical field of view.
| deBaseGraphicCamera* deCamera::GetGraphicCamera | ( | ) | const [inline] |
Retrieves the graphic system camera peer.
| float deCamera::GetHighestIntensity | ( | ) | const [inline] |
Retrieves the highest intensity the eye can adapt to.
| float deCamera::GetImageDistance | ( | ) | const [inline] |
Retrieves the distance to the image plane.
| float deCamera::GetLowestIntensity | ( | ) | const [inline] |
Retrieves the lowest intensity the eye can adapt to.
| const decQuaternion& deCamera::GetOrientation | ( | ) | const [inline] |
Retrieves the orientation.
| deWorld* deCamera::GetParentWorld | ( | ) | const [inline] |
Retrieves the parent world or NULL if not added to a world yet.
| const decDVector& deCamera::GetPosition | ( | ) | const [inline] |
Retrieves the position.
| int deCamera::GetRenderModifierCount | ( | ) | const [inline] |
Retrieves the number of render modifiers.
| bool deCamera::GetRenderModifierEnabledAt | ( | int | index ) | const |
Determines if the indexed render modifier is enabled.
| float deCamera::GetViewDistance | ( | ) | const [inline] |
Retrieves the viewing distance up to which world geometry is rendered.
| void deCamera::RemoveAllEffects | ( | ) |
Removes all effects.
| void deCamera::RemoveEffect | ( | deEffect * | effect ) |
Removes an effect.
| void deCamera::SetAdaptionTime | ( | float | adaptionTime ) |
Sets the adaption time of the eye in seconds.
| void deCamera::SetExposure | ( | float | exposure ) |
Sets the exposure.
| void deCamera::SetFov | ( | float | fov ) |
Sets the vertical field of view in radians of the entire view.
| void deCamera::SetFovRatio | ( | float | ratio ) |
Sets the aspect ratio of the horizonral field of view to the vertical field of view.
| void deCamera::SetGraphicCamera | ( | deBaseGraphicCamera * | camera ) |
Sets the graphic system camera peer.
| void deCamera::SetHighestIntensity | ( | float | highestIntensity ) |
Sets the highest intensity the eye can adapt to.
| void deCamera::SetImageDistance | ( | float | distance ) |
Sets the distance to the image plane.
| void deCamera::SetLowestIntensity | ( | float | lowestIntensity ) |
Sets the lowest intensity the eye can adapt to.
| void deCamera::SetOrientation | ( | const decQuaternion & | orientation ) |
Sets the orientation.
| void deCamera::SetParentWorld | ( | deWorld * | world ) |
Sets the parent world or NULL if not added to a world.
| void deCamera::SetPosition | ( | const decDVector & | position ) |
Sets the position.
| void deCamera::SetRenderModifierCount | ( | int | count ) |
Sets the number of render modifiers.
| void deCamera::SetRenderModifierEnabledAt | ( | int | index, |
| bool | enabled | ||
| ) |
Sets if the indexed render modifier is enabled.
| void deCamera::SetViewDistance | ( | float | distance ) |
Sets the view distance up to which world geometry is rendered.
1.7.2