27 #include "glm/vec3.hpp" 28 #include "glm/mat4x4.hpp" 29 #include "glm/gtc/type_ptr.hpp" 30 #include "glm/gtc/matrix_transform.hpp" 81 GfxMan.recalculateObjectDistances();
153 glm::mat4 orientation;
159 const glm::vec4 relative = orientation * glm::vec4(x, y, z, 0);
161 move(relative[0], relative[1], relative[2]);
void setOrientation(float x, float y, float z)
Set the camera orientation.
const float * getOrientation() const
Get the current camera orientation cache.
float _orientation[3]
Current orientation.
The global graphics manager.
const float * getPosition() const
Get the current camera position cache.
#define NotificationMan
Shortcut for accessing the notification manager.
void reset()
Reset the current position and orientation.
void moveRelative(float x, float y, float z)
Move relative to the current view axis.
float _position[3]
Current position.
uint32 lastChanged() const
The timestamp the camera was changed last.
float _orientationCache[3]
Current orientation, cached.
The notification manager, handling all notifications.
void move(float x, float y, float z)
Move along axes.
void turn(float x, float y, float z)
Turn along axes.
Utility templates and functions.
#define DECLARE_SINGLETON(T)
Note that you need to use this macro from the global namespace.
The global events manager.
float _positionCache[3]
Current position, cached.
void limit(float minX=-FLT_MAX, float minY=-FLT_MAX, float minZ=-FLT_MAX, float maxX=FLT_MAX, float maxY=FLT_MAX, float maxZ=FLT_MAX)
Set limits on the camera position.
#define EventMan
Shortcut for accessing the events manager.
T CLIP(T v, T amin, T amax)
void setPosition(float x, float y, float z)
Set the camera position.
static float deg2rad(float deg)
#define GfxMan
Shortcut for accessing the graphics manager.
void update()
Update the caches with the current position and orientation.