Displayer of the mesh edition preview. More...
#include <SMESHGUI_MeshEditPreview.h>
Public Member Functions | |
SMESHGUI_MeshEditPreview (SVTK_ViewWindow *) | |
Constructor. More... | |
~SMESHGUI_MeshEditPreview () | |
Destroy. More... | |
void | SetData (const SMESH::MeshPreviewStruct *) |
Set preview data. More... | |
void | SetVisibility (bool) |
Set visibility. More... | |
void | SetColor (double, double, double) |
Set preview color. More... | |
void | SetArrowShapeAndNb (int nbArrows, double headLength, double headRadius, double start=0., const char *labels=0) |
Set shape of an arrow of a unit length and nb of arrows. More... | |
void | SetArrows (const gp_Ax1 *axes, double length) |
Set data to show moved/rotated/scaled arrows. More... | |
SALOME_Actor * | GetActor () const |
Get preview actor. More... | |
vtkUnstructuredGrid * | GetGrid () const |
Returns the priewed vtkUnstructuredGrid. More... | |
SVTK_ViewWindow * | GetViewWindow () const |
Returns myViewWindow. More... | |
Private Attributes | |
SVTK_ViewWindow * | myViewWindow |
vtkUnstructuredGrid * | myGrid |
SALOME_Actor * | myPreviewActor |
std::vector< gp_Pnt > | myUnitArrowPnts |
std::vector< vtkTextActor * > | myLabelActors |
Displayer of the mesh edition preview.
SMESHGUI_MeshEditPreview::SMESHGUI_MeshEditPreview | ( | SVTK_ViewWindow * | theViewWindow | ) |
Constructor.
References SMESH::GetColor(), myGrid, myPreviewActor, myViewWindow, and SetColor().
SMESHGUI_MeshEditPreview::~SMESHGUI_MeshEditPreview | ( | ) |
Destroy.
References myGrid, myLabelActors, myPreviewActor, and myViewWindow.
SALOME_Actor * SMESHGUI_MeshEditPreview::GetActor | ( | ) | const |
Get preview actor.
References myPreviewActor.
Referenced by SMESHGUI_PreviewDlg::hidePreview(), SMESHGUI_ConvToQuadOp::onApply(), SMESHGUI_PreviewDlg::onCloseView(), SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation(), SMESHGUI_BaseComputeOp::onShowBadMesh(), SMESHGUI_PreviewDlg::showPreview(), SMESHGUI_FindElemByPointOp::startOperation(), and SMESHGUI_MakeNodeAtPointOp::startOperation().
vtkUnstructuredGrid * SMESHGUI_MeshEditPreview::GetGrid | ( | ) | const |
Returns the priewed vtkUnstructuredGrid.
References myGrid.
Referenced by SMESHGUI_SplitVolumesDlg::updateNormalPreview().
SVTK_ViewWindow * SMESHGUI_MeshEditPreview::GetViewWindow | ( | ) | const |
Returns myViewWindow.
References myViewWindow.
void SMESHGUI_MeshEditPreview::SetArrows | ( | const gp_Ax1 * | axes, |
double | length | ||
) |
Set data to show moved/rotated/scaled arrows.
[in] | axes | - location and direction of the arrows |
[in] | length | - length of arrows |
References myGrid, myLabelActors, and myUnitArrowPnts.
Referenced by StdMeshersGUI_CartesianParamCreator::updateAxesPreview(), and SMESHGUI_SplitVolumesDlg::updateNormalPreview().
void SMESHGUI_MeshEditPreview::SetArrowShapeAndNb | ( | int | nbArrows, |
double | headLength, | ||
double | headRadius, | ||
double | start = 0. , |
||
const char * | labels = 0 |
||
) |
Set shape of an arrow of a unit length and nb of arrows.
References myGrid, myLabelActors, myPreviewActor, and myUnitArrowPnts.
Referenced by StdMeshersGUI_CartesianParamCreator::StdMeshersGUI_CartesianParamCreator(), and SMESHGUI_SplitVolumesDlg::updateNormalPreview().
void SMESHGUI_MeshEditPreview::SetColor | ( | double | R, |
double | G, | ||
double | B | ||
) |
void SMESHGUI_MeshEditPreview::SetData | ( | const SMESH::MeshPreviewStruct * | previewData | ) |
Set preview data.
References SMESH::MeshPreviewStruct::elementConnectivities, SMESH::MeshPreviewStruct::elementTypes, getCellType(), myGrid, myPreviewActor, SMESH::ElementSubType::nbNodesInElement, SMESH::MeshPreviewStruct::nodesXYZ, SetVisibility(), and SMESH::ElementSubType::SMDS_ElementType.
Referenced by SMESHGUI_ConvToQuadOp::onApply(), SMESHGUI_ExtrusionAlongPathDlg::onDisplaySimulation(), SMESHGUI_RevolutionDlg::onDisplaySimulation(), SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation(), SMESHGUI_ExtrusionDlg::onDisplaySimulation(), SMESHGUI_PrecomputeOp::onPreview(), SMESHGUI_BaseComputeOp::onShowBadMesh(), SMESHGUI_FindElemByPointOp::redisplayPreview(), and SMESHGUI_MakeNodeAtPointOp::redisplayPreview().
void SMESHGUI_MeshEditPreview::SetVisibility | ( | bool | theVisibility | ) |
Set visibility.
References myLabelActors, myPreviewActor, and SMESH::RepaintCurrentView().
Referenced by SMESHGUI_BaseComputeOp::currentCellChanged(), SMESHGUI_PreviewDlg::hidePreview(), SMESHGUI_ConvToQuadOp::onApply(), SMESHGUI_PreviewDlg::onCloseView(), SMESHGUI_RevolutionDlg::onDisplaySimulation(), SMESHGUI_FindElemByPointOp::onOpenView(), SMESHGUI_MakeNodeAtPointOp::onOpenView(), SMESHGUI_RevolutionDlg::onOpenView(), SMESHGUI_PrecomputeOp::onPreview(), SMESHGUI_ConvToQuadOp::onWarningWinFinished(), SMESHGUI_MakeNodeAtPointOp::redisplayPreview(), SetData(), SMESHGUI_SplitVolumesDlg::showFacetByElement(), SMESHGUI_PreviewDlg::showPreview(), SMESHGUI_FindElemByPointOp::stopOperation(), SMESHGUI_MakeNodeAtPointOp::stopOperation(), SMESHGUI_BaseComputeOp::stopOperation(), SMESHGUI_PrecomputeOp::stopOperation(), StdMeshersGUI_CartesianParamCreator::updateAxesPreview(), and SMESHGUI_SplitVolumesDlg::updateNormalPreview().
|
private |
Referenced by GetGrid(), SetArrows(), SetArrowShapeAndNb(), SetData(), SMESHGUI_MeshEditPreview(), and ~SMESHGUI_MeshEditPreview().
|
private |
Referenced by SetArrows(), SetArrowShapeAndNb(), SetVisibility(), and ~SMESHGUI_MeshEditPreview().
|
private |
Referenced by GetActor(), SetArrowShapeAndNb(), SetColor(), SetData(), SetVisibility(), SMESHGUI_MeshEditPreview(), and ~SMESHGUI_MeshEditPreview().
|
private |
Referenced by SetArrows(), and SetArrowShapeAndNb().
|
private |
Referenced by GetViewWindow(), SMESHGUI_MeshEditPreview(), and ~SMESHGUI_MeshEditPreview().