[fixed]How to clone 'DummyTransformationSceneNodes'

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
Voxel
Posts: 8
Joined: Wed Feb 23, 2011 9:04 am

[fixed]How to clone 'DummyTransformationSceneNodes'

Post by Voxel »

Hi,

I read in a Collada file with a composite scene node structure. Here a short trace of the structure with scene node name and scene node type:

Code: Select all

 
"MyNode2" dmmy
    "MyNode-mesh" mesh
        "MyNode_001" dmmy
            "MyNode_002-mesh" mesh
        "MyNode_002" dmmy
            "MyNode_002-mesh" mesh
 

If I want to apply a position to that node I have to include a parent (empty) node because of the 'DummyTransformationSceneNode'.

But when I want to make a copy of that node using the clone() method the node stucture will not be cloned because 'DummyTransformationSceneNode' does not implement the clone() method and the ISceneNode::clone() method does nothing.

I think I have two options to clone the node structure:
1. Reading the Collada file multiple times adding new parent (empty) scene nodes.
2. Writing a 'clone' function out of the box.

What do you think would be the best way to go? Do you have any other ideas?
Maybe a last question: Can someone tell me why clone method is not implemented for 'DummyTransformationNodes'?

Hope I could make myself understood.

Thanks,
Voxel
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Not implemented clone... hm... basically that's just missing. Shouldn't be that hard to implement for DummyTransformationSceneNode, I'll put it on my todo (but might take a few days - I got already a few other bugs on it for this week).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Voxel
Posts: 8
Joined: Wed Feb 23, 2011 9:04 am

Post by Voxel »

CuteAlien, thank you for your feedback!

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

Re: How to clone 'DummyTransformationSceneNodes'

Post by hybrid »

Looks like this was fixed already. Do we need a serialize/deserialize here as well?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: [fixed]How to clone 'DummyTransformationSceneNodes'

Post by CuteAlien »

Wish I knew why I didn't add serialization as well... I think it should be there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply