A little thing about printing Quaternions

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
manowar
Orc
Posts: 419
Joined: Thu Apr 07, 2005 2:11 pm
Location: UK
Contact:

A little thing about printing Quaternions

Post by manowar »

Hello

I have noticed a little thing about printing quaternions using
std::cout << mQuat << std::endl;

The result is displayed in the form 'Quaternion(x,y,z,w)' but in the constructor we have to specify the parameters in that order: Quaternion(w,x,y,z). I think it would be nice to match the display with the quaternion constructor. What do you think ?

I was saving/reading some data in a text file and I spent quite a long time trying to understand what was wrong ;)

Let me know what you think ?

Eric
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 7
Contact:

Post by haffax »

Yeah, I too stumbled into this trap once. ;)
Anyway, just provide a patch for this and see if it gets committed.
team-pantheon programmer
creators of Rastullahs Lockenpracht
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

I agree that the order should be the same, I'll look into what ramifications it would have on other code.
User avatar
Game_Ender
Ogre Magi
Posts: 1269
Joined: Wed May 25, 2005 2:31 am
Location: Rockville, MD, USA

Post by Game_Ender »

nfz wrote:I agree that the order should be the same, I'll look into what ramifications it would have on other code.
Hopefully not much, assuming you are just changing the print order. There might be a few users that have to rework some text logging stuff, but I don't think there would be many.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Huh? I thought I changed this already a long time ago. Must have slipped, sorry.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

changes made to cvs v1-0.
User avatar
manowar
Orc
Posts: 419
Joined: Thu Apr 07, 2005 2:11 pm
Location: UK
Contact:

Post by manowar »

That was quick ;) I barely had the time to learn how to make a patch ;)

Thank you
Post Reply