Tom
31-08-2008 10:46:07
I'm trying to create a vector with absolute values, but ogre.Math.Abs keeps returning radians, instead of floats (as it should be, as I'm passing it floats). Here is an example:
This is the error I'm getting:
So for some reason or another ogre.Math.Abs() is returning Radians instead of floats like it should be. I've double checked to make sure boundingBoxMin and Max are both Vector's and they are. Also to be sure I printed ogre.Math.Abs(boundingBoxMax.x-boundingBoxMin.x) and it is indeed returning a Radian object. Printing just boundingBoxMax.x-boundingBoxMin.x returns a float, if that helps at all.
Oh and I'm using Python-Ogre 1.2 rc2
entitySize = ogre.Vector3(ogre.Math.Abs(boundingBoxMax.x-boundingBoxMin.x),ogre.Math.Abs(boundingBoxMax.y-boundingBoxMin.y),ogre.Math.Abs(boundingBoxMax.z-boundingBoxMin.z))
This is the error I'm getting:
ArgumentError: Python argument types in
Vector3.__init__(Vector3, Radian, Radian, Radian)
did not match C++ signature:
__init__(struct _object *, float scaler)
__init__(struct _object *, float * r)
__init__(struct _object *, int const * afCoordinate)
__init__(struct _object *, float const * afCoordinate)
__init__(struct _object *, float fX, float fY, float fZ)
__init__(struct _object *)
__init__(struct _object *)
So for some reason or another ogre.Math.Abs() is returning Radians instead of floats like it should be. I've double checked to make sure boundingBoxMin and Max are both Vector's and they are. Also to be sure I printed ogre.Math.Abs(boundingBoxMax.x-boundingBoxMin.x) and it is indeed returning a Radian object. Printing just boundingBoxMax.x-boundingBoxMin.x returns a float, if that helps at all.
Oh and I'm using Python-Ogre 1.2 rc2