Ported following examples to osgViewer:
osgparticleeffects osgphotoalbum osgpick osgpoints osgpointsprite osgprecipitation osgprerender osgprerendercubemap osgreflect osgscalarbar osgscribe osgsequence osgplanets
This commit is contained in:
@@ -119,9 +119,9 @@ public:
|
||||
|
||||
virtual void computeHomePosition();
|
||||
|
||||
virtual void home(const GUIEventAdapter& ee,GUIActionAdapter& aa) { _current->home(ee,aa); }
|
||||
virtual void home(const GUIEventAdapter& ee,GUIActionAdapter& aa) { if (_current.valid()) _current->home(ee,aa); }
|
||||
|
||||
virtual void init(const GUIEventAdapter& ee,GUIActionAdapter& aa) { _current->init(ee,aa); }
|
||||
virtual void init(const GUIEventAdapter& ee,GUIActionAdapter& aa) { if (_current.valid()) _current->init(ee,aa); }
|
||||
|
||||
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
|
||||
|
||||
|
||||
@@ -57,6 +57,12 @@ class OSGUTIL_EXPORT LineSegmentIntersector : public Intersector
|
||||
IndexList indexList;
|
||||
RatioList ratioList;
|
||||
unsigned int primitiveIndex;
|
||||
|
||||
const osg::Vec3d& getLocalIntersectPoint() const { return localIntersectionPoint; }
|
||||
osg::Vec3d getWorldIntersectPoint() const { return matrix.valid() ? localIntersectionPoint * (*matrix) : localIntersectionPoint; }
|
||||
|
||||
const osg::Vec3& getLocalIntersectNormal() const { return localIntersectionNormal; }
|
||||
osg::Vec3 getWorldIntersectNormal() const { return matrix.valid() ? osg::Matrix::transform3x3(osg::Matrix::inverse(*matrix),localIntersectionNormal) : localIntersectionNormal; }
|
||||
};
|
||||
|
||||
typedef std::multiset<Intersection> Intersections;
|
||||
|
||||
Reference in New Issue
Block a user