Also interesting to know that you found out this bug just one week ago.
Additionally I have to mention, that the Quaternion --> Euler Angle
conversion returns values with different co-domains
For example Quaternion.Yaw
Co-domain in Ogre: -180 .. 180
Co-domain in Mogre: -90 .. 90
As written in my older post - the reason is an other Euler Angle combination which is mathematically correct, but different than we want to have.
In the paging topic I read that you modified something in the Mogre code and compiled it.
So I suppose you would have the technical knowledge to apply a bugfix
Also it would be very useful to apply the bugfix in a special way, so that the modification will not be killed (overwritten) when the autowrapping tool re-wrapps Ogre again.
I hope you know what I mean.
For the bugfix we need to choose between 2 options
instead of System.MathFunction()
. . . . . PRO: Easy to do. + Returns the same value as Ogre for shure.
. . . . . CON: Could be slower than pure C# code (because of wrapping layer). For heavy usage (multiple usage per each frame) maybe
is causes lower FPS rates.
Look to the special internal Ogre code of Sin(), Cos() etc. and port them to C#
. . . . . PRO: No CPU load by wrapping layer
. . . . . CON: Needs more work for searching/porting the related code (+1 hour??) and should be tested if it really returns the same values as Ogre[/list]
A testing code snippet
for several rotation states I published here
For each rotation state it converts Euler Angles --> Quaternion --> Euler Angles.
My test code was written for a co-domain check, but it also can be useful for testing/comparing after the bugfix.
For example run the code with Ogre (C++) and with Mogre. Print the result of each state and compare them (many lines) by a comparison tool (e.g. the great UltraCompare ... the free version would be good enough for this purpose
If you are interested to fix the bugs, I would help you
I would search for the related math functions and the C++ code snippets.
Then you could port them to C++ and embed them into the Mogre wrapper (in the correct way for long-term usage).
Nice would be a re-compilation of Mogre to have the bugfix in the binaries, too. But this is optional. More important is to have the bugfix in the souce code. Binaries can be done somewhen later.
What do you think about?