1 #ifndef CAMERA_VIEWPORT_H 2 #define CAMERA_VIEWPORT_H 27 bool clicked(
int mx,
int my)
const;
32 void scroll(
float x,
float y,
float z=0);
47 void getClickSource(
float mx,
float my,
Vector3&)
const;
51 bool project(
const Vector3& pt,
float& mx,
float& my,
float& mz)
const;
60 std::ostream& operator << (std::ostream& out,
const Viewport&);
61 std::istream& operator >> (std::istream& in,
Viewport&);
void getMovementVector(float dx, float dy, Vector3 &) const
Definition: viewport.cpp:62
float getFOV() const
Returns the absolute field of view in the width direction.
Definition: viewport.cpp:23
float getHFOV() const
Returns the absolute field of view in the height direction.
Definition: viewport.cpp:28
A 3D vector class.
Definition: math3d/primitives.h:136
bool clicked(int mx, int my) const
Returns true if the point (mx,my) is within the viewport.
Definition: viewport.cpp:44
void setLensAngle(float rads)
Sets the absolute field of view in the width direction (deprecated name)
Definition: viewport.h:18
void setFOV(float rads)
Sets the absolute field of view in the width direction.
Definition: viewport.cpp:18
void scroll(float x, float y, float z=0)
Definition: viewport.cpp:56
A class containing viewport / camera information. This uses OpenGL coordinate convention in which x i...
Definition: viewport.h:11
void getMovementVectorAtDistance(float dx, float dy, float dist, Vector3 &) const
Definition: viewport.cpp:70
void getClickVector(float mx, float my, Vector3 &) const
Definition: viewport.cpp:134
void getViewVector(Vector3 &) const
Returns the forward direction in world coordinates.
Definition: viewport.cpp:103
bool project(const Vector3 &pt, float &mx, float &my, float &mz) const
Definition: viewport.cpp:155
void zoom(float s)
Multiplies the camera's zoom by the factor s.
Definition: viewport.cpp:49
void setPerspective(bool enabled)
Sets the viewport as a perspective or orthographic viewport.
Definition: viewport.cpp:33