Introduced typedef vec_type and value_type into LineSemgment class to allow easier
switching between double and float versions.
This commit is contained in:
@@ -127,15 +127,15 @@ class OSGMANIPULATOR_EXPORT TranslateInLineCommand : public MotionCommand
|
||||
|
||||
TranslateInLineCommand();
|
||||
|
||||
TranslateInLineCommand(const osg::Vec3& s, const osg::Vec3& e);
|
||||
TranslateInLineCommand(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e);
|
||||
|
||||
virtual bool execute();
|
||||
virtual bool unexecute();
|
||||
virtual void applyConstraint(const Constraint*);
|
||||
|
||||
inline void setLine(const osg::Vec3& s, const osg::Vec3& e) { _line->start() = s; _line->end() = e; }
|
||||
inline const osg::Vec3& getLineStart() const { return _line->start(); }
|
||||
inline const osg::Vec3& getLineEnd() const { return _line->end(); }
|
||||
inline void setLine(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e) { _line->start() = s; _line->end() = e; }
|
||||
inline const osg::LineSegment::vec_type& getLineStart() const { return _line->start(); }
|
||||
inline const osg::LineSegment::vec_type& getLineEnd() const { return _line->end(); }
|
||||
|
||||
inline void setTranslation(const osg::Vec3& t) { _translation = t; }
|
||||
inline const osg::Vec3& getTranslation() const { return _translation; }
|
||||
|
||||
@@ -92,13 +92,15 @@ class OSGMANIPULATOR_EXPORT LineProjector : public Projector
|
||||
|
||||
LineProjector();
|
||||
|
||||
LineProjector(const osg::Vec3& s, const osg::Vec3& e);
|
||||
LineProjector(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e);
|
||||
|
||||
inline void setLine(const osg::Vec3& s, const osg::Vec3& e) { _line->start() = s; _line->end() = e; }
|
||||
inline const osg::Vec3& getLineStart() const { return _line->start(); }
|
||||
inline osg::Vec3& getLineStart() { return _line->start(); }
|
||||
inline const osg::Vec3& getLineEnd() const { return _line->end(); }
|
||||
inline osg::Vec3& getLineEnd() { return _line->end(); }
|
||||
inline void setLine(const osg::LineSegment::vec_type& s, const osg::LineSegment::vec_type& e) { _line->start() = s; _line->end() = e; }
|
||||
|
||||
inline const osg::LineSegment::vec_type& getLineStart() const { return _line->start(); }
|
||||
inline osg::LineSegment::vec_type& getLineStart() { return _line->start(); }
|
||||
|
||||
inline const osg::LineSegment::vec_type& getLineEnd() const { return _line->end(); }
|
||||
inline osg::LineSegment::vec_type& getLineEnd() { return _line->end(); }
|
||||
|
||||
/**
|
||||
* Calculates the object coordinates (projectedPoint) of a window
|
||||
|
||||
Reference in New Issue
Block a user