Quick walkthrough

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Guest

Quick walkthrough

Post by Guest »

hey folks... Just reading the special effects tutorial and trying some stuff out. I can get things to work (ish) but I was wondering if anyone could go through the following code and explain it line for line, it'd be really appreciated as I'm not quite sure what its doing

Code: Select all

scene::IAnimatedMesh* mesh = smgr->getMesh(
		"../../media/room.3ds");

	smgr->getMeshManipulator()->makePlanarTextureMapping(
		mesh->getMesh(0), 0.004f);

	scene::ISceneNode* node = 0;

	node = smgr->addAnimatedMeshSceneNode(mesh);
	node->setMaterialTexture(0,	driver->getTexture("../../media/wall.jpg"));
	node->getMaterial(0).EmissiveColor.set(0,0,0,0);
Thanks :D
Guest

Post by Guest »

Code: Select all

//create an IAnimatedMesh called "mesh" and load the model "room.3ds"
 scene::IAnimatedMesh* mesh = smgr->getMesh(
      "../../media/room.3ds");

//tell the scenemanager to create a planar texture mapping on the mesh (the way the texture gets mapped on the mesh)
   smgr->getMeshManipulator()->makePlanarTextureMapping(
      mesh->getMesh(0), 0.004f);


// create an ISceneNode called "node"
   scene::ISceneNode* node = 0;

// attach the mesh "mesh" to the node so that it has a mesh to display
   node = smgr->addAnimatedMeshSceneNode(mesh);

// apply the first texture (0) called "wall.jpg" to the node
   node->setMaterialTexture(0,   driver->getTexture("../../media/wall.jpg"));

// set the emissive color (ammount of light which the node emits) to 0 
   node->getMaterial(0).EmissiveColor.set(0,0,0,0);
hope that i could explain well enough :)
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

you sure did GFX! :wink:
Th3one
Posts: 17
Joined: Fri Nov 25, 2005 11:43 am

Post by Th3one »

yep...cheers m8 :D
Post Reply