I have done some more work on the new attachment type that I submitted for review earlier this week. The changes are as follows:
* Added another attribute map attachment type that maps std::string to
OSG::FieldContainerPtr (inspired by Marcus' comment and input from
Allen Bierbaum and Dirk)
* Reduced the number of free functions to two, both of which are used for
easy retrieval of the attribute map attachment from an attachment
container
* Fixed the visibility to be external so that the attribute maps will be
shared on a cluster and serialized correctly (thanks to Dirk for the
clarification on that detail)
* Added a public override of the const version of getKeys() so that user
code can get read-only access to the keys in the attribute map
The first of those is probably the Big New Thing. The test program for that
code (testFCPtrAttributeMap.cpp) shows how a variety of field containers can
be stored in a single attribute map. For example:
OSG::beginEditCP(attr_map);
(*attr_map)["transform attribute"] = OSG::Transform::create();
(*attr_map)["geometry attribute"] = OSG::Geometry::create();
(*attr_map)["material attribute"] = OSG::SimpleMaterial::create();
OSG::endEditCP(attr_map);
Comments or suggestions?
-Patrick
--
Patrick L. Hartling | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
osg-attribute-map2.tar.bz2
Description: Binary data
signature.asc
Description: OpenPGP digital signature
