53#ifndef ACG_TRANSFORM_NODE_HH
54#define ACG_TRANSFORM_NODE_HH
61#include "../Math/GLMatrixT.hh"
62#include "../Math/VectorT.hh"
63#include "../Math/QuaternionT.hh"
96 const std::string& _name=
"<TransformNode>" );
124 virtual void setIdentity();
132 void translate(
const Vec3d& _v);
135 void setTranslation(
const Vec3d& _v);
139 void rotate(
double _angle,
const Vec3d& _axis);
148 void scale(
const Vec3d& _s);
164 quaternion_.axis_angle(_axis, _angle);
165 _angle *= 180.0/M_PI;
169 return rotation_matrix_;
173 return inverse_rotation_matrix_;
182 return scale_matrix_;
186 return inverse_scale_matrix_;
189 bool apply_transformation() {
return applyTransformation_; }
191 void apply_transformation(
bool _applyTransformation) { applyTransformation_ = _applyTransformation; }
195 bool is2D(){
return is2DObject_;};
196 void set2D(
bool _2d){is2DObject_ = _2d;};
198 bool isPerSkeletonObject(){
return isPerSkeletonObject_;};
199 void setPerSkeletonObject(
bool _is){isPerSkeletonObject_ = _is;};
200 void setPerSkeletonModelView(GLMatrixd _is){perSkeletonModelView_ = _is;};
202 void ortho2DMode(GLState& _state);
203 void perSkeletonMode(GLState& _state);
204 void update2DOffset(
ACG::Vec2d _offset){offset_ += _offset;};
205 void scale2D(
double _scale){scaleFactor2D_ = _scale;};
206 void setImageDimensions(
ACG::Vec2i _dim){imageDimensions_ = _dim;};
216 GLMatrixd rotation_matrix_, inverse_rotation_matrix_, scale_matrix_, inverse_scale_matrix_;
219 Quaterniond quaternion_;
222 bool applyTransformation_;
227 bool isPerSkeletonObject_;
229 double scaleFactor2D_;
Namespace providing different geometric functions concerning angles.
GLMatrixT< double > GLMatrixd
typedef