Best way to load several meshes?
Posted: Wed Feb 23, 2005 4:47 am
Hi, i have started out what hopefully will be my town. I have some houses, their textures and lightmaps. Successfully imported one of my houses and assigned collision to it. (based on the collision tutorial)
Do the following for each of my objetcs in order to make it work correctly?:
scene::IAnimatedMesh *mesh = smgr->getMesh("media/house1.obj");
scene::ISceneNode *node (0);
if (node) {
node->SetMaterialFlag(EMF_LIGHTING, false);
node ->setMAterialTexture (0, driver->getTexture ("media/house1.tga")); }
node->SetMaterialFlag(EMF_FOG, true); // i want fog on my scene
if (node){
selector= smgr ->createOctTreeTriangleSelector(
mesh ->getMesh(), node, 128);
node->setTriangleSelector(selector);
selectpor->(drop)
}
is there an alternative to it? where can i see a sample of loading different meshes (ok, collision tutorial has 3 faeries, but it seems they are instances of the one pointed out by faerie). I thought on making a class for all of my data, however just don't know how to implement it (class buildings which would contain collision and fog states). Still trying to learn c++
Sorry for so many newbie questions, i'm more on the art side of the pond. Thanks.
Do the following for each of my objetcs in order to make it work correctly?:
scene::IAnimatedMesh *mesh = smgr->getMesh("media/house1.obj");
scene::ISceneNode *node (0);
if (node) {
node->SetMaterialFlag(EMF_LIGHTING, false);
node ->setMAterialTexture (0, driver->getTexture ("media/house1.tga")); }
node->SetMaterialFlag(EMF_FOG, true); // i want fog on my scene
if (node){
selector= smgr ->createOctTreeTriangleSelector(
mesh ->getMesh(), node, 128);
node->setTriangleSelector(selector);
selectpor->(drop)
}
is there an alternative to it? where can i see a sample of loading different meshes (ok, collision tutorial has 3 faeries, but it seems they are instances of the one pointed out by faerie). I thought on making a class for all of my data, however just don't know how to implement it (class buildings which would contain collision and fog states). Still trying to learn c++
Sorry for so many newbie questions, i'm more on the art side of the pond. Thanks.