namespace bbtk
{
-
//=========================================================================
vtkGObjectView::vtkGObjectView()
{
{
}
//=========================================================================
-
void vtkGObjectView::update(int idController,int command)//virtual
{
//virtual
}
//=========================================================================
-
void vtkGObjectView::setModel(GObjectModel *model)
{
_model = model;
}
//=========================================================================
-
void vtkGObjectView::setBaseView(wxVtkBaseView* baseView)
{
_baseView = baseView;
}
//=========================================================================
-
void vtkGObjectView::initVtkObjects()
{
createVtkObjects();
}
//=========================================================================
-
void vtkGObjectView::createVtkObjects() //virtual
{
//virtual
}
//=========================================================================
-
void vtkGObjectView::updateColors() //virtual
{
//virtual
}
//=========================================================================
-
void vtkGObjectView::addVtkActors()//virtual
{
_baseView->GetRenderer()->AddActor(_fillObjectActor);
}
//=========================================================================
-
void vtkGObjectView::removeVtkActors()//virtual
{
_baseView->GetRenderer()->RemoveActor(_fillObjectActor);
}
//=========================================================================
-
bool vtkGObjectView::isPointInside(int X,int Y) //virtual
{
// RaC In the actual version, always z=GPOSITION_Z
}
//=========================================================================
-
void vtkGObjectView::moveObject(int X,int Y) //virtual
{
-
// RaC In the actual version, always z=GPOSITION_Z
double xx=X,yy=Y,zz=GPOSITION_Z;
_baseView->TransCoordScreenToWorld(xx,yy,zz);
dragDifY=yy-yInic;
}
_model->move(xx-dragDifX,yy-dragDifY,zz);
-
}
//=========================================================================
-
void vtkGObjectView::setStartDragging(bool param)
{
_isStartDragging=param;
}
//=========================================================================
-
void vtkGObjectView::setState(int state)
{
_state = state;
}
//=========================================================================
-
int vtkGObjectView::getState()
{
return _state;
}
//=========================================================================
-
void vtkGObjectView::setRefreshWaiting()
{
((vtkInteractorStyleBaseView*)_baseView->GetInteractorStyleBaseView())->SetRefresh_waiting();
}
//=========================================================================
-
void vtkGObjectView::removeFromScene()
{
removeVtkActors();