MindCalamity
20-09-2011 23:30:23
Me again, on my question spree 
The question this time around, is how to create a physical representation of my level, I merged all the immobile objects on my scene into one big mesh, exported to .flower, and converted to .nxs triangle mesh.
I have no idea how to create triangle geometry from the renderable and physical mesh, to be precise, I have no idea which shape description I should use, since BoxDescription is out of the question.
<edit>Damn, it seems like my code was totally wrong, I just fixed the arguments like this:
And BOOM, this is what I get:
So how exactly is Triangle Geometry created ?
Or am I wrong for even thinking that Triangle Geometry should be used for stuff like physical representations of game levels ?
</edit>
The question this time around, is how to create a physical representation of my level, I merged all the immobile objects on my scene into one big mesh, exported to .flower, and converted to .nxs triangle mesh.
I have no idea how to create triangle geometry from the renderable and physical mesh, to be precise, I have no idea which shape description I should use, since BoxDescription is out of the question.
<edit>Damn, it seems like my code was totally wrong, I just fixed the arguments like this:
NxOgre::Mesh* castleMesh = NxOgre::MeshManager::getSingleton()->load("ogre://castle.nxs", "Castle Physical");
NxOgre::TriangleGeometryDescription castleTriDesc;
castleTriDesc.mMass = 0;
castleTriDesc.mMesh = castleMesh;
GameFramework::getSingletonPtr()->mLog->logMessage("Creating Level...");
Critter::BodyDescription castleBodyDesc;
castleBodyDesc.mMass = 0;
NxOgre::TriangleGeometry* castleTriGeom = GameFramework::getSingletonPtr()->mRenderSystem->createBody(castleTriDesc, NxOgre::Vec3(0, 0, 0), "castle.mesh", castleBodyDesc);
GameFramework::getSingletonPtr()->mLog->logMessage("Level Created...");And BOOM, this is what I get:
1> GameState.cpp
1>src\GameState.cpp(212): error C2440: 'initializing' : cannot convert from 'Critter::Body *' to 'NxOgre::TriangleGeometry *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style castSo how exactly is Triangle Geometry created ?
Or am I wrong for even thinking that Triangle Geometry should be used for stuff like physical representations of game levels ?
</edit>