76 void roll(
Real _angle) noexcept;
81 void pitch(
Real _angle) noexcept;
86 void yaw(
Real _angle) noexcept;
102 void set(
const Vec3 &_eye,
const Vec3 &_look,
const Vec3 &_up) noexcept;
110 void setShape(
Real _viewAngle,
Real _aspect,
Real _near,
Real _far) noexcept;
115 void setAspect(
Real _asp) noexcept;
120 void setDefaultCamera() noexcept;
156 void setViewAngle(
Real _angle) noexcept;
160 void update() noexcept;
165 void normalisedYaw(
Real _angle) noexcept;
171 void normalisedPitch(
Real _angle) noexcept;
177 void normalisedRoll(
Real _angle) noexcept;
185 void writeRib(
RibExport &_rib )
const noexcept;
263 void calculateFrustum() noexcept;
267 void drawFrustum() noexcept;
293 void setPerspProjection() noexcept;
300 void rotAxes(
Vec4& io_a,
Vec4& io_b,
const Real _angle) noexcept;
363 enum class ProjPlane : char { TOP = 0,BOTTOM,LEFT,RIGHT,NEARP,FARP};
375 void setViewMatrix() noexcept;
379 void setProjectionMatrix() noexcept;
383 #endif // end of class const Mat4 & getProjectionMatrix() noexcept
accesor to get the projection matrix
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions...
Vec4 getN() const noexcept
get the n vector
Vec4 m_v
vector for the Camera local cord frame
Mat4 m_projectionMatrix
Projection a Matrix to hold the perspective transfomatio matrix for the camera.
main definition of types and namespace
Real m_aspect
used to store the current camera aspect ratio (can be derived from Width / Height ...
Vec4 m_look
where the camera is looking to, used with Eye to calculate the Vector m_n
Real getNear() const noexcept
get the near clip value
Real getFar() const noexcept
get the far clip value
void setEye(Vec4 _e) noexcept
set the eye position and re-calculate the matrices
an Axis Aligned Bounding Box
Vec4 getV() const noexcept
get the v vector
simple Vec3 encapsulates a 3 float object like glsl vec3 but not maths use the Vec3 class for maths a...
implementation files for RibExport class
const Mat4 & getViewMatrix() noexcept
accesor to get the view matrix
a simple mathmatical representation of a plane
PRECISION Real
create a variable called Real which is the main data type we use (GLfloat for most cases) ...
GLdouble GLdouble GLdouble b
Real m_fov
the feild of view of the camera view volume, measured from the eye
encapsulates a 4d Homogenous Point / Vector object
simple rib export class, attempts to auto tab the rib file etc. needs lots of work to make it complet...
Vec4 getLook() const noexcept
get the look position
fmt::BufferedFile & move(fmt::BufferedFile &f)
a simple 3 tuple container for compatibility with glsl
Real m_zNear
the near clipping plane of the camera view volume
Vec4 m_eye
the position of the Camera used to calculate the local cord frame
Vec4 m_up
gives a general indication of which way up the camera is
Vec4 m_n
vector for the Camera local cord frame
simple camera class to allow movement in an opengl scene. a lot of this stuff is from the HILL book C...
Mat4 getVPMatrix() const noexcept
get the View * Projection matrix used as part of the MVP calculations
void setLook(Vec4 _e) noexcept
set the look position and re-calculate the matrices
ProjPlane
index values for the planes array
Real m_height
the height of the display image used for some perspective projection calculations ...
Vec4 getU() const noexcept
get the u vector
Vec4 getUp() const noexcept
get the up vector
Real m_zFar
the far clipping plane of the camera view volume
Vec4 m_u
vector for the Camera local cord frame
a simple rib exporter function
Matrix Class to do simple matrix operations included operator overloaded functions for maths and matr...
Vec4 getEye() const noexcept
get the eye position
Real getFOV() const noexcept
get the fov value
Real getAspect() const noexcept
get the aspect value
Mat4 m_viewMatrix
a Matrix to hold the combined modelling and viewing matrix to load into OpenGL
Real m_width
the width of the display image used for some perspective projection calculations