ISceneNode cloneMembers + ITriangleSelector

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

ISceneNode cloneMembers + ITriangleSelector

Post by aanderse »

Found a bug in the protected cloneMembers method of the ISceneNode class.

If you look in the code you'll see the line:

Code: Select all

setTriangleSelector(toCopyFrom->TriangleSelector);
Problem here is that the triangle selector is not copied/cloned when I clone my scene node. This is no good because a triangle selector is tied to a specific scene node, so if I delete the old scene node but then used the triangle selector from the cloned node I'll likely get a crash, because the triangle selector will try to access the old scene node (which it is tied to).

I'm not sure what the devs want to do here... my guess is adding a copying/cloning implementation to the triangle selector is the way to go.

Comments?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

IMHO, triangle selectors are, just as animators, external to ISceneNodes. So a cloning of a scene node wouldn't clone any of those. Not sure, though, why it was copied.
aanderse
Posts: 155
Joined: Sun Aug 10, 2008 2:02 pm
Location: Canada

Post by aanderse »

Well the animators are cloned and the triangle selectors are not.
Cloning the animators and triangle selectors would be nice... but if you say the animators and triangle selectors are separate from scene nodes then we remove the animator cloning from the scene node class I'll be happy with that answer.

You're happy to have the animator cloning removed then?
Post Reply