Trackball camera class.
More...
#include <TrackballCamera.h>
Trackball camera class.
This class inplements the trackball camera, defined in polar coordinate system and looking at origin point \(O\).
- Author
- Sergey G. Kosov, serge.nosp@m.y.ko.nosp@m.sov@p.nosp@m.roje.nosp@m.ct-10.nosp@m..de
Definition at line 16 of file TrackballCamera.h.
◆ CTrackballCamera()
DirectGraphicalModels::vis::CTrackballCamera::CTrackballCamera |
( |
float |
theta, |
|
|
float |
phi, |
|
|
float |
radius |
|
) |
| |
|
inline |
Constructor.
The camera is defined in polar coordinate system with the parameters theta, phi and radius in point \(P\) and looks at the origin \(O\), which is initially situated at the zero point.
- Parameters
-
theta | The azimuth (or azimuthal angle) measured from the azimuth reference direction to the orthogonal projection of the line segment \(OP\) on the reference plane |
phi | The inclination (or polar angle) between the zenith direction and the line segment \(OP\) |
radius | The radial distance of the camera to origin, i.e. the Euclidian distance between \(O\) and \(P\) |
Definition at line 27 of file TrackballCamera.h.
◆ ~CTrackballCamera()
virtual DirectGraphicalModels::vis::CTrackballCamera::~CTrackballCamera |
( |
void |
| ) |
|
|
inlinevirtual |
◆ getCameraOrintation()
glm::vec3 DirectGraphicalModels::vis::CTrackballCamera::getCameraOrintation |
( |
void |
| ) |
const |
|
inlineprotected |
◆ getCameraPosition()
glm::vec3 DirectGraphicalModels::vis::CTrackballCamera::getCameraPosition |
( |
void |
| ) |
const |
|
inlineprotected |
◆ getViewMatrix()
glm::mat4 DirectGraphicalModels::vis::CTrackballCamera::getViewMatrix |
( |
void |
| ) |
|
Returns the view matrix within the camera coordinate.
- Returns
- The view matrix within the camera coordinate
Definition at line 15 of file TrackballCamera.cpp.
◆ pan()
void DirectGraphicalModels::vis::CTrackballCamera::pan |
( |
float |
dx, |
|
|
float |
dy |
|
) |
| |
|
protected |
◆ reset()
void DirectGraphicalModels::vis::CTrackballCamera::reset |
( |
void |
| ) |
|
◆ rotate()
void DirectGraphicalModels::vis::CTrackballCamera::rotate |
( |
float |
dTheta, |
|
|
float |
dPhi |
|
) |
| |
|
protected |
◆ updateViewMatrix()
void DirectGraphicalModels::vis::CTrackballCamera::updateViewMatrix |
( |
void |
| ) |
|
|
inlineprotected |
◆ zoom()
void DirectGraphicalModels::vis::CTrackballCamera::zoom |
( |
float |
dRadius | ) |
|
|
protected |
◆ m_initPhi
float DirectGraphicalModels::vis::CTrackballCamera::m_initPhi |
|
private |
◆ m_initRadius
float DirectGraphicalModels::vis::CTrackballCamera::m_initRadius |
|
private |
◆ m_initTheta
float DirectGraphicalModels::vis::CTrackballCamera::m_initTheta |
|
private |
◆ m_phi
float DirectGraphicalModels::vis::CTrackballCamera::m_phi |
|
private |
◆ m_radius
float DirectGraphicalModels::vis::CTrackballCamera::m_radius |
|
private |
◆ m_target
glm::vec3 DirectGraphicalModels::vis::CTrackballCamera::m_target |
|
private |
◆ m_theta
float DirectGraphicalModels::vis::CTrackballCamera::m_theta |
|
private |
◆ m_up
float DirectGraphicalModels::vis::CTrackballCamera::m_up |
|
private |
◆ m_view
glm::mat4 DirectGraphicalModels::vis::CTrackballCamera::m_view |
|
private |
◆ m_viewNeedsUpdate
bool DirectGraphicalModels::vis::CTrackballCamera::m_viewNeedsUpdate |
|
private |
The documentation for this class was generated from the following files: