#include <vtkGConnectorView.h>
Public Member Functions | |
vtkGConnectorView () | |
~vtkGConnectorView () | |
void | setManualContourView (manualViewContour *viewContour) |
manualViewContour * | getManualContourView () |
void | updateStartEndPoints () |
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 | |
manualViewContour * | manViewContour |
Definition at line 61 of file vtkGConnectorView.h.
bbtk::vtkGConnectorView::vtkGConnectorView | ( | ) |
bbtk::vtkGConnectorView::~vtkGConnectorView | ( | ) |
void bbtk::vtkGObjectView::addVtkActors | ( | ) | [protected, virtual, inherited] |
Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, and bbtk::vtkGComplexBoxPortView.
Definition at line 103 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView, and bbtk::vtkGObjectView::_fillObjectActor.
Referenced by bbtk::vtkGObjectView::initVtkObjects().
00104 { 00105 _baseView->GetRenderer()->AddActor(_fillObjectActor); 00106 _baseView->GetRenderer()->Render(); 00107 }
void bbtk::vtkGObjectView::createVtkObjects | ( | ) | [protected, virtual, inherited] |
Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.
Definition at line 89 of file vtkGObjectView.cxx.
Referenced by bbtk::vtkGObjectView::initVtkObjects().
manualViewContour * bbtk::vtkGConnectorView::getManualContourView | ( | ) |
Definition at line 64 of file vtkGConnectorView.cxx.
References manViewContour.
00065 { 00066 return manViewContour; 00067 }
int bbtk::vtkGObjectView::getState | ( | ) | [inherited] |
Definition at line 166 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_state.
Referenced by bbtk::wxVtkSceneManager::getSelectedObjects(), bbtk::wxVtkSceneManager::OnLeftButtonDown(), bbtk::GPortController::OnLeftButtonDown(), bbtk::GObjectController::OnLeftButtonDown(), bbtk::GBoxController::OnLeftButtonDown(), bbtk::GBlackBoxController::OnLeftButtonDown(), bbtk::GPortController::OnLeftButtonUp(), bbtk::GBoxController::OnLeftButtonUp(), bbtk::GBlackBoxController::OnLeftButtonUp(), bbtk::wxVtkSceneManager::OnMouseMove(), bbtk::GObjectController::OnMouseMove(), bbtk::GBoxController::OnMouseMove(), bbtk::GBlackBoxController::OnMouseMove(), and bbtk::wxVtkSceneManager::update().
00167 { 00168 return _state; 00169 }
void bbtk::vtkGObjectView::initVtkObjects | ( | ) | [inherited] |
Definition at line 81 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::addVtkActors(), and bbtk::vtkGObjectView::createVtkObjects().
Referenced by bbtk::wxVtkSceneManager::createGBlackBox(), bbtk::wxVtkSceneManager::createGComplexBoxInputPort(), bbtk::wxVtkSceneManager::createGComplexBoxOutputPort(), and bbtk::wxVtkSceneManager::createGPort().
00082 { 00083 createVtkObjects(); 00084 addVtkActors(); 00085 }
bool bbtk::vtkGObjectView::isPointInside | ( | int | X, | |
int | Y | |||
) | [virtual, inherited] |
Definition at line 119 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView, bbtk::vtkGObjectView::_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 }
void bbtk::vtkGObjectView::moveObject | ( | int | X, | |
int | Y | |||
) | [virtual, inherited] |
Definition at line 129 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView, bbtk::vtkGObjectView::_isStartDragging, bbtk::vtkGObjectView::_model, bbtk::vtkGObjectView::dragDifX, bbtk::vtkGObjectView::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 }
void bbtk::vtkGObjectView::removeFromScene | ( | ) | [virtual, inherited] |
Definition at line 180 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::removeVtkActors(), and bbtk::vtkGObjectView::setRefreshWaiting().
Referenced by bbtk::GObjectController::removeFromScene().
00181 { 00182 removeVtkActors(); 00183 setRefreshWaiting(); 00184 }
void bbtk::vtkGObjectView::removeVtkActors | ( | ) | [protected, virtual, inherited] |
Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, and bbtk::vtkGComplexBoxPortView.
Definition at line 111 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView, and bbtk::vtkGObjectView::_fillObjectActor.
Referenced by bbtk::vtkGObjectView::removeFromScene().
00112 { 00113 _baseView->GetRenderer()->RemoveActor(_fillObjectActor); 00114 _baseView->GetRenderer()->Render(); 00115 }
void bbtk::vtkGObjectView::setBaseView | ( | wxVtkBaseView * | baseView | ) | [inherited] |
Definition at line 74 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView.
Referenced by bbtk::wxVtkSceneManager::createGBlackBox(), bbtk::wxVtkSceneManager::createGComplexBoxInputPort(), bbtk::wxVtkSceneManager::createGComplexBoxOutputPort(), bbtk::wxVtkSceneManager::createGConnector(), and bbtk::wxVtkSceneManager::createGPort().
00075 { 00076 _baseView = baseView; 00077 }
void bbtk::vtkGConnectorView::setManualContourView | ( | manualViewContour * | viewContour | ) |
Definition at line 57 of file vtkGConnectorView.cxx.
References manViewContour.
Referenced by bbtk::wxVtkSceneManager::createGConnector().
00058 { 00059 manViewContour = viewContour; 00060 }
void bbtk::vtkGObjectView::setModel | ( | GObjectModel * | model | ) | [inherited] |
Definition at line 67 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_model.
Referenced by bbtk::wxVtkSceneManager::createGBlackBox(), bbtk::wxVtkSceneManager::createGComplexBoxInputPort(), bbtk::wxVtkSceneManager::createGComplexBoxOutputPort(), bbtk::wxVtkSceneManager::createGConnector(), and bbtk::wxVtkSceneManager::createGPort().
00068 { 00069 _model = model; 00070 }
void bbtk::vtkGObjectView::setRefreshWaiting | ( | ) | [inherited] |
Definition at line 173 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_baseView.
Referenced by bbtk::vtkGObjectView::removeFromScene(), bbtk::vtkGPortView::update(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), and bbtk::vtkGBlackBoxView::update().
00174 { 00175 ((vtkInteractorStyleBaseView*)_baseView->GetInteractorStyleBaseView())->SetRefresh_waiting(); 00176 }
void bbtk::vtkGObjectView::setStartDragging | ( | bool | param | ) | [inherited] |
Definition at line 150 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_isStartDragging, and bbtk::vtkGObjectView::dragDifX.
Referenced by bbtk::wxVtkSceneManager::OnMouseMove().
00151 { 00152 _isStartDragging=param; 00153 dragDifX=0; 00154 dragDifX=0; 00155 }
void bbtk::vtkGObjectView::setState | ( | int | state | ) | [inherited] |
Definition at line 159 of file vtkGObjectView.cxx.
References bbtk::vtkGObjectView::_state.
Referenced by bbtk::wxVtkSceneManager::CancelConnection(), bbtk::wxVtkSceneManager::DuplicateObjects(), bbtk::wxVtkSceneManager::MakeBoxExecutable(), bbtk::wxVtkSceneManager::OnLeftButtonDown(), bbtk::GObjectController::OnLeftButtonDown(), bbtk::GBoxController::OnLeftButtonDown(), bbtk::GBlackBoxController::OnLeftButtonDown(), bbtk::wxVtkSceneManager::OnLeftButtonUp(), bbtk::GPortController::OnLeftButtonUp(), bbtk::GConnectorController::OnLeftButtonUp(), bbtk::GBoxController::OnLeftButtonUp(), bbtk::GBlackBoxController::OnLeftButtonUp(), bbtk::GBlackBoxController::OnMiddleButtonDown(), bbtk::wxVtkSceneManager::OnMouseMove(), bbtk::GObjectController::OnMouseMove(), bbtk::GBoxController::OnMouseMove(), bbtk::GBlackBoxController::OnMouseMove(), bbtk::wxVtkSceneManager::UnSelectBlackBoxes(), and bbtk::wxVtkSceneManager::update().
00160 { 00161 _state = state; 00162 }
void bbtk::vtkGObjectView::update | ( | int | idController, | |
int | command | |||
) | [virtual, inherited] |
Reimplemented from bbtk::Observer.
Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.
Definition at line 60 of file vtkGObjectView.cxx.
void bbtk::vtkGObjectView::updateColors | ( | ) | [protected, virtual, inherited] |
Reimplemented in bbtk::vtkGBlackBoxView, bbtk::vtkGBoxView, bbtk::vtkGComplexBoxPortView, and bbtk::vtkGPortView.
Definition at line 96 of file vtkGObjectView.cxx.
void bbtk::vtkGConnectorView::updateStartEndPoints | ( | ) |
Definition at line 71 of file vtkGConnectorView.cxx.
References bbtk::vtkGObjectView::_model, manViewContour, and bbtk::GConnectorModel::updateStartEndPoints().
Referenced by bbtk::wxVtkSceneManager::addObjects(), bbtk::wxVtkSceneManager::configGConnetion(), bbtk::wxVtkSceneManager::DuplicateObjects(), and bbtk::wxVtkSceneManager::OnMouseMove().
00072 { 00073 GConnectorModel* mod=(GConnectorModel*)_model; 00074 mod->updateStartEndPoints(); 00075 manViewContour->RefreshContour(); 00076 }
wxVtkBaseView* bbtk::vtkGObjectView::_baseView [protected, inherited] |
Definition at line 116 of file vtkGObjectView.h.
Referenced by bbtk::vtkGObjectView::addVtkActors(), bbtk::vtkGComplexBoxPortView::addVtkActors(), bbtk::vtkGBoxView::addVtkActors(), bbtk::vtkGBlackBoxView::addVtkActors(), bbtk::vtkGObjectView::isPointInside(), bbtk::vtkGObjectView::moveObject(), bbtk::vtkGObjectView::removeVtkActors(), bbtk::vtkGComplexBoxPortView::removeVtkActors(), bbtk::vtkGBoxView::removeVtkActors(), bbtk::vtkGBlackBoxView::removeVtkActors(), bbtk::vtkGObjectView::setBaseView(), bbtk::vtkGObjectView::setRefreshWaiting(), and bbtk::vtkGObjectView::vtkGObjectView().
vtkActor* bbtk::vtkGObjectView::_borderObjectActor [protected, inherited] |
Definition at line 118 of file vtkGObjectView.h.
Referenced by bbtk::vtkGComplexBoxPortView::addVtkActors(), bbtk::vtkGBoxView::addVtkActors(), bbtk::vtkGBlackBoxView::addVtkActors(), bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::removeVtkActors(), bbtk::vtkGBoxView::removeVtkActors(), bbtk::vtkGBlackBoxView::removeVtkActors(), bbtk::vtkGComplexBoxPortView::updateColors(), bbtk::vtkGBoxView::updateColors(), bbtk::vtkGBlackBoxView::updateColors(), and bbtk::vtkGObjectView::vtkGObjectView().
vtkPolyDataMapper* bbtk::vtkGObjectView::_borderPolyMapper [protected, inherited] |
Definition at line 121 of file vtkGObjectView.h.
Referenced by bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), and bbtk::vtkGBlackBoxView::update().
vtkActor* bbtk::vtkGObjectView::_fillObjectActor [protected, inherited] |
Definition at line 119 of file vtkGObjectView.h.
Referenced by bbtk::vtkGObjectView::addVtkActors(), bbtk::vtkGPortView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGObjectView::removeVtkActors(), bbtk::vtkGPortView::updateColors(), bbtk::vtkGComplexBoxPortView::updateColors(), bbtk::vtkGBoxView::updateColors(), bbtk::vtkGBlackBoxView::updateColors(), and bbtk::vtkGObjectView::vtkGObjectView().
vtkPolyDataMapper* bbtk::vtkGObjectView::_fillPolyMapper [protected, inherited] |
Definition at line 120 of file vtkGObjectView.h.
Referenced by bbtk::vtkGPortView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGPortView::update(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), and bbtk::vtkGBlackBoxView::update().
GObjectModel* bbtk::vtkGObjectView::_model [protected, inherited] |
Definition at line 117 of file vtkGObjectView.h.
Referenced by bbtk::vtkGPortView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGObjectView::isPointInside(), bbtk::vtkGObjectView::moveObject(), bbtk::vtkGObjectView::setModel(), bbtk::vtkGPortView::update(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), bbtk::vtkGBlackBoxView::update(), bbtk::vtkGBlackBoxView::update_X_Fin(), bbtk::vtkGPortView::updateColors(), bbtk::vtkGComplexBoxPortView::updateColors(), bbtk::vtkGBlackBoxView::updateColors(), bbtk::vtkGBoxView::updatePorts(), bbtk::vtkGBlackBoxView::updatePositionTextActor(), and updateStartEndPoints().
vtkPoints* bbtk::vtkGObjectView::_pts [protected, inherited] |
Definition at line 123 of file vtkGObjectView.h.
Referenced by bbtk::vtkGPortView::createVtkObjects(), bbtk::vtkGComplexBoxPortView::createVtkObjects(), bbtk::vtkGBoxView::createVtkObjects(), bbtk::vtkGBlackBoxView::createVtkObjects(), bbtk::vtkGPortView::update(), bbtk::vtkGComplexBoxPortView::update(), bbtk::vtkGBoxView::update(), and bbtk::vtkGBlackBoxView::update().
int bbtk::vtkGObjectView::_state [protected, inherited] |
Definition at line 126 of file vtkGObjectView.h.
Referenced by bbtk::vtkGObjectView::getState(), bbtk::vtkGObjectView::setState(), bbtk::vtkGPortView::updateColors(), bbtk::vtkGComplexBoxPortView::updateColors(), bbtk::vtkGBoxView::updateColors(), bbtk::vtkGBlackBoxView::updateColors(), and bbtk::vtkGObjectView::vtkGObjectView().
manualViewContour* bbtk::vtkGConnectorView::manViewContour [private] |
Definition at line 78 of file vtkGConnectorView.h.
Referenced by getManualContourView(), setManualContourView(), and updateStartEndPoints().