_lineCell->InsertNextCell(2);
_lineCell->InsertCellPoint(0);
_lineCell->InsertCellPoint(1);
-
_pd = vtkPolyData::New();
_pd->SetPoints( _pts );
_pd->SetLines( _splineCell );
_bboxMapper = vtkPolyDataMapper::New();
_bboxMapper->ScalarVisibilityOff( );
-
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_bboxMapper->SetInput(_pd);
_bboxMapper->SetInputData(_pd);
#endif
-
_contourVtkActor->SetMapper(_bboxMapper);
_contourVtkActor->GetProperty()->BackfaceCullingOff();
-
UpdateColorActor();
-
_pd->ComputeBounds();
-
InitTextActor();
}
// _textActor->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
_textActor->GetPositionCoordinate()->SetCoordinateSystemToWorld ();
// _textActor->GetPositionCoordinate()->SetValue( 0.8 , 0.8 );
-
vtkTextProperty *tprop = _textActor->GetTextProperty();
tprop->SetFontSize(12);
tprop->SetFontFamilyToArial();
tprop->SetColor(1, 1, 0);
-
// Text 2
_textActor2 = vtkTextActor::New();
// _textActor->SetDisplayPosition(200, 200);
// _textActor2->GetPosition2Coordinate()->SetValue( 0.2 , 0.2 );
_textActor2->GetPositionCoordinate()->SetCoordinateSystemToWorld ();
// _textActor2->GetPositionCoordinate()->SetValue( 0.8 , 0.8 );
-
vtkTextProperty *tprop2 = _textActor2->GetTextProperty();
tprop2->SetFontSize(12);
tprop2->SetFontFamilyToArial();
tprop2->SetColor(1, 1, 0);
-
}
// ----------------------------------------------------------------------------
_wxvtkbaseview->GetRenderer()->AddActor2D(_textActor);*/
AddCompleteContourActor();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::UpdateViewPoint(int id) // virtual
{
manualPoint *mp = _manContModel->GetManualPoint(id);
-
//EEDx6
double XX=mp->GetX(),YY=mp->GetY(),ZZ=mp->GetZ();
// wxVtk2DBaseView *wxvtk2Dbasevie = (wxVtk2DBaseView*)this->GetWxVtkBaseView();
// wxvtk2Dbasevie->TransformCoordinate_spacing_ModelToView(XX,YY,ZZ);
-
_lstViewPoints[id]->SetPositionXY( XX , YY ,_range, ZZ );
}
_lstViewPoints.insert(itNum,mvp);
_wxvtkbaseview->GetRenderer()->AddActor( mvp->CreateVtkPointActor() );
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::DeleteContour()
{
}
Refresh();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::DeletePoint(int id) // virtual
{
DeletePoint(id);
}
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetSelected(bool selected)
{
_selected=selected;
+
}
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetPosibleSelected(bool posibleSelected)
{
_posibleSelected=posibleSelected;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour::GetEditable()
{
return *_editable;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetEditable( bool * condition )
{
_editable = condition;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour::GetSelected()
{
return _selected;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour::GetPosibleSelected()
{
return _posibleSelected;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::DeleteSelectedPoints()
{
}
Refresh();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SelectPoint(int i, bool select)
{
_lstViewPoints[i]->SetSelected(select);
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SelectLstPoints()
{
// ToDo
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SelectAllPoints(bool select)
{
SelectPoint(i,select);
}
}
+
//-----------------------------------------------------------------------------
void manualViewBaseContour:: SetIfViewControlPoints(bool ifShow)
{
_viewControlPoints = ifShow;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour:: GetIfViewControlPoints()
{
{
_lstViewPoints[id]->SetPosibleSelected(select);
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetPointSelected(int id,bool select)
{
_lstViewPoints[id]->SetSelected(select);
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SelectAllPossibleSelected(bool select)
{
SetPointPosibleSelected(i,select);
}
}
+
// ----------------------------------------------------------------------------
int manualViewBaseContour::SelectPosiblePoint(int x, int y, int z) // virtual
{
}
return id;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour::SelectPosibleContour(int x, int y, int z)
{
return result;
}
+
// ----------------------------------------------------------------------------
bool manualViewBaseContour::ifTouchContour(int x,int y, int z) // virtual
{
return false;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::UnSelectPoint(int i){
_lstViewPoints[i]->SetSelected(false);
Refresh();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::UnSelectLstPoints(){
// ToDo
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::UnSelectAllPoints(){
int i,size=_lstViewPoints.size();
}
Refresh();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetModel(manualBaseModel *manContModel){
_manContModel=manContModel;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetWxVtkBaseView(wxVtkBaseView *wxvtkbaseview){
_wxvtkbaseview = wxvtkbaseview;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::RefreshContour() // Virtual
{
}
+
// ----------------------------------------------------------------------------
double* manualViewBaseContour::GetVectorPointsXManualContour(){
double pp[3];
} // for i
return vx;
}
+
// ----------------------------------------------------------------------------
double* manualViewBaseContour::GetVectorPointsYManualContour()
{
} // for i
return vy;
}
+
// ----------------------------------------------------------------------------
double* manualViewBaseContour::GetVectorPointsZManualContour()
{
} // for i
return vz;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::Refresh() // virtual
{
_lstViewPoints[i]->UpdateColorActor();
} // for i
UpdateColorActor();
-
if (_show_text==true)
{
RefreshText();
}
-
vtkRenderWindowInteractor *vri = _wxvtkbaseview->GetWxVTKRenderWindowInteractor ();
if (vri==NULL)
{
_wxvtkbaseview->GetRenWin()->Render();
printf("EED %p How to optimize manualViewBaseContour::Refresh() \n",this);
}
-
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::RefreshText() // virtual
{
_textActor2 -> SetInput("00");
}
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetColorNormalContour(double r, double g, double b)
{
_coulorNormal_g = g;
_coulorNormal_b = b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::GetColorNormalContour(double &r, double &g, double &b)
{
g = _coulorNormal_g;
b = _coulorNormal_b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetColorEditContour(double r, double g, double b)
{
_coulorEdit_g = g;
_coulorEdit_b = b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::GetColorEditContour(double &r, double &g, double &b)
{
g = _coulorEdit_g;
b = _coulorEdit_b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetColorSelectContour(double r, double g, double b)
{
_coulorSelection_g = g;
_coulorSelection_b = b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::GetColorSelectContour(double &r, double &g, double &b)
{
g = _coulorSelection_g;
b = _coulorSelection_b;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::UpdateColorActor()
{
}
}
}
+
// ----------------------------------------------------------------------------
int manualViewBaseContour::GetIdPoint(int x, int y, int z) // virtual
{
}
// ----------------------------------------------------------------------------
-
-
int manualViewBaseContour::GetNumberOfPoints()
{
return _lstViewPoints.size();
{
_sizePointsContour = size;
}*/
+
//----------------------------------------------------------------------------
// virtual
void manualViewBaseContour::TransfromCoordViewWorld(double &X, double &Y, double &Z, int type) // Virtual
{
_wxvtkbaseview->TransFromCoordScreenToWorld(X, Y, Z,false, type);
-
-
//EED 27 sep 2007
// //EEDx6
// wxVtk2DBaseView *wxvtk2Dbaseview = (wxVtk2DBaseView*)_wxvtkbaseview;
// wxvtk2Dbaseview->TransformCoordinate_spacing_ModelToView(X,Y,Z);
-
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetRange(double range)
{
_range=range;
}
+
// ----------------------------------------------------------------------------
double manualViewBaseContour::GetRange()
{
return _range;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetZ(int z)
{
// _Z=z;
}
+
// ----------------------------------------------------------------------------
int manualViewBaseContour::GetZ()
{
// return _Z;
return 0;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::InitMove(int x, int y, int z) // virtual
{
-
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::MoveContour(int x, int y, int z) // virtual
{
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::MoveContour(int horizontalUnits, int verticalUnits )// virtual
{
-
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::GetMinMax( double &minX,double &minY, double &minZ, double &maxX, double &maxY, double &maxZ )// virtual
{
maxZ = 0;
}
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::ClearContour()
{
}
Refresh();
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::ClearPoint(int id)
{
DeletePoint(id);
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetVisible(bool ok)
{
_textActor->SetInput("00");
_textActor2->GetProperty()->SetOpacity( opacity );
_textActor2->SetInput("00");
-
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetShowText(bool ok)
{
_textActor2->SetInput("");
}
}
+
// ----------------------------------------------------------------------------
wxVtkBaseView *manualViewBaseContour::GetWxVtkBaseView()
{
return this->_wxvtkbaseview;
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::GetSpacing(double spc[3])
{
- spc[0] = _spc[0];
- spc[1] = _spc[1];
- spc[2] = _spc[2];
+ spc[0] = _spc[0];
+ spc[1] = _spc[1];
+ spc[2] = _spc[2];
}
+
// ----------------------------------------------------------------------------
void manualViewBaseContour::SetSpacing(double spc[3])
{