Converting from HPB to Quaternion
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2004 at 09:52, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.500
Platform: Mac ;
Language(s) : C.O.F.F.E.E ; C++ ;---------
I've been storing HPB rotations in my file format I export from C4D and load them in to a quaternion to use in game. Now I'm noticing some of the rotations are upside down or translated in the wrong direction (which is probably not related to any rotations going on), so I figured post my code and see if I'm doing anything wrong.LVQuaternion::LVQuaternion(float H, float P, float B)
{
*this = LVQuaternion(H, 0,1,0) * LVQuaternion(P, 1,0,0) * LVQuaternion(B, 0,0,1);
}Where one of the constructors excepts any angle in degrees and the axis to rotate around.
Am I doing anything blatently wrong? Is the order wrong?
Thanks,
Derek -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2004 at 20:32, xxxxxxxx wrote:
Howdy,
Your code looks weird. Is it game engine code or C4D SDK code?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/12/2004 at 21:06, xxxxxxxx wrote:
Game engine, sorry.
(COFFEE for the plugin, C++ for the game)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/12/2004 at 07:08, xxxxxxxx wrote:
Howdy,
The Cinema 4D C++ SDK has a quaternion class. Maybe if you used C++ instead of C.O.F.F.E.E. and converted HPB to quaternion in your plugin first before exporting, you might get better results?
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/12/2004 at 23:11, xxxxxxxx wrote:
Yea, if only my whole plugin wasn't mostly already written in COFFEE and if I knew the C++ C4D plugin setup I'd give it some serious thought
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/12/2004 at 10:00, xxxxxxxx wrote:
Howdy,
Well, moving from C.O.F.F.E.E. to C++ wasn't really that difficult for me with the help of this tutorial:
http://www.astrofish.com/tutorials/c4dtagplugin/index.htmlAdios,
Cactus Dan