addArrowMesh

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
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

addArrowMesh

Post by Dr.Bunshin »

Hello everyone!

I have not been around here in a while. Its nice to see some familiar aliases :)

How do you use addArrowMesh? Can someone provide an example?
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Assuming you are using the release version of Irrlicht [v.1.3.1], then you would write

Code: Select all

// this creates a named mesh and adds it to the mesh cache
// if you call addArrowMesh() with the same name, it will give
// you the original arrow instead of creating a new one.
scene::IAnimatedMesh* mesh = smgr->addArrowMesh("red-arrow,
  video::SColor(255,255,0,0),
  video::SColor(255,255,0,0));

// here you create a scene node for the given mesh. this is
// the hook into the scene graph. without this you would need
// to manually draw the arrow mesh.
scene::ISceneNode* node = smgr->addMeshSceneNode(mesh->getMesh(0));
// rotate, scale, translate node to move the arrow around...
Dr.Bunshin
Posts: 34
Joined: Sat Mar 31, 2007 8:38 pm

Post by Dr.Bunshin »

Tanks! It all come together :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, the change of parameters happend after the 1.3.1 release. The original order was:

Code: Select all

addArrowMesh(const c8* name, u32 tesselationCylinder, u32 tesselationCone, f32 height, f32 cylinderHeight, f32 width0,f32 width1, video::SColor vtxColor0, video::SColor vtxColor1);
Everything without default parameters.
Post Reply