TuttleOFX  1
tuttle::plugin::interact::InteractScene Class Reference

To create a group of overlay/interact objects. Inherit from InteractObject, because a group of overlay/interact objects is itself an overlay/interact object. More...

#include <InteractScene.hpp>

Inheritance diagram for tuttle::plugin::interact::InteractScene:
Collaboration diagram for tuttle::plugin::interact::InteractScene:

Public Types

typedef double Scalar
typedef boost::gil::point2
< Scalar > 
Point2
typedef boost::ptr_vector
< InteractObject > 
InteractObjectsVector
typedef boost::ptr_vector
< IsActiveFunctor > 
IsActiveFunctorVector
typedef boost::ptr_vector< IColor > ColorVector
typedef std::pair
< InteractObject *, Point2 > 
SelectedObject
typedef std::vector
< SelectedObject > 
SelectedObjectVector

Public Member Functions

 InteractScene (OFX::ParamSet &params, const InteractInfos &infos)
virtual ~InteractScene ()
InteractObjectsVector & getObjects ()
const InteractObjectsVector & getObjects () const
void push_back (InteractObject *obj, IsActiveFunctor *isActive=new AlwaysActiveFunctor<>(), IColor *color=new Color())
void setManipulator (InteractObject *obj, IColor *color=new Color())
bool draw (const OFX::DrawArgs &args) const
 the function called to draw in the interact
bool penMotion (const OFX::PenArgs &args)
bool penDown (const OFX::PenArgs &args)
bool penUp (const OFX::PenArgs &args)

Private Member Functions

SelectedObjectVector & getSelectedObjects ()
const SelectedObjectVector & getSelectedObjects () const
bool drawSelection (const OFX::DrawArgs &args) const
void translate (const Point2 &vec)
void rotate (const Point2 &center, const Point2 &from, const Point2 &vec)
void scale (const Point2 &center, const Point2 &factor)

Private Attributes

OFX::ParamSet & _params
const InteractInfos & _infos
bool _mouseDown
MotionType _motionType
InteractObjectsVector _objects
IsActiveFunctorVector _isActive
ColorVector _colors
Point2 _beginPenPosition
bool _multiSelectionEnabled
bool _creatingSelection
InteractObject * _manipulator
IColor * _manipulatorColor
bool _hasSelection
SelectedObjectVector _selected
OfxRectD _selectionRect

Detailed Description

To create a group of overlay/interact objects. Inherit from InteractObject, because a group of overlay/interact objects is itself an overlay/interact object.

Definition at line 25 of file InteractScene.hpp.


Member Typedef Documentation

Definition at line 32 of file InteractScene.hpp.

Definition at line 29 of file InteractScene.hpp.

Definition at line 28 of file InteractScene.hpp.


Constructor & Destructor Documentation

tuttle::plugin::interact::InteractScene::InteractScene ( OFX::ParamSet &  params,
const InteractInfos &  infos 
)

Definition at line 12 of file InteractScene.cpp.

References _selectionRect.

tuttle::plugin::interact::InteractScene::~InteractScene ( ) [virtual]

Definition at line 25 of file InteractScene.cpp.


Member Function Documentation

bool tuttle::plugin::interact::InteractScene::draw ( const OFX::DrawArgs &  args) const [virtual]

the function called to draw in the interact

Reimplemented from tuttle::plugin::interact::InteractObject.

Definition at line 28 of file InteractScene.cpp.

References _colors, _isActive, _objects, and drawSelection().

Here is the call graph for this function:

bool tuttle::plugin::interact::InteractScene::drawSelection ( const OFX::DrawArgs &  args) const [private]
InteractObjectsVector& tuttle::plugin::interact::InteractScene::getObjects ( ) [inline]

Definition at line 62 of file InteractScene.hpp.

References _objects.

const InteractObjectsVector& tuttle::plugin::interact::InteractScene::getObjects ( ) const [inline]

Definition at line 63 of file InteractScene.hpp.

References _objects.

SelectedObjectVector& tuttle::plugin::interact::InteractScene::getSelectedObjects ( ) [inline, private]

Definition at line 87 of file InteractScene.hpp.

References _selected.

const SelectedObjectVector& tuttle::plugin::interact::InteractScene::getSelectedObjects ( ) const [inline, private]

Definition at line 88 of file InteractScene.hpp.

References _selected.

bool tuttle::plugin::interact::InteractScene::penUp ( const OFX::PenArgs &  args)
void tuttle::plugin::interact::InteractScene::push_back ( InteractObject *  obj,
IsActiveFunctor *  isActive = new AlwaysActiveFunctor<>(),
IColor *  color = new Color() 
) [inline]

Definition at line 65 of file InteractScene.hpp.

References _colors, _isActive, and _objects.

void tuttle::plugin::interact::InteractScene::rotate ( const Point2 &  center,
const Point2 &  from,
const Point2 &  vec 
) [private]

Definition at line 333 of file InteractScene.cpp.

References _selected.

Referenced by penMotion().

void tuttle::plugin::interact::InteractScene::scale ( const Point2 &  center,
const Point2 &  factor 
) [private]
void tuttle::plugin::interact::InteractScene::setManipulator ( InteractObject *  obj,
IColor *  color = new Color() 
) [inline]

Definition at line 71 of file InteractScene.hpp.

References _manipulator, and _manipulatorColor.

void tuttle::plugin::interact::InteractScene::translate ( const Point2 &  vec) [private]

Field Documentation

Definition at line 49 of file InteractScene.hpp.

Referenced by draw(), and push_back().

Definition at line 44 of file InteractScene.hpp.

Referenced by penDown(), penMotion(), and penUp().

Definition at line 53 of file InteractScene.hpp.

Referenced by penDown().

Definition at line 42 of file InteractScene.hpp.

Referenced by penDown(), and penUp().


The documentation for this class was generated from the following files: