nargil
16-11-2008 14:45:38
1. Simply download http://get.nxogre.org/flour/libFlour32b.zip (use 7-zip if you have trouble extracting this archive)
2. Compile the project
3. Add libFlour.lib (or equivalent for debug/static) to your linker
4. If using DLL: copy libFlour.dll (or equivalent for debug) to your app bin dir (where you have nxogre.dll ogremain.dll and the physx dlls)
5. include libFlour.h to your projects cpp file
now you can use the following code
The lib is a copy&paste&edit form betajeans flour (0.3.2).
You still should use betajeans flour for baking things for you game. This lib is meant for editors where you need to scale & bake things in realtime.
License: MIT
It has been tested with:
- NxOgre 1.0.22'T5
- Ogre 1.6
- PhysX 2.8.1 SDK & 8.09.04 System software
Have fun.
2. Compile the project
3. Add libFlour.lib (or equivalent for debug/static) to your linker
4. If using DLL: copy libFlour.dll (or equivalent for debug) to your app bin dir (where you have nxogre.dll ogremain.dll and the physx dlls)
5. include libFlour.h to your projects cpp file
now you can use the following code
//create a triangle mesh
NxOgre::Resources::Mesh* mymesh = libFlour::BakeTriangleMesh(mSceneMgr, "robot.mesh");
NxOgre::Actor* a = mScene->createActor("robotmesh", new NxOgre::TriangleMesh(mymesh), NxOgre::Pose(0,0,0), "static: yes");
//create a triangle mesh with a certain scale
NxOgre::Resources::Mesh* mymesh = libFlour::BakeTriangleMesh(mSceneMgr, "robot.mesh", Ogre::Vector3(0.2,0.2,0.2));
NxOgre::Actor* a = mScene->createActor("robotmesh", new NxOgre::TriangleMesh(mymesh), NxOgre::Pose(0,0,0), "static: yes");
//create a triangle mesh and save it as OgreMeshName.mesh.nxs
NxOgre::Resources::Mesh* mymesh = libFlour::BakeTriangleMesh(mSceneMgr, "robot.mesh", Ogre::Vector3(0.2,0.2,0.2), true);
NxOgre::Actor* a = mScene->createActor("robotmesh", new NxOgre::TriangleMesh(mymesh), NxOgre::Pose(0,0,0), "static: yes");
//create a triangle mesh and save it as a specified filename
NxOgre::Resources::Mesh* mymesh = libFlour::BakeTriangleMesh(mSceneMgr, "robot.mesh", Ogre::Vector3(0.2,0.2,0.2), true , "file://yourfile.nxs");
NxOgre::Actor* a = mScene->createActor("robotmesh", new NxOgre::TriangleMesh(mymesh), NxOgre::Pose(0,0,0), "static: yes");
//create a convex mesh
NxOgre::Resources::Mesh* mymesh = libFlour::BakeConvexMesh(mSceneMgr, "robot.mesh", ...);
NxOgre::Actor* a = mScene->createActor("robotmesh", new NxOgre::Convex(mymesh), NxOgre::Pose(0,0,0), "static: yes");
The lib is a copy&paste&edit form betajeans flour (0.3.2).
You still should use betajeans flour for baking things for you game. This lib is meant for editors where you need to scale & bake things in realtime.
License: MIT
It has been tested with:
- NxOgre 1.0.22'T5
- Ogre 1.6
- PhysX 2.8.1 SDK & 8.09.04 System software
Have fun.