can't calculate inetria of a shpere

danharibo

20-04-2006 22:35:02

if i try to calcualte the inetria of a sphere using the ogrenewt::momentofinertia
i get a linker error:
ballmaze.obj : error LNK2001: unresolved external symbol "class Ogre::Vector3 __cdecl OgreNewt::MomentOfInertia::CalcSphereHollor(float,float)" (?CalcSphereHollor@MomentOfInertia@OgreNewt@@YA?AVVector3@Ogre@@MM@Z)
bin\Debug\ballmaze.exe : fatal error LNK1120: 1 unresolved externals

walaber

20-04-2006 22:47:57

I will try to investigate that.. are you sure the function name hasn't changed since you last compiled OgreNewt?

also there is now a generalized way to calculate moment of inertia with OgreNewt::ConvexCollision::calculateInertial() (I think that was the function name).

mysterycoder

21-04-2006 05:59:20

I think it's OgreNewt::ConvexCollision::calculateInertialMatrix(&inertia, &offset)

Just a quick question. Is that function only for convex hulls, or can it be used for other shapes too?

I'm under the impression that using shapes is faster than using convex hull, is that correct?

walaber

21-04-2006 07:19:58

that function will work for all convex shapes (so everything but TreeCollisions).

mysterycoder

21-04-2006 07:51:41

Ah, ok thanks :D

SomeFusion

10-08-2006 17:12:49

Sorry to revive this old therad but I had the same problem today and found the problem. This method is named wrong in the header file. It's in OgreNewt_Tools.h and should be calles

_OgreNewtExport Ogre::Vector3 CalcSphereHollow(Ogre::Real mass, Ogre::Real radius );

instead of

_OgreNewtExport Ogre::Vector3 CalcSphereHollor(Ogre::Real mass, Ogre::Real radius );

Hope this helps :)

Btw, its spelled correct in the .cpp file.