THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/04/2010 at 15:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ; C++ ;
---------
This C++ code allows me to rotate an object explicitly around it's axis bands (strict local rotations)... it also moves the object along it's axis handles, but that's not part of the problem... it's just the rotations. Here's the code:
matRot=HPBToMatrix(vecRot); //vecRot is the rotation transformation vector. Basically, the input
trans = trans ^ matRig; //trans is the pos transformation vector, transformed into object's space
matRig.off = op->GetPos() +trans; //trans added to the object... propulsion, basically.
matRig=matRig*matRot; //transform rotation matrix into object's space
op->SetMg(matRig);
Is this possible in COFFEE? The functions that are giving me the trouble are HPBToMatrix() and the multiplying of the 2 matrices in line 4. How do I do those things in COFFEE? I'll be honest, matrices have always confused me a bit;)
In the past, I've used a child object to generate the rotation matrix (via xpresso), and the MoveObject() function posted by Mikael Sterner from years ago here. But I'd like to be able to accomplish the rotations without the need for a child object.
thanks,
kvb