TuttleOFX
1
|
00001 #ifndef _TUTTLE_PLUGIN_POINTINTERACT_HPP_ 00002 #define _TUTTLE_PLUGIN_POINTINTERACT_HPP_ 00003 00004 #include "InteractInfos.hpp" 00005 #include "InteractObject.hpp" 00006 #include <ofxsParam.h> 00007 00008 namespace tuttle { 00009 namespace plugin { 00010 namespace interact { 00011 00012 class PointInteract : public InteractObject 00013 { 00014 public: 00015 PointInteract( const InteractInfos& infos ); 00016 virtual ~PointInteract() = 0; 00017 00018 protected: 00019 const InteractInfos& _infos; 00020 00021 public: 00022 double getTime() const { return _infos._effect->timeLineGetTime(); } 00023 virtual Point2 getPoint() const = 0; 00024 virtual void setPoint( const Scalar x, const Scalar y ) = 0; 00025 00026 virtual Point2 getPosition() const { return getPoint(); } 00027 virtual void setPosition( const Point2& p ) { setPoint(p.x, p.y); } 00028 virtual void setPositionX( const Scalar x ) { setPoint( x, getPoint().y ); } 00029 virtual void setPositionY( const Scalar y ) { setPoint( getPoint().x, y ); } 00030 00031 virtual double getMarge() const { return _infos._marge * _infos._projectSize.x; } 00032 00033 virtual bool draw( const OFX::DrawArgs& args ) const; 00034 00035 virtual MotionType intersect( const OFX::PenArgs& args ); 00036 virtual bool isIn( const OfxRectD& ); 00037 }; 00038 00039 } 00040 } 00041 } 00042 00043 #endif 00044