PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::OrbitCamera Class Reference

#include <OrbitCamera.h>

Inheritance diagram for dyno::OrbitCamera:
Collaboration diagram for dyno::OrbitCamera:

Public Member Functions

 OrbitCamera ()
 
 ~OrbitCamera ()
 
void rotateToPoint (float x, float y) override
 
void translateToPoint (float x, float y) override
 
void zoom (float amount) override
 
void registerPoint (float x, float y) override
 
Vec3f getViewDir () const
 
Vec3f getEyePos () const override
 
Vec3f getTargetPos () const override
 
void setEyePos (const Vec3f &p) override
 
void setTargetPos (const Vec3f &p) override
 
void getCoordSystem (Vec3f &view, Vec3f &up, Vec3f &right) const
 
glm::mat4 getViewMat () override
 
glm::mat4 getProjMat () override
 
- Public Member Functions inherited from dyno::Camera
 Camera ()
 
 ~Camera ()
 
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
 
TRay3D< float > castRayInWorldSpace (float x, float y)
 
void setUnitScale (float unit)
 
float unitScale ()
 
void setProjectionType (ProjectionType type)
 
ProjectionType projectionType ()
 

Private Member Functions

void rotate (float dx, float dy)
 
void translate (const Vec3f translation)
 
Vec3f getPosition (float x, float y)
 
Quat1f getQuaternion (float x1, float y1, float x2, float y2)
 
Quat1f getQuaternion (float yaw, float pitch) const
 

Private Attributes

float mRegX = 0.5f
 
float mRegY = 0.5f
 
float mRotAngle = 0.0f
 
Vec3f mRotAxis = Vec3f(0.0f, 1.0f, 0.0f)
 
float mYaw = 0.0f
 
float mPitch = 0.0f
 
float mFocusDist
 
Vec3f mEyePos
 
Vec3f mTargetPos
 
float mFocusDistMax = 10.0f
 
float mFocusDistMin = 0.1f
 
float mSpeed = 2.0
 
float mZoomSpeed = 1.0f
 

Additional Inherited Members

- Public Types inherited from dyno::Camera
enum  ProjectionType { Perspective , Orthogonal }
 
- Protected Attributes inherited from dyno::Camera
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 22 of file OrbitCamera.h.

Constructor & Destructor Documentation

◆ OrbitCamera()

dyno::OrbitCamera::OrbitCamera ( )

Definition at line 12 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ ~OrbitCamera()

dyno::OrbitCamera::~OrbitCamera ( )
inline

Definition at line 26 of file OrbitCamera.h.

Member Function Documentation

◆ getCoordSystem()

void dyno::OrbitCamera::getCoordSystem ( Vec3f & view,
Vec3f & up,
Vec3f & right ) const

Definition at line 113 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEyePos()

Vec3f dyno::OrbitCamera::getEyePos ( ) const
overridevirtual

Implements dyno::Camera.

Definition at line 22 of file OrbitCamera.cpp.

◆ getPosition()

Vec3f dyno::OrbitCamera::getPosition ( float x,
float y )
private

Definition at line 155 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProjMat()

glm::mat4 dyno::OrbitCamera::getProjMat ( )
overridevirtual

Implements dyno::Camera.

Definition at line 213 of file OrbitCamera.cpp.

◆ getQuaternion() [1/2]

Quat1f dyno::OrbitCamera::getQuaternion ( float x1,
float y1,
float x2,
float y2 )
private

Definition at line 170 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getQuaternion() [2/2]

Quat1f dyno::OrbitCamera::getQuaternion ( float yaw,
float pitch ) const
private

Definition at line 182 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ getTargetPos()

Vec3f dyno::OrbitCamera::getTargetPos ( ) const
overridevirtual

Implements dyno::Camera.

Definition at line 26 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getViewDir()

Vec3f dyno::OrbitCamera::getViewDir ( ) const

Definition at line 105 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getViewMat()

glm::mat4 dyno::OrbitCamera::getViewMat ( )
overridevirtual

Implements dyno::Camera.

Definition at line 201 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ registerPoint()

void dyno::OrbitCamera::registerPoint ( float x,
float y )
overridevirtual

Implements dyno::Camera.

Definition at line 194 of file OrbitCamera.cpp.

Here is the caller graph for this function:

◆ rotate()

void dyno::OrbitCamera::rotate ( float dx,
float dy )
private

Definition at line 81 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotateToPoint()

void dyno::OrbitCamera::rotateToPoint ( float x,
float y )
overridevirtual

Implements dyno::Camera.

Definition at line 234 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ setEyePos()

void dyno::OrbitCamera::setEyePos ( const Vec3f & p)
overridevirtual

Implements dyno::Camera.

Definition at line 31 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTargetPos()

void dyno::OrbitCamera::setTargetPos ( const Vec3f & p)
overridevirtual

Implements dyno::Camera.

Definition at line 59 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ translate()

void dyno::OrbitCamera::translate ( const Vec3f translation)
private

Definition at line 122 of file OrbitCamera.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ translateToPoint()

void dyno::OrbitCamera::translateToPoint ( float x,
float y )
overridevirtual

Implements dyno::Camera.

Definition at line 246 of file OrbitCamera.cpp.

Here is the call graph for this function:

◆ zoom()

void dyno::OrbitCamera::zoom ( float amount)
overridevirtual

Implements dyno::Camera.

Definition at line 135 of file OrbitCamera.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ mEyePos

Vec3f dyno::OrbitCamera::mEyePos
private

Definition at line 68 of file OrbitCamera.h.

◆ mFocusDist

float dyno::OrbitCamera::mFocusDist
private

Definition at line 66 of file OrbitCamera.h.

◆ mFocusDistMax

float dyno::OrbitCamera::mFocusDistMax = 10.0f
private

Definition at line 71 of file OrbitCamera.h.

◆ mFocusDistMin

float dyno::OrbitCamera::mFocusDistMin = 0.1f
private

Definition at line 72 of file OrbitCamera.h.

◆ mPitch

float dyno::OrbitCamera::mPitch = 0.0f
private

Definition at line 64 of file OrbitCamera.h.

◆ mRegX

float dyno::OrbitCamera::mRegX = 0.5f
private

Definition at line 56 of file OrbitCamera.h.

◆ mRegY

float dyno::OrbitCamera::mRegY = 0.5f
private

Definition at line 57 of file OrbitCamera.h.

◆ mRotAngle

float dyno::OrbitCamera::mRotAngle = 0.0f
private

Definition at line 60 of file OrbitCamera.h.

◆ mRotAxis

Vec3f dyno::OrbitCamera::mRotAxis = Vec3f(0.0f, 1.0f, 0.0f)
private

Definition at line 61 of file OrbitCamera.h.

◆ mSpeed

float dyno::OrbitCamera::mSpeed = 2.0
private

Definition at line 74 of file OrbitCamera.h.

◆ mTargetPos

Vec3f dyno::OrbitCamera::mTargetPos
private

Definition at line 69 of file OrbitCamera.h.

◆ mYaw

float dyno::OrbitCamera::mYaw = 0.0f
private

Definition at line 63 of file OrbitCamera.h.

◆ mZoomSpeed

float dyno::OrbitCamera::mZoomSpeed = 1.0f
private

Definition at line 75 of file OrbitCamera.h.


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