UsTK : Ultrasound ToolKit
version 2.0.1 under development (2024-12-17)
|
#include </home/soft/ustk/ustk-web-script/ustk-code/tutorial/ustk/meshDeformation/usMeshDeformation.h>
Public Slots | |
void | updateMeshPosition (vpHomogeneousMatrix transform) |
Public Member Functions | |
usMeshDeformation (QWidget *parent=NULL, Qt::WindowFlags f=Qt::WindowFlags()) | |
~usMeshDeformation () | |
void | keyPressEvent (QKeyEvent *event) |
vtkPoints * | getMeshPoints () |
void | setMeshInScene (vtkUnstructuredGrid *mesh) |
void | paintEvent (QPaintEvent *event) |
void | render () |
Class used to render a 3D mesh in a 3D environment.
Definition at line 103 of file usMeshDeformation.h.
usMeshDeformation::usMeshDeformation | ( | QWidget * | parent = NULL , |
Qt::WindowFlags | f = Qt::WindowFlags() |
||
) |
Constructor.
Definition at line 44 of file usMeshDeformation.cpp.
usMeshDeformation::~usMeshDeformation | ( | ) |
Definition at line 63 of file usMeshDeformation.cpp.
vtkPoints * usMeshDeformation::getMeshPoints | ( | ) |
Point set of the mesh getter. To update a point position: call GetPoint(int ptIndex), update the coordinates, and then call SetPoint(ptIndex,yourPoint) followed by Modified() to update vtk object.
Definition at line 157 of file usMeshDeformation.cpp.
void usMeshDeformation::keyPressEvent | ( | QKeyEvent * | event | ) |
Qt key press event catcher, used int this example to move the first point of the mesh.
event | QKeyEvent. |
Definition at line 75 of file usMeshDeformation.cpp.
void usMeshDeformation::paintEvent | ( | QPaintEvent * | event | ) |
Qt paint event overload if needed to update Qt widget
event | QPaintEvent. |
Definition at line 69 of file usMeshDeformation.cpp.
References usViewerWidget::paintEvent().
void usMeshDeformation::render | ( | ) |
To render the scene, after some updates done on objects.
Definition at line 162 of file usMeshDeformation.cpp.
void usMeshDeformation::setMeshInScene | ( | vtkUnstructuredGrid * | mesh | ) |
Setter for the mesh to introcuce in the scene.
mesh | The mesh, under vtkPolydataFormat. |
Definition at line 106 of file usMeshDeformation.cpp.
|
slot |
Slot to call every time you want to update the mesh position.
transform | The homogeneous matrix of the mesh displacement to apply on current mesh position (can be considered as a movement). |
Definition at line 124 of file usMeshDeformation.cpp.
References usVTKConverter::convert().