19 _pos(0.0f, 0.0f, 0.0f),
29 STTransform(
const LPoint3 &pos, PN_stdfloat rotate, PN_stdfloat scale) :
40 STTransform(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z, PN_stdfloat rotate, PN_stdfloat scale) :
53 _rotate(copy._rotate),
61 INLINE
void STTransform::
64 _rotate = copy._rotate;
74 const SpeedTree::Vec3 &pos = instance.GetPos();
75 _pos.set(pos[0], pos[1], pos[2]);
76 _rotate = rad_2_deg(instance.GetRotationAngle());
77 _scale = instance.GetScale();
85 operator SpeedTree::CInstance ()
const {
86 SpeedTree::CInstance instance;
87 instance.SetPos(SpeedTree::Vec3(_pos[0], _pos[1], _pos[2]));
88 instance.SetRotation(deg_2_rad(_rotate));
89 instance.SetScale(_scale);
99 return TransformState::make_pos_hpr_scale(_pos,
100 LVecBase3(_rotate, 0.0f, 0.0f),
101 LVecBase3(_scale, _scale, _scale));
168 quat.set_hpr(LVecBase3(_rotate, 0.0f, 0.0f));
169 _pos += quat.xform(other.
get_pos()) * _scale;
170 _rotate += other._rotate;
171 _scale *= other._scale;