clone() doesn't work on octree node

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
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

clone() doesn't work on octree node

Post by Virion »

is it just me? tested on animated mesh scene node it works, but on octree node nothing comes out.
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

Post by aanderse »

looking at the source for 1.6 i see ISceneNode -> IMeshSceneNode -> COctTreeSceneNode
you'll notice neither IMeshSceneNode nor COctTreeSceneNode implement the clone method. you should write a patch to implement the cloning behaviour.
ent1ty
Competition winner
Posts: 1106
Joined: Sun Nov 08, 2009 11:09 am

Post by ent1ty »

IMeshSceneNode* nor COctTreeSceneNode* don't implement clone() because clone() is implemented in ISceneNode* and those two are just derived from it IMO.

EDIT: ok, I was wrong
Last edited by ent1ty on Mon Apr 26, 2010 3:35 pm, edited 1 time in total.
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps

Step back! I have a void pointer, and I'm not afraid to use it!
Ulf
Posts: 281
Joined: Mon Jun 15, 2009 8:53 am
Location: Australia

Post by Ulf »

ent1ty wrote:MeshSceneNode* nor COctTreeSceneNode* don't implement clone() because clone() is implemented in ISceneNode* and those two are just derived from it IMO.
No it's not.

Code: Select all

virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0)
{
	return 0; // to be implemented by derived classes
}
I can hear birds chirping
:twisted:

I live in the Eye of Insanity.
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

any other way to duplicate non-animated mesh without having to dig into irrlicht source code?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just clne the mesh via MeshManipulator, or rename the mesh and load it again. The latter should be much slower, though.
Post Reply