Hello:
I am developing an interface in QT to create 3D scenes; I thought
(and it's almos vital for me) I could create a SoCube for example from
an SoNode. I explain:
the fact is that I have a std Map of C++ And every Item of
a List (QlistViewItem as I am making It in QT) is relationed with an
SoNode, so, when I insert an item in the Qlist it must have a parent
especified by the user(SoSeparator,Sogroup..), I watch in the map for
the SoNode relating to this "parent" and I want to add the child to this
SoNode, but as it is not an SoSeparator, I can't access to the
"addChild" function, Is there anyway to do this creating a SoNode
variable, specifying its type (SoCube, SoSeparator...) and the access
its function
for example:
[........]
SoNode *Cube=new SoNode;
Cube->typeId(SoCube);--------------->This Is the function I am
watching for!!!
Cube->width=3.0;
[.......]
Thanks!
|