23 _pos(0.0f, 0.0f, 0.0f),
48 STTransform(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat rotate, PN_stdfloat scale) :
63 _rotate(copy._rotate),
73 INLINE
void STTransform::
76 _rotate = copy._rotate;
88 const SpeedTree::Vec3 &pos = instance.GetPos();
89 _pos.set(pos[0], pos[1], pos[2]);
90 _rotate = rad_2_deg(instance.GetRotationAngle());
91 _scale = instance.GetScale();
101 operator SpeedTree::CInstance ()
const {
102 SpeedTree::CInstance instance;
103 instance.SetPos(SpeedTree::Vec3(_pos[0], _pos[1], _pos[2]));
104 instance.SetRotation(deg_2_rad(_rotate));
105 instance.SetScale(_scale);
116 operator CPT(TransformState) ()
const {
117 return TransformState::make_pos_hpr_scale(_pos,
208 _rotate += other._rotate;
209 _scale *= other._scale;
This is the base class for all three-component vectors and points.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
LVecBase3f xform(const LVecBase3f &v) const
Transforms a 3-d vector by the indicated rotation.
void set_hpr(const LVecBase3f &hpr, CoordinateSystem cs=CS_default)
Sets the quaternion as the unit quaternion that is equivalent to these Euler angles.
This is the base quaternion class.