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)
override;
173 Vec3d xAxis_, yAxis_, zAxis_;
182 #endif // ACG_TRACKBALL_NODE_HH defined double radius() const
Get trackball radius.
virtual void setIdentity() override
override TransformNode::setIdentity() (update radius_)
Namespace providing different geometric functions concerning angles.
void set_draw_trackball(bool _b)
Turn on/off drawing of the trackball.
Scalar max() const
return the maximal component
void set_draw_axes(bool _b)
Turn drawing the axes on/off.
bool draw_axes() const
Is axes-drawing on?
~TrackballNode()
Destructor.
bool draw_trackball() const
Is trackball-drawing on?
void set_radius(double _r)
Set trackball radius.
TrackballNode(BaseNode *_parent=0, const std::string &_name="<TrackballNode>")
Default constructor.