What it says on the tin: a place to discuss proposed new features.
ls129
Kobold
Posts: 26 Joined: Sun Sep 28, 2003 2:12 am
x 1
Contact:
Quote
0
login to like this post
Post
by ls129 » Tue Apr 19, 2005 3:30 pm
Haven't touched my ogre code in a while and i'm now trying to recompile stuff from last year and this code:
Code: Select all
Ypitch.FromAngleAxis(Ogre::Math::AngleUnitsToRadians(camnode->m_cam.CameraUpPitch), Ogre::Vector3::UNIT_X);
is giving me this error:
Code: Select all
EZPhysicsOgre.cpp(219) : error C2664: 'Ogre::Quaternion::FromAngleAxis' : cannot convert parameter 1 from 'Ogre::Real' to 'const Ogre::Radian &'
Its nice that Radian and Angle have replaced Real but shouldn't then AngleUnitsToRadians() return Radian ?
Update: i'm trying to read through the ogremath.h to understand the new convention..
ls129
Kobold
Posts: 26 Joined: Sun Sep 28, 2003 2:12 am
x 1
Contact:
Quote
0
login to like this post
Post
by ls129 » Tue Apr 19, 2005 4:11 pm
Changed the line to:
Code: Select all
Ypitch.FromAngleAxis(Ogre::Radian(camnode->m_cam.CameraUpPitch), Ogre::Vector3::UNIT_X);
now i dont get compilation error, just hope that it will have the desired effect.
jacmoe
OGRE Retired Moderator
Posts: 20570 Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:
Quote
0
login to like this post
Post
by jacmoe » Tue Apr 19, 2005 5:26 pm
What does 'CameraUpPitch' return? Real or Radian?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
ls129
Kobold
Posts: 26 Joined: Sun Sep 28, 2003 2:12 am
x 1
Contact:
Quote
0
login to like this post
Post
by ls129 » Tue Apr 19, 2005 5:45 pm
jacmoe wrote: What does 'CameraUpPitch' return? Real or Radian?
float
jacmoe
OGRE Retired Moderator
Posts: 20570 Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:
Quote
0
login to like this post
Post
by jacmoe » Tue Apr 19, 2005 6:02 pm
That's the problem, then. Real really is float typedef'd.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
sinbad
OGRE Retired Team Member
Posts: 19269 Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:
Quote
0
login to like this post
Post
by sinbad » Tue Apr 19, 2005 6:07 pm
If your value is in radians, then this is the correct way to do it. All angles in Ogre must be passed as Radian or Degree classes since 0.14 in order to ensure the units are explicit.