24 #include <geometry/line.h> 25 #include <utils/math/angle.h> 57 float z_angle = atan( mDirection.
y() / mDirection.
x() );
61 direction_xy.
z() = 0.0;
62 float y_angle = -atan( mDirection.
z() / direction_xy.length() );
65 mToRefCS.rotate_z(z_angle);
67 mToRefCS.rotate_y(y_angle);
69 mToRefCS.trans(mBasePoint.
x(), mBasePoint.
y(), mBasePoint.
z());
88 float z_angle = atan( mDirection.
y() / mDirection.
x() );
92 direction_xy.
z() = 0.0;
93 float y_angle = -atan( mDirection.
z() / direction_xy.length() );
96 mToRefCS.rotate_z(z_angle);
98 mToRefCS.rotate_y(y_angle);
100 mToRefCS.trans(mBasePoint.
x(), mBasePoint.
y(), mBasePoint.
z());
132 _apply_transform_ref(t);
147 _trans(trans_x, trans_y, trans_z);
162 _trans_ref(trans_x, trans_y, trans_z);
214 _rotate_x_ref(angle);
227 _rotate_y_ref(angle);
240 _rotate_z_ref(angle);
Line & rotate_y(float angle)
Rotate the object around the y-axis of its CS.
virtual ~Line()
Destructor.
Line & trans_ref(float trans_x, float trans_y, float trans_z)
Translate the object wrt.
Line & apply_transform_ref(const HomTransform &t)
Apply a transformation to the line wrt.
virtual float y() const
RO-getter for y.
Fawkes library namespace.
Line & rotate_y_ref(float angle)
Rotate the object around the y-axis of the reference CS.
Line & rotate_z_ref(float angle)
Rotate the object around the z-axis of the reference CS.
Line & rotate_x(float angle)
Rotate the object around the x-axis of its CS.
Line & rotate_x_ref(float angle)
Rotate the object around the x-axis of the reference CS.
Line & rotate_z(float angle)
Rotate the object around the z-axis of its CS.
Line & apply_transform(const HomTransform &t)
Apply a transformation to the line.
virtual float z() const
RO-getter for z.
Line(const HomPoint &p, const HomVector &v)
Constructor.
Well, what can one say about a straight line?
virtual float x() const
RO-getter for x.
Line & trans(float trans_x, float trans_y, float trans_z)
Translate the object wrt.