Hi Robert,
robertosfield wrote:
> Hi WeSee,
>
> Have you ported your submissions across to use
> setUserValue/getUserValue() on the Drawables? I'll wait to do a
> review till you post changes based on this suggest as I feel this is
> certainly the way to go. I don't know if you did it with your
> original changes but I'd also suggest make assignment of this of extra
> data as a osgDB::Options specified control as only a small number of
> users will require it and I don't wish other users to have a bigger
> and less efficient scene graph thanks to the unused data.
>
See attached my ported code, which fulfills:
- using of setUserValue()/getUserValue()
- user-value will be attached to Geode or Drawable
- actually 3 values will be added: SMC (surface), FID (feature) and IRC
(IRcolor). Its UserValue-names are < UA:SMC >, < UA:FID > and < UA:IRC >
(without spaces!)
- user-value will be attached to Geode or Drawable
- has an option (named preserveNonOsgAttrsAsUserData) for control whether the
UserValues should be attached (Default: no UserValues will be attached)
Reading out this values is very simple. Here is an example (uservalue-name
without spaces!):
signed short smc;
if (myGeode.getUserValue("< UA:SMC >", smc))
{
doSomethingWithTheGeodeAndItsSmc(myGeode, smc);
}
else
{
// geode has no SMC
}
I think now all the suggestions of the community are now integrated and we have
finally a outstanding solution. Robert, could you merge it?
Cheers
WeSee
@Paul Martz: Could you inform me, when the time is right for submitting the
exporting stuff?
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=52433#52433
Attachments:
http://forum.openscenegraph.org//files/openflightwithuserattributes_151.zip
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org