Does somebody use Cosmo3D & Optimizer ?

How can I finish some rotation in one step?
in my program if I do like list below:

m_pTransform->setRotation(0.0f, 0.1f, 0.0f, CS_DEG2RAD(angle1));
m_pTransform->setRotation(1.0f, 0.1f, 0.0f, CS_DEG2RAD(angle2));

m_pDrawAction->apply(m_pRoot);

the result is only the sectond rotation.
Anybody can tell me how to do it ?
Thanks.

If you try this ?


m_pTransform->setRotation(0.0f, 0.1f, 0.0f, CS_DEG2RAD(angle1));

m_pDrawAction->apply(m_pRoot);

m_pTransform->setRotation(1.0f, 0.1f, 0.0f, CS_DEG2RAD(angle2));

m_pDrawAction->apply(m_pRoot);


Or you can make a loop with the angle value in a board.

for (i = 0; i < 2; i ++)
{
m_pTransform->setRotation(0.0f, 0.1f, 0.0f, CS_DEG2RAD(tab(i)));

m_pDrawAction->apply(m_pRoot);
}

zming,

There are several ways to do what you want, one of these is:

csRotation rot1(0.0f, 0.1f, 0.0f, CS_DEG2RAD(angle1)), rot2(1.0f, 0.1f, 0.0f, CS_DEG2RAD(angle12));

rot1.mult(rot2, rot1); //rot2 * rot1
m_pTransform->setRotation(rot1);
m_pDrawAction->apply(m_pRoot);

Let me know if it works.