Adding additional properties to sceneNodes...
Posted: Sun May 30, 2010 11:02 am
Hi folks,
I need to add additonal properties to my sceneNodes. As I'm rather new to all this, I'd apprciate some advice as to what is the standard/best way to do this.
So far I can think of 2 following ways:
1. Use vector arrays for each type of property. When a node is created, push an elemnt into every array to keep array indices match node IDs. Assign the node same ID as the array index. This way we I could always find the right property for the right node.
2. Create seperate class/classes for the additional properties. Match by IDs to find right property for th node. But if to do this, should I derive from ISceneNode or write totally seperate class/classes?
Also, which would be most memory-efficient way?
Thanks in advance for any advice/hints/links.
/regards
I need to add additonal properties to my sceneNodes. As I'm rather new to all this, I'd apprciate some advice as to what is the standard/best way to do this.
So far I can think of 2 following ways:
1. Use vector arrays for each type of property. When a node is created, push an elemnt into every array to keep array indices match node IDs. Assign the node same ID as the array index. This way we I could always find the right property for the right node.
2. Create seperate class/classes for the additional properties. Match by IDs to find right property for th node. But if to do this, should I derive from ISceneNode or write totally seperate class/classes?
Also, which would be most memory-efficient way?
Thanks in advance for any advice/hints/links.
/regards