23 Nov 2015, 20:01
It's Amazing!
What means use of SetPosition (const Vector &pos) ?
What means use of SetPosition (const Vector &pos) ?
(23 Nov 2015, 19:33)Ketschak Wrote:(23 Nov 2015, 18:41)Flávio Rebouças Santos Wrote: I am trying to use the signature: SetRotation(const Vector & axis, Real angle)
Could you help-me with it?
void App::ColorCubeLogic::OnProcessTick(const Logic::IState* state) { static Double angleX = 0; static Double spinSpeed = 0.007; angleX += spinSpeed; angleX = Math::Fmod(angleX, Math::TWO_PI); Graph::Vector axis(Vector::ZERO_DIRECTION); axis.x = 1; axis.y = 1; axis.NormalizeAxisSelf(); mCubeTransform->SetRotation(axis, angleX);
The vector axis defines the rotation axis (45° between x and y).
The vector needs to have unit length.
This can be accomplished with axis.NormalizeAxisSelf();
✠ nnDnn ✠ The peace of Christ! ✠ nnDnn ✠