This interface is used to retreive and control the camera parameters.
More...
List of all members.
Public Member Functions |
virtual | ~VgICamera () |
| Destructor.
|
virtual void | setPosition (const VgEngine::VgPosition &pPosition)=0 |
| Sets the camera's position.
|
virtual void | setHeading (double pHeadingInDegrees)=0 |
| Sets the camera's heading (0 for north, increasing value start to east).
|
virtual void | setPitch (double pPitchInDegrees)=0 |
| Sets the camera's pitch.
|
virtual const VgEngine::VgPosition | getPosition () const =0 |
| Retrieves the current camera's position.
|
virtual double | getHeading () const =0 |
| Retrieves the current camera's heading (in degrees).
|
virtual double | getPitch () const =0 |
| Retrieves the current camera's pitch (in degrees).
|
virtual void | setViewpoint (const VgIViewPoint &pViewpoint)=0 |
| Sets the camera viewpoint.
|
virtual const VgIViewPoint & | getViewpoint ()=0 |
| Gets the camera viewpoint.
|
virtual void | projectOnScreen (const VgEngine::VgPosition &pPosition, double &pXScreen, double &pYScreen, double *pZScreen=NULL) const =0 |
| Projects a position on the screen.
|
virtual bool | pickGeographicPoint (const double &pX, const double &pY, VgEngine::VgPosition &pPosition) const =0 |
| Casts a ray from a point on the screen in the 3D scene.
|
virtual VgIViewPoint | getViewpointFromPositions (const std::vector< VgEngine::VgPosition > &pPositions, UInt pTop, UInt pBottom, UInt pLeft, UInt pRight, double pPitch, double pHeading)=0 |
| Computes a viewpoint using the current pitch and heading, at which all given positions are visible.
|
virtual VgIViewPoint | getViewpointFromPositions (const std::vector< VgEngine::VgPosition > &pPositions, UInt pTop, UInt pBottom, UInt pLeft, UInt pRight)=0 |
| Computes a viewpoint using the current pitch and heading, at which all given positions are visible.
|
virtual double | getFovX () const =0 |
| Gets the camera's horizontal field of view.
|
virtual double | getFovY () const =0 |
| Gets the camera's vertical field of view.
|
virtual void | setFovX (double pFovX, double pRatio=-1.0f)=0 |
| Sets the camera's field of view.
|
Protected Member Functions |
| VgICamera () |
| Constructor.
|
Detailed Description
This interface is used to retreive and control the camera parameters.
Those parameters are the camera's position, heading and pitch. The position is expressed in "scene" coordinates (See VgICamera::getPosition and VgICamera::setPosition for more information). The heading is the angle with the North direction (See VgICamera::setHeading for more information). The pitch is the angle with the tangent plane (See VgICamera::setPitch for more information).
- Date:
- 25/02/2010
Constructor & Destructor Documentation
VgEngine::VgICamera::VgICamera |
( |
) |
[inline, protected] |
virtual VgEngine::VgICamera::~VgICamera |
( |
) |
[inline, virtual] |
Member Function Documentation
virtual double VgEngine::VgICamera::getFovX |
( |
) |
const [pure virtual] |
Gets the camera's horizontal field of view.
- Returns:
- The camera's horizontal field of view angle in degrees.
- Version:
- 2.0
virtual double VgEngine::VgICamera::getFovY |
( |
) |
const [pure virtual] |
Gets the camera's vertical field of view.
- Returns:
- The camera's vertical field of view angle in degrees.
- Version:
- 2.0
virtual double VgEngine::VgICamera::getHeading |
( |
) |
const [pure virtual] |
virtual double VgEngine::VgICamera::getPitch |
( |
) |
const [pure virtual] |
Retrieves the current camera's pitch (in degrees).
See VgICamera::setPitch for more information.
Retrieves the current camera's position.
- Returns:
- The camera's position expressed in the scene's metric SRS.
virtual const VgIViewPoint& VgEngine::VgICamera::getViewpoint |
( |
) |
[pure virtual] |
Gets the camera viewpoint.
- Note:
- The same note on positions as in VgEngine::VgICamera::getPosition applies here. Position in the returned viewpoint is in the scene's SRS.
Computes a viewpoint using the current pitch and heading, at which all given positions are visible.
- Parameters:
-
pPositions | List of positions to see. |
pTop | The top padding area's height to use (in pixels) |
pBottom | The bottom padding area's height to use (in pixels) |
pLeft | The left padding area's width to use (in pixels) |
pRight | The right padding area's width to use (in pixels) |
pPitch | The pitch to use for computation if "not-a-number" current pitch will be used. |
pHeading | The pitch to use for computation if "not-a-number" current heading will be used. |
- Note:
- When no position is provided (empty vector), the current viewpoint is returned.
-
When only one position is provided there is an additional constraint that forces the viewpoint to keep the current altitude. This can lead to results where the provided position would be behind the camera. For example, this will happen if the view is looking down and the point is above the camera.
-
The same notes on positions as in VgEngine::VgICamera::setPosition and VgEngine::VgICamera::getPosition apply here. The input positions will be converted to the scene's metric SRS. The computing will be done in the scene's metric SRS, and the resulting viewpoint's position expressed in it.
Computes a viewpoint using the current pitch and heading, at which all given positions are visible.
- Parameters:
-
pPositions | List of positions to see. |
pTop | The top padding area's height to use (in pixels) |
pBottom | The bottom padding area's height to use (in pixels) |
pLeft | The left padding area's width to use (in pixels) |
pRight | The right padding area's width to use (in pixels) |
- Note:
- When no position is provided (empty vector), the current viewpoint is returned.
-
When only one position is provided there is an additional constraint that forces the viewpoint to keep the current altitude. This can lead to results where the provided position would be behind the camera. For example, this will happen if the view is looking down and the point is above the camera.
-
The same notes on positions as in VgEngine::VgICamera::setPosition and VgEngine::VgICamera::getPosition apply here. The input positions will be converted to the scene's metric SRS. The computing will be done in the scene's metric SRS, and the resulting viewpoint's position expressed in it.
virtual bool VgEngine::VgICamera::pickGeographicPoint |
( |
const double & |
pX, |
|
|
const double & |
pY, |
|
|
VgEngine::VgPosition & |
pPosition |
|
) |
| const [pure virtual] |
Casts a ray from a point on the screen in the 3D scene.
- Parameters:
-
pX | the normalized X screen coordinate (0 is on the left of the screen, 1 on the right). |
pY | the normalized Y screen coordinate (0 is on the bottom of the screen, 1 on the top). |
pPosition | the geographic position if an intersection has been found. Expressed in the scene's SRS |
- Returns:
- true if there is an intersection, false otherwise.
virtual void VgEngine::VgICamera::projectOnScreen |
( |
const VgEngine::VgPosition & |
pPosition, |
|
|
double & |
pXScreen, |
|
|
double & |
pYScreen, |
|
|
double * |
pZScreen = NULL |
|
) |
| const [pure virtual] |
Projects a position on the screen.
- Parameters:
-
pPosition | the geographic position to be projected on the screen. |
pXScreen | the projected X coordinate on the screen. This value is normalized between 0 and 1, where 0 is on the left of the screen |
pYScreen | the projected Y coordinate on the screen. This value is normalized between 0 and 1, where 0 is on the bottom of the screen. |
pZScreen | the projected Z coordinate on the screen. If the projected point is in the view frustum the value is between 0 and 1. |
- Note:
- The same note on positions as in VgEngine::VgICamera::setPosition applies here.
virtual void VgEngine::VgICamera::setFovX |
( |
double |
pFovX, |
|
|
double |
pRatio = -1.0f |
|
) |
| [pure virtual] |
Sets the camera's field of view.
The VisioDevKit's policy for the field of view is adaptative, this means that the engine will try to always have the same "amount of view" per pixel. As a result, when the size of the rendering surface changes, the field of view changes in order to keep a constant pixel ratio.
- Parameters:
-
pFovX | The new field of view angle in degrees (will be clamped to reasonable values). |
pRatio | Optional aspect ratio (if negative, ratio will be computed from screen resolution). |
- Version:
- 2.0.8744
virtual void VgEngine::VgICamera::setHeading |
( |
double |
pHeadingInDegrees ) |
[pure virtual] |
Sets the camera's heading (0 for north, increasing value start to east).
- Parameters:
-
pHeadingInDegrees | Heading angle, expressed in degrees. |
virtual void VgEngine::VgICamera::setPitch |
( |
double |
pPitchInDegrees ) |
[pure virtual] |
Sets the camera's pitch.
0 to look "forward" (at the horizon), -85 to look down and +85 to towards the zenith.
- Parameters:
-
pPitchInDegrees | Pitch angle, expressed in degrees. |
virtual void VgEngine::VgICamera::setPosition |
( |
const VgEngine::VgPosition & |
pPosition ) |
[pure virtual] |
Sets the camera's position.
- Parameters:
-
pPosition | The position where the camera must be placed. |
- Note:
- Since verion 2.0, the positions can now be expressed in various spatial reference systems. As a camera can only exist in "scene" coordinates, the provided position will be converted to the scene's spatial reference system. see VgEngine::VgPosition and VgEngine::VgSRS for more details.
virtual void VgEngine::VgICamera::setViewpoint |
( |
const VgIViewPoint & |
pViewpoint ) |
[pure virtual] |
The documentation for this interface was generated from the following file: