bbtk::vtkGObjectView Class Reference

#include <vtkGObjectView.h>

Inheritance diagram for bbtk::vtkGObjectView:

Inheritance graph
[legend]
Collaboration diagram for bbtk::vtkGObjectView:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 vtkGObjectView ()
 ~vtkGObjectView ()
void setModel (GObjectModel *model)
void setBaseView (wxVtkBaseView *baseView)
void initVtkObjects ()
void setStartDragging (bool param)
void setState (int state)
int getState ()
void setRefreshWaiting ()
virtual bool isPointInside (int X, int Y)
virtual void moveObject (int X, int Y)
virtual void removeFromScene ()
virtual void update (int idController, int command)

Protected Member Functions

virtual void createVtkObjects ()
virtual void addVtkActors ()
virtual void removeVtkActors ()
virtual void updateColors ()

Protected Attributes

wxVtkBaseView * _baseView
GObjectModel_model
vtkActor * _borderObjectActor
vtkActor * _fillObjectActor
vtkPolyDataMapper * _fillPolyMapper
vtkPolyDataMapper * _borderPolyMapper
vtkPoints * _pts
int _state

Private Attributes

bool _isStartDragging
double dragDifX
double dragDifY


Detailed Description

Definition at line 70 of file vtkGObjectView.h.


Constructor & Destructor Documentation

bbtk::vtkGObjectView::vtkGObjectView (  ) 

Definition at line 44 of file vtkGObjectView.cxx.

References _baseView, _borderObjectActor, _fillObjectActor, _isStartDragging, _state, and bbtk::NOTHING_HAPPENS.

00045         {
00046                 _baseView                       = NULL;
00047                 _borderObjectActor      = NULL;
00048                 _fillObjectActor        = NULL;
00049                 _isStartDragging        = false;
00050                 
00051                 _state                          = NOTHING_HAPPENS;
00052         }

bbtk::vtkGObjectView::~vtkGObjectView (  ) 

Definition at line 55 of file vtkGObjectView.cxx.

00056         {
00057         }


Member Function Documentation

void bbtk::vtkGObjectView::addVtkActors (  )  [protected, virtual]

Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, and bbtk::vtkGComplexBoxPortView.

Definition at line 103 of file vtkGObjectView.cxx.

References _baseView, and _fillObjectActor.

Referenced by initVtkObjects().

00104         {               
00105                 _baseView->GetRenderer()->AddActor(_fillObjectActor);
00106                 _baseView->GetRenderer()->Render();
00107         }

Here is the caller graph for this function:

void bbtk::vtkGObjectView::createVtkObjects (  )  [protected, virtual]

Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.

Definition at line 89 of file vtkGObjectView.cxx.

Referenced by initVtkObjects().

00090         {
00091                 //virtual
00092         }

Here is the caller graph for this function:

int bbtk::vtkGObjectView::getState (  ) 

void bbtk::vtkGObjectView::initVtkObjects (  ) 

Definition at line 81 of file vtkGObjectView.cxx.

References addVtkActors(), and createVtkObjects().

Referenced by bbtk::wxVtkSceneManager::createGBlackBox(), bbtk::wxVtkSceneManager::createGComplexBoxInputPort(), bbtk::wxVtkSceneManager::createGComplexBoxOutputPort(), and bbtk::wxVtkSceneManager::createGPort().

00082         {
00083                 createVtkObjects();
00084                 addVtkActors();
00085         }

Here is the call graph for this function:

Here is the caller graph for this function:

bool bbtk::vtkGObjectView::isPointInside ( int  X,
int  Y 
) [virtual]

Definition at line 119 of file vtkGObjectView.cxx.

References _baseView, _model, and bbtk::GObjectModel::isPointInside().

Referenced by bbtk::wxVtkSceneManager::GetGBlackBoxControlerPointedByMouse(), bbtk::GBlackBoxController::OnLeftButtonDown(), bbtk::GBoxController::OnLeftButtonUp(), bbtk::GBlackBoxController::OnMiddleButtonDown(), bbtk::GObjectController::OnMouseMove(), bbtk::GBoxController::OnMouseMove(), and bbtk::GBlackBoxController::OnMouseMove().

00120         {
00121                 // RaC In the actual version, always z=900
00122                 double xx=X,yy=Y,zz=900;
00123                 _baseView->TransCoordScreenToWorld(xx,yy,zz);
00124                 return _model->isPointInside(xx,yy,zz);
00125         }

Here is the call graph for this function:

