60 #ifndef ACG_TRACKBALL_NODE_HH 61 #define ACG_TRACKBALL_NODE_HH 67 #include "BaseNode.hh" 68 #include "TransformNode.hh" 74 #include <QMouseEvent> 111 const std::string& _name=
"<TrackballNode>" )
113 drawTrackball_(false),
116 xAxis_(1.0, 0.0, 0.0),
117 yAxis_(0.0, 1.0, 0.0),
118 zAxis_(0.0, 0.0, 1.0)
138 double radius()
const {
return radius_; }
143 Vec3d vec (1.0, 1.0, 1.0);
145 vec = scale ().transform_point(vec);
146 radius_ *= vec.
max ();
168 virtual void mouseEvent(
GLState& _state, QMouseEvent* _event);
181 Vec3d xAxis_, yAxis_, zAxis_;
190 #endif // ACG_TRACKBALL_NODE_HH defined ~TrackballNode()
Destructor.
virtual void setIdentity()
override TransformNode::setIdentity() (update radius_)
bool draw_trackball() const
Is trackball-drawing on?
void set_radius(double _r)
Set trackball radius.
void set_draw_trackball(bool _b)
Turn on/off drawing of the trackball.
virtual void setIdentity()
Namespace providing different geometric functions concerning angles.
bool draw_axes() const
Is axes-drawing on?
TrackballNode(BaseNode *_parent=0, const std::string &_name="<TrackballNode>")
Default constructor.
double radius() const
Get trackball radius.
Scalar max() const
return the maximal component
void set_draw_axes(bool _b)
Turn drawing the axes on/off.