#include <Camera.h>
Inherits DynamicObject.
Inheritance diagram for Camera:


Public Methods | |
| Camera (Vertex3 pos=Vertex3(0.0, 0.0, 0.0), real f=1.0) | |
| Default constructor. More... | |
| Vertex3 & | getPosition () |
| Returns a reference to the camera position. | |
| Quaternion & | getOrientation () |
| Returns a reference to the camera orientation. | |
| real | getFov () |
| Returns the camera fov. | |
| void | contructOrientation (Vertex3 &up, const Vertex3 &dir) |
| Construct a camera frame. More... | |
| void | lookAt (Vertex3 &up, const Vertex3 &p) |
| Construct a camera lookat frame. | |
| void | parseSymbol (Token &t, ObjectFile &file) |
| Reads a single parameter sections inside the body of the object description. More... | |
| void | writeParams (ostream &stream) |
| Writes all parameter sections inside the body of the object description. More... | |
Protected Types | |
| typedef DynamicObject | super |
Protected Methods | |
| void | createSymbols () |
| Creates all parameter symbols that are used within the body of the object description. | |
Protected Attributes | |
| real | fov |
| Camera field of view. | |
| Vertex3 | position |
| Camera position. | |
| Quaternion | orientation |
| Camera orientation. | |
A camera is defined by its position orientation and field of view. It is used to define a view point from which to render a scene.
Format: (see DynamicObject)
PARAM ::= POSITION | ORIENTATION | FOV | FRAME | LOOKAT
POSITION ::= "position" <Vertex3>
ORIENTATION ::= "" <Quaternion>
FOV ::= "" <float>
FRAME ::= "" <Vertex3> <Vertex3>
LOOKAT ::= "" <Vertex3> <Vertex3>
Example:
Camera {
position (0, 1.5, -5.5);
lookat (0, 1, 0) (0, 0, 0);
}
|
||||||||||||
|
Default constructor. Construct a camera with given position and field of view.
|
|
||||||||||||
|
Construct a camera frame. Construct the camera orientation given an up vector and camera direction.
|
|
||||||||||||
|
Reads a single parameter sections inside the body of the object description. Each object has a set of parameter names associated with it, called symbols. Symbols are declared inside the createSymbols method. The method parseSymbol expects the Token t to be such a symbol and reads the corresponding parameters. Unknown symbols are passed to its super class.
Reimplemented from DynamicObject. |
|
|
Writes all parameter sections inside the body of the object description. This method writes all object parameters to ostream. Inhereting classes will always call super::writeParams().
Reimplemented from DynamicObject. |