Here is the caller graph for this function:

void bbtk::vtkGObjectView::moveObject ( int  X,
int  Y 
) [virtual]

Definition at line 129 of file vtkGObjectView.cxx.

References _baseView, _isStartDragging, _model, dragDifX, dragDifY, bbtk::GObjectModel::getInicPoint(), and bbtk::GObjectModel::move().

Referenced by bbtk::GObjectController::moveObject(), and bbtk::wxVtkSceneManager::OnMouseMove().

00130         {               
00131                 // RaC In the actual version, always z=900
00132                 double xx=X,yy=Y,zz=900;
00133                 _baseView->TransCoordScreenToWorld(xx,yy,zz);
00134 
00135                 if(_isStartDragging)
00136                 {
00137                         _isStartDragging=false;
00138                         
00139                         double xInic,yInic,zInic;
00140                         _model->getInicPoint(xInic,yInic,zInic);                        
00141                         dragDifX=xx-xInic;
00142                         dragDifY=yy-yInic;      
00143                 }
00144                 _model->move(xx-dragDifX,yy-dragDifY,zz);
00145 
00146         }

Here is the call graph for this function:

Here is the caller graph for this function:

void bbtk::vtkGObjectView::removeFromScene (  )  [virtual]

Definition at line 180 of file vtkGObjectView.cxx.

References removeVtkActors(), and setRefreshWaiting().

Referenced by bbtk::GObjectController::removeFromScene().

00181         {
00182                 removeVtkActors();
00183                 setRefreshWaiting();
00184         }

Here is the call graph for this function:

Here is the caller graph for this function:

void bbtk::vtkGObjectView::removeVtkActors (  )  [protected, virtual]

Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, and bbtk::vtkGComplexBoxPortView.

Definition at line 111 of file vtkGObjectView.cxx.

References _baseView, and _fillObjectActor.

Referenced by removeFromScene().

00112         {
00113                 _baseView->GetRenderer()->RemoveActor(_fillObjectActor);
00114                 _baseView->GetRenderer()->Render();
00115         }

Here is the caller graph for this function:

void bbtk::vtkGObjectView::setBaseView ( wxVtkBaseView *  baseView  ) 

void bbtk::vtkGObjectView::setModel ( GObjectModel model  ) 

void bbtk::vtkGObjectView::setRefreshWaiting (  ) 

Definition at line 173 of file vtkGObjectView.cxx.

References _baseView.

Referenced by removeFromScene(), bbtk::vtkGPortView::update(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), and bbtk::vtkGBlackBoxView::update().

00174         {
00175                 ((vtkInteractorStyleBaseView*)_baseView->GetInteractorStyleBaseView())->SetRefresh_waiting();
00176         }

Here is the caller graph for this function:

void bbtk::vtkGObjectView::setStartDragging ( bool  param  ) 

Definition at line 150 of file vtkGObjectView.cxx.

References _isStartDragging, and dragDifX.

Referenced by bbtk::wxVtkSceneManager::OnMouseMove().

00151         {
00152                 _isStartDragging=param;
00153                 dragDifX=0;
00154                 dragDifX=0;
00155         }

Here is the caller graph for this function:

void bbtk::vtkGObjectView::setState ( int  state  ) 

void bbtk::vtkGObjectView::update ( int  idController,
int  command 
) [virtual]

Reimplemented from bbtk::Observer.

Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.

Definition at line 60 of file vtkGObjectView.cxx.

00061         {
00062                 //virtual
00063         }

void bbtk::vtkGObjectView::updateColors (  )  [protected, virtual]

Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.

Definition at line 96 of file vtkGObjectView.cxx.

00097         {
00098                 //virtual
00099         }


Member Data Documentation

wxVtkBaseView* bbtk::vtkGObjectView::_baseView [protected]

vtkPolyDataMapper* bbtk::vtkGObjectView::_borderPolyMapper [protected]

vtkPolyDataMapper* bbtk::vtkGObjectView::_fillPolyMapper [protected]

Definition at line 103 of file vtkGObjectView.h.

Referenced by moveObject(), setStartDragging(), and vtkGObjectView().

vtkPoints* bbtk::vtkGObjectView::_pts [protected]

Definition at line 106 of file vtkGObjectView.h.

Referenced by moveObject(), and setStartDragging().

Definition at line 107 of file vtkGObjectView.h.

Referenced by moveObject().


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

Generated on Thu May 31 15:13:50 2012 for bbtkGEditor by  doxygen 1.5.7.1