Hello Sajjadul,
Sajjadul Islam wrote:
> Hello Carsten,
>
>
> To summarise The Fields are the data holders of every node
yes. Strictly speaking they are the data holders of every FieldContainer
and Node IS A FieldContainer, i.e. it is a class that is derived from it.
> and they
> can be regarded as core as well like (Transform core, Material core,
> etc.....)
uhm, no. A Node HAS A NodeCore in the sense that each Node stores a
pointer to an object of a class that is derived from NodeCore. That
pointer is stored in a Field, because it is data that belongs to the
Node and (essentially) all data in the scenegraph is stored in Fields.
> To edit each of the core we have to create the corresponding nodes and
> do that inside the beginEditCP.........endEditCP block.
sorry, this part I don't understand.
To edit a FieldContainer's Fields, you have to surround the calls by the
appropriate beginEditCP/endEditCP calls. Since Node is a FieldContainer
that applies to a Node when you set its NodeCore with Node::setCore and
when you add children to the Node, etc.
In the same way Transform is derived from NodeCore which itself is
derived from FieldContainer, so setting the matrix of a Transform
requires that you surround the call to Transform::setMatrix with correct
beginEditCP/endEditCP calls.
> If Node is also is kind of field, we can add the multiple child,
> addChild() method, inside beginEditCP.......endEditCP block.
Nodes _have_ Fields (as do many other classes in OpenSG) and one of
those Fields stores the pointers to the Node's children; you can add
values to that Field by calling the Node::addChild function.
Hope it helps,
Carsten
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users