SimpleFastOpenAtomicVisualiser
|
A 3D projective camera centered on a focus moving on a sphere. More...
#include <camera.h>
Public Member Functions | |
Camera (const std::vector< Atom > &atoms, uint16_t resX, uint16_t resY) | |
Construct a new Camera focussing on some Atoms. | |
Camera (glm::vec3 positionSpherical, uint16_t resX, uint16_t resY) | |
Construct a new Camera at a given position. | |
void | reset () |
Set the default view. | |
void | reset (const std::vector< Atom > &atoms) |
Set the default view. | |
void | zoom (float increment) |
Increment the zoom. | |
void | incline (float increment) |
Incline about the y OpenGL axis. | |
void | rotate (float increment) |
Rotate about the y OpenGL axis. | |
void | setPosition (glm::vec3 positionSpherical) |
Set the camera's position. | |
glm::vec3 | position (bool spherical=false) const |
Return the cartesian position vector. | |
void | setUp (float up) |
Set the up direction. | |
float | getUp () const |
Get the up direction. | |
glm::mat4 | getProjection () const |
Get the Projection matrix. | |
glm::mat4 | getInverseProjection () const |
Get the inverse Projection matrix. | |
glm::mat4 | getView () const |
Get the View matrix. | |
glm::mat4 | getInverseView () const |
Get the inverse View matrix. | |
glm::mat4 | getPV () const |
Get the Projection*View matrix. | |
glm::mat4 | getInversePV () const |
Get the inverse Projection*View matrix. | |
uint16_t | getResX () const |
uint16_t | getResY () const |
int | lua_cameraPosition (lua_State *lua) |
Get the Camera position. | |
int | lua_setCameraPosition (lua_State *lua) |
Set Camera position. | |
int | lua_rotateCamera (lua_State *lua) |
Rotate the Camera. | |
int | lua_zoomCamera (lua_State *lua) |
Zoom the Camera. | |
int | lua_inclineCamera (lua_State *lua) |
Incline the camera. | |
A 3D projective camera centered on a focus moving on a sphere.
Construct a new Camera focussing on some Atoms.
atoms | the atoms to fit into view. |
resX | the screen resolution width. |
resY | the screen resolution in height. |
Construct a new Camera at a given position.
positionSpherical | the camera's position in spherical coordinates. |
resX | the screen resolution width. |
resY | the screen resolution in height. |
|
inline |
Get the inverse Projection matrix.
|
inline |
Get the inverse Projection*View matrix.
|
inline |
Get the inverse View matrix.
|
inline |
Get the Projection matrix.
|
inline |
Get the Projection*View matrix.
|
inline |
|
inline |
|
inline |
Get the up direction.
|
inline |
Get the View matrix.
Incline about the y OpenGL axis.
increment | the inclination increment. |
Get the Camera position.
lua | the Lua context. |
Incline the camera.
lua | the Lua context. |
Rotate the Camera.
lua | the Lua context. |
Set Camera position.
lua | the Lua context. |
Zoom the Camera.
lua | the Lua context. |
Return the cartesian position vector.
spherical | if true return the position in spherical coordinates. Otherwise cartesian. |
|
inline |
Set the default view.
Set the default view.
atoms | the Atoms to fit in view. |
Rotate about the y OpenGL axis.
increment | the rotation increment. |
|
inline |
Set the camera's position.
positionSpherical | the position in spherical coordinates. |
Set the up direction.
up | the up direction. |
Increment the zoom.
increment | the zoom increase or decrease. |