Made the more of the OSG's referenced object desctructors protected to ensure
that they arn't created on the stack inappropriately. Split the implemention of Matrix up so that it is a simple no referenced counted class and can be safefly created on the stack. To support referenced counting a seperate subclass now exists, this is RefMatrix which inherits from both Matrix and Object.
This commit is contained in:
@@ -51,8 +51,8 @@ class OSGUTIL_EXPORT Hit
|
||||
osg::NodePath _nodePath;
|
||||
osg::ref_ptr<osg::Geode> _geode;
|
||||
osg::ref_ptr<osg::Drawable> _drawable;
|
||||
osg::ref_ptr<osg::Matrix> _matrix;
|
||||
osg::ref_ptr<osg::Matrix> _inverse;
|
||||
osg::ref_ptr<osg::RefMatrix> _matrix;
|
||||
osg::ref_ptr<osg::RefMatrix> _inverse;
|
||||
|
||||
VecIndexList _vecIndexList;
|
||||
int _primitiveIndex;
|
||||
@@ -102,8 +102,8 @@ class OSGUTIL_EXPORT IntersectVisitor : public osg::NodeVisitor
|
||||
|
||||
IntersectState();
|
||||
|
||||
osg::ref_ptr<osg::Matrix> _matrix;
|
||||
osg::ref_ptr<osg::Matrix> _inverse;
|
||||
osg::ref_ptr<osg::RefMatrix> _matrix;
|
||||
osg::ref_ptr<osg::RefMatrix> _inverse;
|
||||
|
||||
typedef std::pair<osg::ref_ptr<osg::LineSegment>,osg::ref_ptr<osg::LineSegment> > LineSegmentPair;
|
||||
typedef std::vector< LineSegmentPair > LineSegmentList;
|
||||
|
||||
Reference in New Issue
Block a user