getting ogreode compiling in eclipse

G30n3t!C

16-11-2008 16:15:15

hi @ all!

i'm currently working on a project and need collision detection, for this purpose i've choosen ogreode (forward-looking for adding physics), my ide is eclipse, my ogre version is 1.4.9 (the precompiled one), my ode version is 0.10.1 (latest) and my ogreode is the latest from svn repository.

i managed compiling ode, stuck in compiling ogreode (i just loaded the ogreaddons directory, not the whole svn stuff) and copied .h files and srces of ogreode to my project, linked them correctly, removed old ode- includes from my ogresdk and have following problems while compiling now:

1. in ode/common.h line 115: typedef uint32 dTriIndex;
'uint32' does not name a type

2. in ode/collision_trimesh.h line 98 + 102:
/*
* Simple build. Single/double precision based on dSINGLE/dDOUBLE!
*/
ODE_API void dGeomTriMeshDataBuildSimple(dTriMeshDataID g,
const dReal* Vertices, int VertexCount,
const dTriIndex* Indices, int IndexCount);
/* same again with a normals array (used as trimesh-trimesh optimization) */
ODE_API void dGeomTriMeshDataBuildSimple1(dTriMeshDataID g,
const dReal* Vertices, int VertexCount,
const dTriIndex* Indices, int IndexCount,
const int* Normals);

i guess because dTriIndex isn't set...

what am i doing wrong?

I don't now if this problem has something to do with ogreode or ode, so, sry for possibly posting it in the wrong forum

thanks in advance and sry for my cruel english XD

rewb0rn

16-11-2008 19:46:12

Try Ogre::uint32 or ode::uint32, one of these should work.

G30n3t!C

17-11-2008 11:37:49

thank you, this helped a lot, but i ran into the next error XD

some similar issue is discussed in this thread:
http://www.ogre3d.org/phpBB2addons/view ... 6f4e2718c6

but i tried adding the mentioned functions, but this produced only new errors, maybe the solution for this issue at my current ogre version is another one, unlike discussed in the linked thread above

'class Ogre::Renderable::Visitor' has not been declared

i looked up the ogre reference for my version and there is no class under Renderable named Visitor o.O

dermont

18-11-2008 13:06:53

If you don't want to update to 1.6.0 for version 1.4.9 you'll probably need to update some of your header/source files:

a) update your header files for visitRenderables

#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR > 4
void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false) {}
#endif


b) update the headers/ src for getWorldOrientation / getWorldPosition, e.g.

OgreOdeDebugContact.h

#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR > 4
const Ogre::Quaternion &_getDerivedOrientation(void) const;
const Ogre::Vector3 &_getDerivedPosition(void) const;
#else
const Ogre::Quaternion& getWorldOrientation(void) const;
const Ogre::Vector3& getWorldPosition(void) const;
#endif


OgreOdeDebugContact.cpp

#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR > 4
const Quaternion& DebugContactText::_getDerivedOrientation(void) const
#else
const Quaternion& DebugContactText::getWorldOrientation(void) const
#endif
{
assert(mpCam);
return const_cast<Quaternion&>(mpCam->getDerivedOrientation());
}
//------------------------------------------------------------------------------------------------
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR > 4
const Vector3& DebugContactText::_getDerivedPosition(void) const
#else
const Vector3& DebugContactText::getWorldPosition(void) const
#endif
{
assert(mParentNode);
return mParentNode->_getDerivedPosition();
}



c) Uncomment all setNormaliseNormals in the demos.

//entity->setNormaliseNormals(true);
entity->setNormaliseNormals(true);

G30n3t!C

18-11-2008 13:58:35

thanks man, i did all correction mentioned in your previous post except the one of point c, because i don't have them in my project (i think i don't need them compiled...)

now i am getting the error:
initializing argument 4 of `void dGeomTriMeshDataBuildSimple(dxTriMeshData*, const dReal*, int, const dTriIndex*, int)' OgreOdeTriangleMeshData.cpp Core_Physics/Sources/physics/ogreOde 48 C/C++ Problem
and
invalid conversion from `OgreOde::dTriIndex*' to `const dTriIndex*' OgreOdeTriangleMeshData.cpp Core_Physics/Sources/physics/ogreOde 48 C/C++ Problem

as you can see both from line 48 in the file OgreOdeTriangleMeshData.cpp:

dGeomTriMeshDataBuildSimple(_data, (const dReal*)_vertices, (int)vertex_count, (dTriIndex*)_indices, (int)index_count);

btw: rewb0rn and dermont, thank you a lot, you are my great heros ^^