PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::Camera Class Referenceabstract

#include <Camera.h>

Inheritance diagram for dyno::Camera:

Public Types

enum  ProjectionType { Perspective , Orthogonal }
 

Public Member Functions

 Camera ()
 
 ~Camera ()
 
virtual glm::mat4 getViewMat ()=0
 
virtual glm::mat4 getProjMat ()=0
 
virtual void rotateToPoint (float x, float y)=0
 
virtual void translateToPoint (float x, float y)=0
 
virtual void zoom (float amount)=0
 
virtual void registerPoint (float x, float y)=0
 
void setWidth (int width)
 
void setHeight (int height)
 
void setClipNear (float zNear)
 
void setClipFar (float zFar)
 
int viewportWidth () const
 
int viewportHeight () const
 
float clipNear () const
 
float clipFar () const
 
virtual void setEyePos (const Vec3f &p)=0
 
virtual void setTargetPos (const Vec3f &p)=0
 
virtual Vec3f getEyePos () const =0
 
virtual Vec3f getTargetPos () const =0
 
TRay3D< float > castRayInWorldSpace (float x, float y)
 
void setUnitScale (float unit)
 
float unitScale ()
 
void setProjectionType (ProjectionType type)
 
ProjectionType projectionType ()
 

Protected Attributes

float mNear = 0.01f
 
float mFar = 10.0f
 
float mFov = 0.0f
 
int mViewportWidth
 
int mViewportHeight
 
ProjectionType mProjectionType = Perspective
 
float mUnitScale = 1.0f
 

Detailed Description

Definition at line 15 of file Camera.h.

Member Enumeration Documentation

◆ ProjectionType

Enumerator
Perspective 
Orthogonal 

Definition at line 20 of file Camera.h.

Constructor & Destructor Documentation

◆ Camera()

dyno::Camera::Camera ( )
inline

Definition at line 17 of file Camera.h.

Here is the caller graph for this function:

◆ ~Camera()

dyno::Camera::~Camera ( )
inline

Definition at line 18 of file Camera.h.

Member Function Documentation

◆ castRayInWorldSpace()

TRay3D< float > Camera::castRayInWorldSpace ( float x,
float y )

Definition at line 5 of file Camera.cpp.

Here is the call graph for this function:

◆ clipFar()

float dyno::Camera::clipFar ( ) const
inline

Definition at line 45 of file Camera.h.

◆ clipNear()

float dyno::Camera::clipNear ( ) const
inline

Definition at line 44 of file Camera.h.

◆ getEyePos()

virtual Vec3f dyno::Camera::getEyePos ( ) const
pure virtual

Implemented in dyno::OrbitCamera, and dyno::TrackballCamera.

Here is the caller graph for this function:

◆ getProjMat()

virtual glm::mat4 dyno::Camera::getProjMat ( )
pure virtual

Implemented in dyno::OrbitCamera, and dyno::TrackballCamera.

Here is the caller graph for this function:

◆ getTargetPos()

virtual Vec3f dyno::Camera::getTargetPos ( ) const
pure virtual

Implemented in dyno::OrbitCamera, and dyno::TrackballCamera.

Here is the caller graph for this function:

◆ getViewMat()

virtual glm::mat4 dyno::Camera::getViewMat ( )
pure virtual

Implemented in dyno::OrbitCamera, and dyno::TrackballCamera.

Here is the caller graph for this function:

◆ projectionType()

ProjectionType dyno::Camera::projectionType ( )
inline

Definition at line 60 of file Camera.h.

◆ registerPoint()

virtual void dyno::Camera::registerPoint ( float x,
float y )
pure virtual

◆ rotateToPoint()

virtual void dyno::Camera::rotateToPoint ( float x,
float y )
pure virtual

◆ setClipFar()

void dyno::Camera::setClipFar ( float zFar)
inline

Definition at line 39 of file Camera.h.

Here is the caller graph for this function:

◆ setClipNear()

void dyno::Camera::setClipNear ( float zNear)
inline

Definition at line 38 of file Camera.h.

◆ setEyePos()

virtual void dyno::Camera::setEyePos ( const Vec3f & p)
pure virtual

◆ setHeight()

void dyno::Camera::setHeight ( int height)
inline

Definition at line 36 of file Camera.h.

◆ setProjectionType()

void dyno::Camera::setProjectionType ( ProjectionType type)
inline

Definition at line 59 of file Camera.h.

◆ setTargetPos()

virtual void dyno::Camera::setTargetPos ( const Vec3f & p)
pure virtual

◆ setUnitScale()

void dyno::Camera::setUnitScale ( float unit)
inline

Definition at line 55 of file Camera.h.

◆ setWidth()

void dyno::Camera::setWidth ( int width)
inline

Definition at line 35 of file Camera.h.

◆ translateToPoint()

virtual void dyno::Camera::translateToPoint ( float x,
float y )
pure virtual

◆ unitScale()

float dyno::Camera::unitScale ( )
inline

Definition at line 57 of file Camera.h.

Here is the caller graph for this function:

◆ viewportHeight()

int dyno::Camera::viewportHeight ( ) const
inline

Definition at line 42 of file Camera.h.

Here is the caller graph for this function:

◆ viewportWidth()

int dyno::Camera::viewportWidth ( ) const
inline

Definition at line 41 of file Camera.h.

Here is the caller graph for this function:

◆ zoom()

virtual void dyno::Camera::zoom ( float amount)
pure virtual

Member Data Documentation

◆ mFar

float dyno::Camera::mFar = 10.0f
protected

Definition at line 64 of file Camera.h.

◆ mFov

float dyno::Camera::mFov = 0.0f
protected

Definition at line 65 of file Camera.h.

◆ mNear

float dyno::Camera::mNear = 0.01f
protected

Definition at line 63 of file Camera.h.

◆ mProjectionType

ProjectionType dyno::Camera::mProjectionType = Perspective
protected

Definition at line 70 of file Camera.h.

◆ mUnitScale

float dyno::Camera::mUnitScale = 1.0f
protected

Definition at line 73 of file Camera.h.

◆ mViewportHeight

int dyno::Camera::mViewportHeight
protected

Definition at line 68 of file Camera.h.

◆ mViewportWidth

int dyno::Camera::mViewportWidth
protected

Definition at line 67 of file Camera.h.


The documentation for this class was generated from the following files: