136 void Yaw(
float radians);
138 void Roll(
float radians);
146 void MoveUp(
double distance);
192 std::string description;
195 #endif // VART_CAMERA_H
void MoveForward(double distance)
Moves the camera forward (relative to the camera).
float GetFovY() const
Returns the vertical field of view (in degrees).
const std::string & GetDescription() const
Gets the description associated with the camera.
void SetAspectRatio(float newAR)
Sets the camera's width/height ratio.
float GetAspectRatio() const
Gets the camera's width/height ratio.
void SetMatrices() const
Loads camera transform into rendering engine.
float GetFarPlaneDistance() const
Returns the distance to the far plane.
Point4D location
Position where the camera is at.
Points and vectors using homogeneous coordinates.
void Roll(float radians)
Rolls the Camera around itself.
float fovY
Vertical angle of frustum. Used if projectionType == PERSPECTIVE.
friend std::ostream & operator<<(std::ostream &output, const Camera &cam)
void SetDescription(const std::string &descriptionValue)
Sets the description associated with the camera.
void LeftVector(Point4D *resultPtr) const
Computes the vector pointing left.
void ScaleVisibleVolume(float horScale, float verScale)
Scales the visible volume.
const double GetVisibleVolumeBottomLimit() const
Gets the coordinates of the orthographic view volume.
Point4D GetTarget() const
Returns the camera target (where it is looking at).
void SetProjectionType(ProjectionType newValue)
Sets the projection type (PERSPECTIVE/ORTHOGRAPHIC).
const double GetVisibleVolumeLeftLimit() const
Gets the coordinates of the orthographic view volume.
float farPlaneDistance
Distance to far plane.
void SetTarget(const Point4D &targetValue)
Sets the camera target (where it is looking at).
void SetUp(const Point4D &upValue)
Sets the camera up vector.
void SetFovY(float f)
Sets the vertical field of view (in degrees).
bool DrawOGL() const
Positions a camera using OpenGL commands.
void YawAroundTarget(float radians)
Rotates the Camera around the axis defined by the target and up vector.
void SetLocation(const Point4D &locationValue)
Sets the camera location.
Point4D up
Up direction, relative to the camera.
ProjectionType GetProjectionType() const
Gets the projection type (PERSPECTIVE/ORTHOGRAPHIC).
void Yaw(float radians)
Rotates the Camera around itself (location and up vector).
Point4D GetUp() const
Returns the camera up vector.
void MoveUp(double distance)
Moves the camera up and down.
void SetVisibleVolumeVLimits(double top, double bottom)
Sets the vertical limit coordinates of the orthographic view volume.
const double GetVisibleVolumeTopLimit() const
Gets the coordinates of the orthographic view volume.
void SetVisibleVolumeHeight(double newValue)
Sets the visible volume by given height.
double vvRight
Visible Volume right coordinate (in world coordinates). Used if projectionType is ORTHOGRAPHIC...
void SetVisibleVolumeHLimits(double left, double right)
Sets the horizontal limit coordinates of the orthographic view volume.
Header file for V-ART class "Point4D".
void PitchAroundTarget(float radians)
Rotates the Camera around the axis defined by the target and left vector.
void MoveSideways(double distance)
Moves the camera sideways.
double vvBottom
Visible Volume bottom coordinate (in world coordinates). Used if projectionType is ORTHOGRAPHIC...
float aspectRatio
Viewing aspect ratio (width/height).
Camera & operator=(const Camera &cam)
float GetNearPlaneDistance() const
Returns the distance to the near plane.
void SetNearPlaneDistance(float newValue)
Sets the distance to the near plane.
Point4D GetLocation() const
Returns the camera location (its position).
Point4D target
Position where the camera is looking at.
float nearPlaneDistance
Distance to near plane.
double vvTop
Visible Volume top coordinate (in world coordinates). Used if projectionType is ORTHOGRAPHIC.
double vvLeft
Visible Volume left coordinate (in world coordinates). Used if projectionType is ORTHOGRAPHIC.
void FrontVector(Point4D *resultPtr) const
Computes the vector pointing ahead.
ProjectionType projectionType
Indicates whether a perspective ou orthographic projection should be used.
void SetFarPlaneDistance(float newValue)
Sets the distance to the far plane distance.
const double GetVisibleVolumeRightLimit() const
Gets the coordinates of the orthographic view volume.