54 #ifndef ACG_TRACKBALL_NODE_HH 55 #define ACG_TRACKBALL_NODE_HH 61 #include "BaseNode.hh" 62 #include "TransformNode.hh" 66 #include <QMouseEvent> 103 const std::string& _name=
"<TrackballNode>" )
105 drawTrackball_(false),
108 xAxis_(1.0, 0.0, 0.0),
109 yAxis_(0.0, 1.0, 0.0),
110 zAxis_(0.0, 0.0, 1.0)
130 double radius()
const {
return radius_; }
135 Vec3d vec (1.0, 1.0, 1.0);
137 vec = scale ().transform_point(vec);
138 radius_ *= vec.
max ();
160 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event);
173 Vec3d xAxis_, yAxis_, zAxis_;
182 #endif // ACG_TRACKBALL_NODE_HH defined Namespace providing different geometric functions concerning angles.
bool draw_trackball() const
Is trackball-drawing on?
void set_draw_axes(bool _b)
Turn drawing the axes on/off.
virtual void setIdentity()
override TransformNode::setIdentity() (update radius_)
bool draw_axes() const
Is axes-drawing on?
void set_draw_trackball(bool _b)
Turn on/off drawing of the trackball.
TrackballNode(BaseNode *_parent=0, const std::string &_name="<TrackballNode>")
Default constructor.
virtual void setIdentity()
~TrackballNode()
Destructor.
void set_radius(double _r)
Set trackball radius.
double radius() const
Get trackball radius.
Scalar max() const
return the maximal component