40 #ifndef H_GEOGRAM_GFX_GLUP_VIEWER_ARCBALL_H
41 #define H_GEOGRAM_GFX_GLUP_VIEWER_ARCBALL_H
104 constrain_x_ = value;
122 constrain_y_ = value;
Enables to interactively define a rotation.
void release(const vec2 &value)
Callback called when the mouse button is released.
ArcBall()
ArcBall constructor.
vec3 mouse_to_sphere(const vec2 &p)
Lifts a 2d screen coordinate to 3d sphere coordinates, and applies the X or Y axis constraints.
bool get_y_constraint() const
Tests whether the Y axis is constrained.
vec3 constrain_vector(const vec3 &vector, const vec3 &axis) const
Discards the component of a vector that is along another vector.
void reset()
Resets this ArcBall to the default value.
bool grabbed() const
Tests whether this ArcBall is grabbed.
void drag(const vec2 &value)
Callback called when the mouse is moved.
void grab(const vec2 &value)
Callback called when the mouse is clicked.
void set_y_constraint(bool value)
Specifies whether the Y axis is constrained.
const mat4 & get_value() const
Gets the value of the rotation.
void set_x_constraint(bool value)
Specifies whether the X axis is constrained.
bool get_x_constraint() const
Tests whether the X axis is constrained.
void set_value(const mat4 &value)
Sets the value of the rotation.
Vector with aligned memory allocation.
Geometric functions in 2d and 3d.
Common include file, providing basic definitions. Should be included before anything else by all head...
#define GEOGRAM_GFX_API
Linkage declaration for geogram symbols.
Global Vorpaline namespace.