Hi Jaideep,
Jaideep Khadilkar wrote:
> Hi.......
>
> I am little bit confused.
> I want to attach some arbitrary data, to my nodes, such as a Number,or a
> vector or an array of numbers or a pointer or even a custom class
> object. How can I do that???
>
> I read about Field containers and creating a new field container and
> attaching.
> I thing it is related to the same thing I want to do. But it seems to be
> a long process. Is there any simple way that is already available. I
> know that there is a getName setName solution, but it is very limited, I
> can only attach a string with it and I want more.
>
> What do u do normally? Even if I can attach a void* to the node, I can
> put my all data in a class and indirectly attach it.
The best way is to write your own Attachment, that way you get all the
benefits of OpenSG classes (thread-safety, File I/O, Cluster
compatibility etc.), but it is a bit of work, especially for the first time.
If you don't care about these things you can use setVoidP() and
getVoidP(), which work like the Name counterparts.
Hope it helps
Dirk
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users