//=========================================================================
wxVtkSceneManager::wxVtkSceneManager(wxGEditorTabPanel *parent, wxVtk3DBaseView *baseView,int idManager)
{
- _parent = parent;
- _numBoxes=0;
- _idManager=idManager;
- _baseView=baseView;
- _startDragging=false;
- _isComplexBox=false;
+ _parent = parent;
+ _numBoxes = 0;
+ _idManager = idManager;
+ _baseView = baseView;
+ _startDragging = false;
+ _isComplexBox = false;
if( _baseView!=NULL )
{
registerController(this);
}
- _idConnectionInCreation=-1;
- _contLastId=0;
+ _idConnectionInCreation = -1;
+ _contLastId = 0;
}
_baseView->GetRenderer()->SetBackground(0.9,0.9,0.9);
_baseView->GetRenderer()->GradientBackgroundOff();
_baseView->Refresh();
+
+ _textActor = vtkTextActor3D::New();
+ _textActor->SetPosition( 100 , 100 , 900 );
+ _textActor->SetInput( "Ups EED" );
+ _baseView->GetRenderer()->AddActor( _textActor );
+
}
//=========================================================================
}
//=========================================================================
-//ups1 eed
void wxVtkSceneManager::configGBlackBox(int idBox, double xIn, double yIn, double zIn, std::string name, bool boxExecutable,double xEn,double yEn,double zEn)
{
GObjectController *cont = _controllers[idBox];
bool wxVtkSceneManager::OnMouseMove()
{
int X,Y;
+ bool okStatusMessage = false;
+ bool okPortMessage = false;
wxVTKRenderWindowInteractor *wxVTKiren;
wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
wxVTKiren->GetEventPosition(X,Y);
else if(_worldState == NOTHING_HAPPENS || _worldState == INIT_CREATION_CONTOUR)
{
std::map<int, GObjectController*>::iterator it;
-
+ double px, py, pz;
for(it = _controllers.begin(); it != _controllers.end(); ++it)
{
GObjectController *desc = it->second;
- int type = desc->getGObjectType();
- int state = desc->getView()->getState();
+ int type = desc->getGObjectType();
+ int state = desc->getView()->getState();
+ desc->getModel()->getCenter(px,py,pz);
if(state == HIGHLIGHTED){
-
+ okStatusMessage = true;
updateStatusBar(desc->getStatusText());
if(type==GBLACKBOX)
{
GBlackBoxModel *mod = (GBlackBoxModel*)desc->getModel();
_parent->displayBlackBoxInfo(mod->getBBTKPackage(),mod->getBBTKType());
- }
- }
- }
+ } // if GBLACKBOX
+ if(type==GPORT)
+ {
+ okPortMessage = true;
+ _textActor->SetInput( desc->getStatusText().c_str() );
+ _textActor->SetScale(1);
+//ups1 EED
+ _textActor->SetPosition( px ,py , pz+1 );
+ } // if GPORT
+
+ } // for controllers it
+ }
}
+ if (okStatusMessage==false)
+ {
+ updateStatusBar("");
+ }
+
+ if (okPortMessage==false)
+ {
+ _textActor->SetScale(0.0001);
+ }
+
+
return true;
}