Hi Chris,

Is there a reason to why you don't use setUserData(osg::Referenced*) ?
If you provide the proper read/write routines for your osg::Referenced
derived class it would also persist across .osg file writes/reads.

Mattias

On Sun, Nov 29, 2009 at 11:10 PM, Chris 'Xenon' Hanson
<xe...@alphapixel.com> wrote:
>  I'm looking for a way to annotate nodes with numeric information at runtime. 
> The data
> need not be stored during scenegraph writes, but I don't mind if it is. I've 
> used the
> Description before for similar purposes, but you can't precisely and 
> reversibly store a
> floating-point value in a string.
>
>  I'm considered extending the Description API to support storing, and 
> search/retrieving
> typed key=value pairs (MYVALUE_FP, 3.14159265) in the description container.
> Non-text-compatible types like floats/doubles would be stored by converting 
> the FP value
> to the actual binary value, then encoding that binary value as text, either 
> as decimal,
> hex, or base64.
>
>  Is there already a good way to do this, or is this a technique that others 
> would find
> useful in core OSG?
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
> PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
> "There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to