44 #include "MovePlugin.hh" 46 #ifdef ENABLE_POLYLINE_SUPPORT 49 #ifdef ENABLE_TSPLINEMESH_SUPPORT 50 #include <ObjectTypes/TSplineMesh/TSplineMesh.hh> 54 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 57 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 60 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 69 emit setSlotDescription(
"translate(int,Vector)",tr(
"Translate object by given vector."),
70 QString(tr(
"objectId,Vector")).split(
","), QString(tr(
"ID of an object, translation vector")).split(
","));
72 emit setSlotDescription(
"translate(int,idList,Vector)",tr(
"Translate vertices by given vector."),
73 QString(tr(
"objectId,VertexHandles,Vector")).split(
","),
74 QString(tr(
"ID of an object, List of vertex handles, translation vector")).split(
","));
76 emit setSlotDescription(
"translateVertexSelection(int,Vector)",tr(
"Translate current vertex selection of an object by given vector."),
77 QString(tr(
"objectId,Vector")).split(
","), QString(tr(
"ID of an object, translation vector")).split(
","));
79 emit setSlotDescription(
"translateFaceSelection(int,Vector)",tr(
"Translate current face selection of an object by given vector."),
80 QString(tr(
"objectId,Vector")).split(
","), QString(tr(
"ID of an object, translation vector")).split(
","));
82 emit setSlotDescription(
"translateEdgeSelection(int,Vector)",tr(
"Translate current edge selection of an object by given vector."),
83 QString(tr(
"objectId,Vector")).split(
","), QString(tr(
"ID of an object, translation vector")).split(
","));
85 emit setSlotDescription(
"transformHandleRegion(int,Matrix4x4)",tr(
"Transform handle region using the specified matrix."),
86 QString(tr(
"objectId,Matrix")).split(
","), QString(tr(
"ID of an object, transformation matrix")).split(
","));
88 emit setSlotDescription(
"transform(int,Matrix4x4)",tr(
"transform object by given matrix."),
89 QString(tr(
"objectId,Matrix")).split(
","), QString(tr(
"ID of an object, transformation matrix")).split(
","));
91 emit setSlotDescription(
"transform(int,IdList,Matrix4x4)",tr(
"transform vertices by given matrix."),
92 QString(tr(
"objectId,VertexHandles,Matrix")).split(
","),
93 QString(tr(
"ID of an object, List of vertex handles, transformation matrix")).split(
","));
95 emit setSlotDescription(
"transformSelection(int,Matrix4x4)",tr(
"transform current selection of an object by given matrix."),
96 QString(tr(
"objectId,Matrix")).split(
","), QString(tr(
"ID of an object, transformation matrix")).split(
","));
98 emit setSlotDescription(
"transformCellSelection(int,Matrix4x4)",tr(
"transform selected cells by given matrix."),
99 QString(tr(
"objectId,Matrix")).split(
","),
100 QString(tr(
"ID of an object, transformation matrix")).split(
","));
102 emit setSlotDescription(
"transformVertexSelection(int,Matrix4x4)",tr(
"transform selected vertices by given matrix."),
103 QString(tr(
"objectId,Matrix")).split(
","),
104 QString(tr(
"ID of an object, transformation matrix")).split(
","));
106 emit setSlotDescription(
"transformFaceSelection(int,Matrix4x4)",tr(
"transform selected faces by given matrix."),
107 QString(tr(
"objectId,Matrix")).split(
","),
108 QString(tr(
"ID of an object, transformation matrix")).split(
","));
110 emit setSlotDescription(
"transformEdgeSelection(int,Matrix4x4)",tr(
"transform selected edges by given matrix."),
111 QString(tr(
"objectId,Matrix")).split(
","),
112 QString(tr(
"ID of an object, transformation matrix")).split(
","));
114 emit setSlotDescription(
"setManipulatorPosition(int,Vector)",tr(
"Set the position of the manipulator."),
115 QString(tr(
"objectId,Position")).split(
","), QString(tr(
"ID of an object, 3D point")).split(
","));
117 emit setSlotDescription(
"setManipulatorDirection(int,Vector, Vector)",tr(
"Set the direction of the manipulator."),
118 QString(tr(
"objectId,Direction, Direction")).split(
","), QString(tr(
"ID of an object, x-direction, y-direction")).split(
","));
120 emit setSlotDescription(
"manipulatorPosition(int)",tr(
"Returns the position of an object's manipulator."),
121 QStringList(tr(
"objectId")), QStringList(tr(
"ID of an object")));
123 emit setSlotDescription(
"manipulatorDirectionX(int)",tr(
"Returns the x-direction of an object's manipulator."),
124 QStringList(tr(
"objectId")), QStringList(tr(
"ID of an object")));
126 emit setSlotDescription(
"manipulatorDirectionY(int)",tr(
"Returns the y-direction of an object's manipulator."),
127 QStringList(tr(
"objectId")), QStringList(tr(
"ID of an object")));
129 emit setSlotDescription(
"manipulatorDirectionZ(int)",tr(
"Returns the z-direction of an object's manipulator."),
130 QStringList(tr(
"objectId")), QStringList(tr(
"ID of an object")));
133 emit setSlotDescription(
"objectRenderingMatrixIdentity(int)",tr(
"Resets the objects rendering matrix to identity."),
134 QStringList(tr(
"objectId")), QStringList(tr(
"ID of an object")));
137 emit setSlotDescription(
"objectRenderingMatrixScale(int,double)",tr(
"Adds a scaling factor to the Object rendering Matrix in the scenegraph."),
138 QStringList(tr(
"objectId;Scaling Factor").split(
";")), QStringList(tr(
"ID of an object; Scaling factor").split(
";")));
140 emit setSlotDescription(
"objectRenderingMatrixTranslate(int,Vector)",tr(
"Adds a translation to the Object rendering Matrix in the scenegraph."),
141 QStringList(tr(
"objectId;translation vector").split(
";")), QStringList(tr(
"ID of an object;Translation vector").split(
";")));
143 emit setSlotDescription(
"objectRenderingMatrixRotate(int,Vector,double)",tr(
"Adds a Rotation to the Object rendering Matrix in the scenegraph."),
144 QStringList(tr(
"objectId;rotation axis;angle").split(
";")), QStringList(tr(
"ID of an object;Rotation axis;angle").split(
";")));
146 emit setSlotDescription(
"getObjectRenderingMatrix(int)",tr(
"Returns the current object transformation matrix from the scenegraph."),
147 QStringList(tr(
"objectId").split(
";")), QStringList(tr(
"ID of an object").split(
";")));
164 emit log(
LOGERR,tr(
"translate : unable to get object") );
171 TriMesh::VertexIter v_it = mesh.vertices_begin();
172 TriMesh::VertexIter v_end = mesh.vertices_end();
173 for (; v_it!=v_end; ++v_it)
174 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
179 PolyMesh::VertexIter v_it = mesh.vertices_begin();
180 PolyMesh::VertexIter v_end = mesh.vertices_end();
181 for (; v_it!=v_end; ++v_it)
182 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
185 #ifdef ENABLE_TSPLINEMESH_SUPPORT 186 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
188 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
189 TSplineMesh::VertexIter v_it = mesh.vertices_begin();
190 TSplineMesh::VertexIter v_end = mesh.vertices_end();
191 for (; v_it!=v_end; ++v_it)
192 mesh.set_point(v_it,mesh.point(v_it) + _vector );
196 #ifdef ENABLE_POLYLINE_SUPPORT 201 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
205 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 211 for (; v_it != v_end; ++v_it)
215 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 221 for (; v_it != v_end; ++v_it)
225 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 231 for (; v_it != v_end; ++v_it)
235 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 237 std::cerr <<
"Todo : translate BSplineCurve" << std::endl;
243 emit scriptInfo(
"translate( ObjectId , Vector(" +
244 QString::number( _vector[0] ) +
" , " +
245 QString::number( _vector[1] ) +
" , " +
246 QString::number( _vector[2] ) +
" ) )" );
261 emit log(
LOGERR,tr(
"translate : unable to get object") );
269 for (uint i=0; i < _vHandles.size(); i++){
271 mesh.set_point(vh ,mesh.point( vh ) + _vector );
278 for (uint i=0; i < _vHandles.size(); i++){
280 mesh.set_point(vh ,mesh.point( vh ) + _vector );
283 #ifdef ENABLE_TSPLINEMESH_SUPPORT 284 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
286 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
288 for (uint i=0; i < _vHandles.size(); i++){
289 TSplineMesh::VertexHandle vh( _vHandles[i] );
290 mesh.set_point(vh ,mesh.point( vh ) + _vector );
294 #ifdef ENABLE_POLYLINE_SUPPORT 301 for (
unsigned int i = 0 ; i < _vHandles.size(); ++i )
302 if ( (_vHandles[i] > 0) && ( _vHandles[i] < max ) )
303 line.
point( _vHandles[i] ) = line.
point( _vHandles[i] ) + _vector;
306 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 310 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
316 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 320 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
326 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 330 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
336 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 338 std::cerr <<
"Todo : translate BSplineCurve" << std::endl;
344 emit scriptInfo(
"translate( ObjectId , Vector(" +
345 QString::number( _vector[0] ) +
" , " +
346 QString::number( _vector[1] ) +
" , " +
347 QString::number( _vector[2] ) +
" ) )" );
363 emit log(
LOGERR,tr(
"translate : unable to get object" ));
367 bool noneSelected =
true;
372 TriMesh::VertexIter v_it = mesh.vertices_begin();
373 TriMesh::VertexIter v_end = mesh.vertices_end();
374 for (; v_it!=v_end; ++v_it)
375 if ( mesh.status(*v_it).selected() ) {
376 noneSelected =
false;
377 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
383 PolyMesh::VertexIter v_it = mesh.vertices_begin();
384 PolyMesh::VertexIter v_end = mesh.vertices_end();
385 for (; v_it!=v_end; ++v_it)
386 if ( mesh.status(*v_it).selected() ) {
387 noneSelected =
false;
388 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
391 #ifdef ENABLE_TSPLINEMESH_SUPPORT 392 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
394 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
395 TSplineMesh::VertexIter v_it = mesh.vertices_begin();
396 TSplineMesh::VertexIter v_end = mesh.vertices_end();
397 for (; v_it!=v_end; ++v_it)
398 if ( mesh.status(v_it).selected() ) {
399 noneSelected =
false;
400 mesh.set_point(v_it,mesh.point(v_it) + _vector );
404 #ifdef ENABLE_POLYLINE_SUPPORT 409 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
410 if ( line.vertex_selection(i) ) {
411 noneSelected =
false;
416 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 423 for (; v_it != v_end; ++v_it)
424 if (statusAttrib[*v_it].selected()) {
425 noneSelected =
false;
430 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 437 for (; v_it != v_end; ++v_it)
438 if (statusAttrib[*v_it].selected()) {
439 noneSelected =
false;
444 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 451 for (; v_it != v_end; ++v_it)
452 if (statusAttrib[*v_it].selected()) {
453 noneSelected =
false;
458 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 460 std::cerr <<
"Todo : translate BSplineCurve" << std::endl;
469 emit scriptInfo(
"translate( ObjectId , Vector(" +
470 QString::number( _vector[0] ) +
" , " +
471 QString::number( _vector[1] ) +
" , " +
472 QString::number( _vector[2] ) +
" ) )" );
487 emit log(
LOGERR,tr(
"translate : unable to get object" ));
491 bool noneSelected =
true;
498 TriMesh::VertexIter v_it, v_end( mesh.vertices_end() );
499 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
500 mesh.status(*v_it).set_tagged(
false);
502 TriMesh::FaceIter f_it = mesh.faces_begin();
503 TriMesh::FaceIter f_end = mesh.faces_end();
504 for (; f_it!=f_end; ++f_it)
505 if ( mesh.status(*f_it).selected() )
507 for(TriMesh::FVIter fv_it = mesh.fv_iter(*f_it); fv_it.is_valid(); ++fv_it) {
508 noneSelected =
false;
509 mesh.status(*fv_it).set_tagged(
true);
516 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
517 if ( mesh.status(*v_it).tagged() )
518 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
525 PolyMesh::VertexIter v_it, v_end( mesh.vertices_end() );
526 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
527 mesh.status(*v_it).set_tagged(
false);
529 PolyMesh::FaceIter f_it = mesh.faces_begin();
530 PolyMesh::FaceIter f_end = mesh.faces_end();
531 for (; f_it!=f_end; ++f_it)
532 if ( mesh.status(*f_it).selected() )
534 for(TriMesh::FVIter fv_it = mesh.fv_iter(*f_it); fv_it.is_valid(); ++fv_it) {
535 noneSelected =
false;
536 mesh.status(*fv_it).set_tagged(
true);
543 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
544 if ( mesh.status(*v_it).tagged() )
545 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
547 #ifdef ENABLE_TSPLINEMESH_SUPPORT 548 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
550 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
553 TSplineMesh::VertexIter v_it, v_end( mesh.vertices_end() );
554 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
555 mesh.status(*v_it).set_tagged(
false);
557 TSplineMesh::FaceIter f_it = mesh.faces_begin();
558 TSplineMesh::FaceIter f_end = mesh.faces_end();
559 for (; f_it!=f_end; ++f_it)
560 if ( mesh.status(f_it).selected() )
562 for(TriMesh::FVIter fv_it = mesh.fv_iter(f_it); fv_it; ++fv_it) {
563 noneSelected =
false;
564 mesh.status(fv_it).set_tagged(
true);
571 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
572 if ( mesh.status(v_it).tagged() )
573 mesh.set_point(v_it,mesh.point(v_it) + _vector );
577 #ifdef ENABLE_POLYLINE_SUPPORT 582 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
583 if ( line.vertex_selection(i) ) {
584 noneSelected =
false;
592 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 594 std::cerr <<
"Todo : translate BSplineCurve" << std::endl;
600 emit scriptInfo(
"translate( ObjectId , Vector(" +
601 QString::number( _vector[0] ) +
" , " +
602 QString::number( _vector[1] ) +
" , " +
603 QString::number( _vector[2] ) +
" ) )" );
619 emit log(
LOGERR,tr(
"translate : unable to get object" ));
623 bool noneSelected =
true;
630 TriMesh::VertexIter v_it, v_end( mesh.vertices_end() );
631 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
632 mesh.status(*v_it).set_tagged(
false);
634 TriMesh::EdgeIter e_it = mesh.edges_begin();
635 TriMesh::EdgeIter e_end = mesh.edges_end();
636 for (; e_it!=e_end; ++e_it)
637 if ( mesh.status(*e_it).selected() )
639 noneSelected =
false;
640 TriMesh::HalfedgeHandle hh = mesh.halfedge_handle( *e_it, 0 );
642 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
643 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
649 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
650 if ( mesh.status(*v_it).tagged() ){
651 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
659 PolyMesh::VertexIter v_it, v_end( mesh.vertices_end() );
660 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
661 mesh.status(*v_it).set_tagged(
false);
663 PolyMesh::EdgeIter e_it = mesh.edges_begin();
664 PolyMesh::EdgeIter e_end = mesh.edges_end();
665 for (; e_it!=e_end; ++e_it)
666 if ( mesh.status(*e_it).selected() )
668 noneSelected =
false;
669 PolyMesh::HalfedgeHandle hh = mesh.halfedge_handle( *e_it, 0 );
671 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
672 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
678 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
679 if ( mesh.status(*v_it).tagged() ){
680 mesh.set_point(*v_it,mesh.point(*v_it) + _vector );
683 #ifdef ENABLE_TSPLINEMESH_SUPPORT 684 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
686 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
689 TSplineMesh::VertexIter v_it, v_end( mesh.vertices_end() );
690 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
691 mesh.status(v_it).set_tagged(
false);
693 TSplineMesh::EdgeIter e_it = mesh.edges_begin();
694 TSplineMesh::EdgeIter e_end = mesh.edges_end();
695 for (; e_it!=e_end; ++e_it)
696 if ( mesh.status(e_it).selected() )
698 noneSelected =
false;
699 PolyMesh::HalfedgeHandle hh = mesh.halfedge_handle( e_it, 0 );
701 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
702 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
708 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
709 if ( mesh.status(v_it).tagged() ){
710 mesh.set_point(v_it,mesh.point(v_it) + _vector );
715 #ifdef ENABLE_POLYLINE_SUPPORT 720 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
721 if ( line.vertex_selection(i) ) {
722 noneSelected =
false;
730 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 732 std::cerr <<
"Todo : translate BSplineCurve" << std::endl;
738 emit scriptInfo(
"translate( ObjectId , Vector(" +
739 QString::number( _vector[0] ) +
" , " +
740 QString::number( _vector[1] ) +
" , " +
741 QString::number( _vector[2] ) +
" ) )" );
750 emit log(
LOGERR, tr(
"transformHandleRegion: Unable to get object!"));
781 emit log(
LOGERR,tr(
"transform : unable to get object" ));
792 TriMesh::VertexIter v_it = mesh.vertices_begin();
793 TriMesh::VertexIter v_end = mesh.vertices_end();
794 for (; v_it!=v_end; ++v_it){
795 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
796 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
802 PolyMesh::VertexIter v_it = mesh.vertices_begin();
803 PolyMesh::VertexIter v_end = mesh.vertices_end();
804 for (; v_it!=v_end; ++v_it){
805 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
806 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
809 #ifdef ENABLE_TSPLINEMESH_SUPPORT 810 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
812 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
813 TSplineMesh::VertexIter v_it = mesh.vertices_begin();
814 TSplineMesh::VertexIter v_end = mesh.vertices_end();
815 for (; v_it!=v_end; ++v_it){
821 #ifdef ENABLE_POLYLINE_SUPPORT 826 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
830 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 837 for (; v_it != v_end; ++v_it) {
843 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 850 for (; v_it != v_end; ++v_it) {
856 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 863 for (; v_it != v_end; ++v_it) {
869 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 871 std::cerr <<
"Todo : transform BSplineCurve" << std::endl;
878 for (
int i=0; i < 4; i++)
879 for (
int j=0; j < 4; j++)
880 matString +=
" , " + QString::number( _matrix(i,j) );
882 matString = matString.right( matString.length()-3 );
884 emit scriptInfo(
"transform( ObjectId , Matrix4x4(" + matString +
" ) )" );
900 emit log(
LOGERR,tr(
"transform : unable to get object" ));
912 for (uint i=0; i < _vHandles.size(); i++){
922 for (uint i=0; i < _vHandles.size(); i++){
928 #ifdef ENABLE_TSPLINEMESH_SUPPORT 929 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
931 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
933 for (uint i=0; i < _vHandles.size(); i++){
934 TSplineMesh::VertexHandle vh( _vHandles[i] );
940 #ifdef ENABLE_POLYLINE_SUPPORT 947 for (
unsigned int i = 0 ; i < _vHandles.size(); ++i )
948 if ( (_vHandles[i] > 0) && ( _vHandles[i] < max ) )
953 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 958 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
965 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 970 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
977 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 982 for (
unsigned int i = 0; i < _vHandles.size(); ++i) {
989 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 991 std::cerr <<
"Todo : transform BSplineCurve" << std::endl;
998 for (
int i=0; i < 4; i++)
999 for (
int j=0; j < 4; j++)
1000 matString +=
" , " + QString::number( _matrix(i,j) );
1002 matString = matString.right( matString.length()-3 );
1004 emit scriptInfo(
"transform( ObjectId , Matrix4x4(" + matString +
" ) )" );
1021 emit log(
LOGERR,tr(
"transform : unable to get object") );
1029 bool noneSelected =
true;
1033 TriMesh::VertexIter v_it = mesh.vertices_begin();
1034 TriMesh::VertexIter v_end = mesh.vertices_end();
1035 for (; v_it!=v_end; ++v_it)
1036 if ( mesh.status(*v_it).selected() )
1038 noneSelected =
false;
1039 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1040 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1046 PolyMesh::VertexIter v_it = mesh.vertices_begin();
1047 PolyMesh::VertexIter v_end = mesh.vertices_end();
1048 for (; v_it!=v_end; ++v_it)
1049 if ( mesh.status(*v_it).selected() )
1051 noneSelected =
false;
1052 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1053 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1056 #ifdef ENABLE_TSPLINEMESH_SUPPORT 1057 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
1059 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
1060 TSplineMesh::VertexIter v_it = mesh.vertices_begin();
1061 TSplineMesh::VertexIter v_end = mesh.vertices_end();
1062 for (; v_it!=v_end; ++v_it)
1063 if ( mesh.status(v_it).selected() )
1065 noneSelected =
false;
1067 mesh.set_normal(v_it, normalMatrix.
transform_vector( mesh.normal(v_it) ) );
1071 #ifdef ENABLE_POLYLINE_SUPPORT 1076 for (
int i = 0 ; i < (int)line.
n_vertices(); ++i )
1077 if ( line.vertex_selection(i) ) {
1078 noneSelected =
false;
1083 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 1085 std::cerr <<
"Todo : transform BSplineCurve" << std::endl;
1088 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 1095 for (; v_it!=v_end; ++v_it)
1096 if ( statusAttrib[*v_it].selected() )
1098 noneSelected =
false;
1100 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1104 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 1111 for (; v_it!=v_end; ++v_it)
1112 if ( statusAttrib[*v_it].selected() )
1114 noneSelected =
false;
1116 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1120 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 1127 for (; v_it!=v_end; ++v_it)
1128 if ( statusAttrib[*v_it].selected() )
1130 noneSelected =
false;
1132 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1143 for (
int i=0; i < 4; i++)
1144 for (
int j=0; j < 4; j++)
1145 matString +=
" , " + QString::number( _matrix(i,j) );
1147 matString = matString.right( matString.length()-3 );
1149 emit scriptInfo(
"transformVertexSelection( ObjectId , Matrix4x4(" + matString +
" ) )" );
1167 emit log(
LOGERR,tr(
"transform : unable to get object") );
1175 bool noneSelected =
true;
1181 TriMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1182 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1183 mesh.status(*v_it).set_tagged(
false);
1185 TriMesh::FaceIter f_it = mesh.faces_begin();
1186 TriMesh::FaceIter f_end = mesh.faces_end();
1187 for (; f_it!=f_end; ++f_it)
1188 if ( mesh.status(*f_it).selected() )
1190 noneSelected =
false;
1191 for(TriMesh::FVIter fv_it = mesh.fv_iter(*f_it); fv_it.is_valid(); ++fv_it)
1192 mesh.status(*fv_it).set_tagged(
true);
1195 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1196 if ( mesh.status(*v_it).tagged() ){
1197 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1198 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1206 PolyMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1207 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1208 mesh.status(*v_it).set_tagged(
false);
1210 PolyMesh::FaceIter f_it = mesh.faces_begin();
1211 PolyMesh::FaceIter f_end = mesh.faces_end();
1212 for (; f_it!=f_end; ++f_it)
1213 if ( mesh.status(*f_it).selected() )
1215 noneSelected =
false;
1216 for(PolyMesh::FVIter fv_it = mesh.fv_iter(*f_it); fv_it.is_valid(); ++fv_it)
1217 mesh.status(*fv_it).set_tagged(
true);
1220 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1221 if ( mesh.status(*v_it).tagged() ){
1222 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1223 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1226 #ifdef ENABLE_TSPLINEMESH_SUPPORT 1227 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
1229 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
1232 TSplineMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1233 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1234 mesh.status(v_it).set_tagged(
false);
1236 TSplineMesh::FaceIter f_it = mesh.faces_begin();
1237 TSplineMesh::FaceIter f_end = mesh.faces_end();
1238 for (; f_it!=f_end; ++f_it)
1239 if ( mesh.status(f_it).selected() )
1241 noneSelected =
false;
1242 for(TSplineMesh::FVIter fv_it = mesh.fv_iter(f_it); fv_it; ++fv_it)
1243 mesh.status(fv_it).set_tagged(
true);
1246 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1247 if ( mesh.status(v_it).tagged() ){
1249 mesh.set_normal(v_it, normalMatrix.
transform_vector( mesh.normal(v_it) ) );
1253 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 1264 statusAttrib[*v_it].set_tagged(
false);
1268 for (; f_it!=f_end; ++f_it)
1269 if ( statusAttrib[*f_it].selected() )
1271 noneSelected =
false;
1273 statusAttrib[*hfv_it].set_tagged(
true);
1277 if ( statusAttrib[*v_it].tagged() )
1280 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1285 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 1296 statusAttrib[*v_it].set_tagged(
false);
1300 for (; f_it!=f_end; ++f_it)
1301 if ( statusAttrib[*f_it].selected() )
1303 noneSelected =
false;
1305 statusAttrib[*hfv_it].set_tagged(
true);
1309 if ( statusAttrib[*v_it].tagged() )
1312 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1317 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 1328 statusAttrib[*v_it].set_tagged(
false);
1332 for (; f_it!=f_end; ++f_it)
1333 if ( statusAttrib[*f_it].selected() )
1335 noneSelected =
false;
1337 statusAttrib[*hfv_it].set_tagged(
true);
1341 if ( statusAttrib[*v_it].tagged() )
1344 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1355 for (
int i=0; i < 4; i++)
1356 for (
int j=0; j < 4; j++)
1357 matString +=
" , " + QString::number( _matrix(i,j) );
1359 matString = matString.right( matString.length()-3 );
1361 emit scriptInfo(
"transformFaceSelection( ObjectId , Matrix4x4(" + matString +
" ) )" );
1379 emit log(
LOGERR,tr(
"transform : unable to get object" ) );
1387 bool noneSelected =
true;
1393 TriMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1394 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1395 mesh.status(*v_it).set_tagged(
false);
1397 TriMesh::EdgeIter e_it = mesh.edges_begin();
1398 TriMesh::EdgeIter e_end = mesh.edges_end();
1399 for (; e_it!=e_end; ++e_it)
1400 if ( mesh.status(*e_it).selected() )
1402 noneSelected =
false;
1403 TriMesh::HalfedgeHandle hh = mesh.halfedge_handle( *e_it, 0 );
1405 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
1406 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
1409 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1410 if ( mesh.status(*v_it).tagged() ){
1411 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1412 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1420 PolyMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1421 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1422 mesh.status(*v_it).set_tagged(
false);
1424 PolyMesh::EdgeIter e_it = mesh.edges_begin();
1425 PolyMesh::EdgeIter e_end = mesh.edges_end();
1426 for (; e_it!=e_end; ++e_it)
1427 if ( mesh.status(*e_it).selected() )
1429 noneSelected =
false;
1430 PolyMesh::HalfedgeHandle hh = mesh.halfedge_handle( *e_it, 0 );
1432 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
1433 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
1436 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1437 if ( mesh.status(*v_it).tagged() ){
1438 mesh.set_point (*v_it, _matrix.
transform_point ( mesh.point(*v_it) ) );
1439 mesh.set_normal(*v_it, normalMatrix.
transform_vector( mesh.normal(*v_it) ) );
1442 #ifdef ENABLE_TSPLINEMESH_SUPPORT 1443 else if ( object->
dataType( DATA_TSPLINE_MESH ) ) {
1445 TSplineMesh& mesh = (*PluginFunctions::tsplineMesh(
object));
1448 TSplineMesh::VertexIter v_it, v_end( mesh.vertices_end() );
1449 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1450 mesh.status(v_it).set_tagged(
false);
1452 TSplineMesh::EdgeIter e_it = mesh.edges_begin();
1453 TSplineMesh::EdgeIter e_end = mesh.edges_end();
1454 for (; e_it!=e_end; ++e_it)
1455 if ( mesh.status(e_it).selected() )
1457 noneSelected =
false;
1458 TSplineMesh::HalfedgeHandle hh = mesh.halfedge_handle( e_it, 0 );
1460 mesh.status( mesh.from_vertex_handle( hh ) ).set_tagged(
true);
1461 mesh.status( mesh.to_vertex_handle( hh ) ).set_tagged(
true);
1464 for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
1465 if ( mesh.status(v_it).tagged() ){
1467 mesh.set_normal(v_it, normalMatrix.
transform_vector( mesh.normal(v_it) ) );
1471 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 1482 statusAttrib[*v_it].set_tagged(
false);
1486 for (; e_it!=e_end; ++e_it)
1487 if ( statusAttrib[*e_it].selected() )
1489 noneSelected =
false;
1491 statusAttrib[e.from_vertex()].set_tagged(
true);
1492 statusAttrib[e.to_vertex()].set_tagged(
true);
1496 if ( statusAttrib[*v_it].tagged() )
1499 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1504 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 1515 statusAttrib[*v_it].set_tagged(
false);
1519 for (; e_it!=e_end; ++e_it)
1520 if ( statusAttrib[*e_it].selected() )
1522 noneSelected =
false;
1524 statusAttrib[e.from_vertex()].set_tagged(
true);
1525 statusAttrib[e.to_vertex()].set_tagged(
true);
1529 if ( statusAttrib[*v_it].tagged() )
1532 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1537 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 1548 statusAttrib[*v_it].set_tagged(
false);
1552 for (; e_it!=e_end; ++e_it)
1553 if ( statusAttrib[*e_it].selected() )
1555 noneSelected =
false;
1557 statusAttrib[e.from_vertex()].set_tagged(
true);
1558 statusAttrib[e.to_vertex()].set_tagged(
true);
1562 if ( statusAttrib[*v_it].tagged() )
1565 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1571 #ifdef ENABLE_POLYLINE_SUPPORT 1573 std::cerr <<
"Todo : transform PolyLine" << std::endl;
1576 #ifdef ENABLE_BSPLINE_CURVE_SUPPORT 1578 std::cerr <<
"Todo : transform BSplineCurve" << std::endl;
1588 for (
int i=0; i < 4; i++)
1589 for (
int j=0; j < 4; j++)
1590 matString +=
" , " + QString::number( _matrix(i,j) );
1592 matString = matString.right( matString.length()-3 );
1594 emit scriptInfo(
"transformEdgeSelection( ObjectId , Matrix4x4(" + matString +
" ) )" );
1611 emit log(
LOGERR,tr(
"transform : unable to get object") );
1619 bool noneSelected =
true;
1621 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 1632 statusAttrib[*v_it].set_tagged(
false);
1636 for (; c_it!=c_end; ++c_it)
1637 if ( statusAttrib[*c_it].selected() )
1639 noneSelected =
false;
1641 statusAttrib[*cv_it].set_tagged(
true);
1645 if ( statusAttrib[*v_it].tagged() )
1648 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1653 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT 1664 statusAttrib[*v_it].set_tagged(
false);
1668 for (; c_it!=c_end; ++c_it)
1669 if ( statusAttrib[*c_it].selected() )
1671 noneSelected =
false;
1673 statusAttrib[*cv_it].set_tagged(
true);
1677 if ( statusAttrib[*v_it].tagged() )
1680 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1685 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 1696 statusAttrib[*v_it].set_tagged(
false);
1700 for (; c_it!=c_end; ++c_it)
1701 if ( statusAttrib[*c_it].selected() )
1703 noneSelected =
false;
1705 statusAttrib[*cv_it].set_tagged(
true);
1709 if ( statusAttrib[*v_it].tagged() )
1712 normalAttrib[*v_it] = normalMatrix.
transform_vector( normalAttrib[*v_it] );
1723 for (
int i=0; i < 4; i++)
1724 for (
int j=0; j < 4; j++)
1725 matString +=
" , " + QString::number( _matrix(i,j) );
1727 matString = matString.right( matString.length()-3 );
1729 emit scriptInfo(
"transformCellSelection( ObjectId , Matrix4x4(" + matString +
" ) )" );
1746 emit log(
LOGERR,tr(
"setManipulatorPosition : unable to get object") );
1754 object->manipPlaced(
true );
1756 object->manipulatorNode()->loadIdentity();
1757 object->manipulatorNode()->set_center(_position);
1758 object->manipulatorNode()->set_draw_cylinder(
true);
1760 object->manipulatorNode()->show();
1772 emit scriptInfo(
"setManipulatorPosition( ObjectId , Vector(" +
1773 QString::number( _position[0] ) +
" , " +
1774 QString::number( _position[1] ) +
" , " +
1775 QString::number( _position[2] ) +
" ) )" );
1790 emit log(
LOGERR,tr(
"manipulatorPosition : unable to get object" ));
1794 return (
Vector)
object->manipulatorNode()->center();
1810 emit log(
LOGERR,tr(
"setManipulatorDirection : unable to get object") );
1815 emit log(
LOGERR,tr(
"setManipulatorDirection : manipulator position has to be set first" ));
1819 object->manipulatorNode()->set_direction(_directionX, _directionY);
1821 emit scriptInfo(
"setManipulatorDirection( ObjectId , Vector(" +
1822 QString::number( _directionX[0] ) +
" , " +
1823 QString::number( _directionX[1] ) +
" , " +
1824 QString::number( _directionX[2] ) +
" ), Vector(" +
1825 QString::number( _directionY[0] ) +
" , " +
1826 QString::number( _directionY[1] ) +
" , " +
1827 QString::number( _directionY[2] ) +
" ) )" );
1842 emit log(
LOGERR,tr(
"manipulatorDirection : unable to get object" ));
1846 return (
Vector)
object->manipulatorNode()->directionX();
1861 emit log(
LOGERR,tr(
"manipulatorDirection : unable to get object" ));
1865 return (
Vector)
object->manipulatorNode()->directionY();
1880 emit log(
LOGERR,tr(
"manipulatorDirection : unable to get object" ));
1884 return (
Vector)
object->manipulatorNode()->directionZ();
1893 emit log(
LOGERR,tr(
"objectRenderingMatrixIdentity : unable to get object" ));
1897 object->manipulatorNode()->loadIdentity();
1908 emit log(
LOGERR,tr(
"objectRenderingMatrixScale : unable to get object" ));
1912 object->manipulatorNode()->scale(_s);
1923 emit log(
LOGERR,tr(
"objectRenderingMatrixTranslate : unable to get object" ));
1927 object->manipulatorNode()->translate(_translation);
1938 emit log(
LOGERR,tr(
"objectRenderingMatrixRotate : unable to get object" ));
1942 object->manipulatorNode()->rotate(_angle,_axis);
1953 emit log(
LOGERR,tr(
"getObjectRenderingMatrix : unable to get object" ));
1957 return object->manipulatorNode()->matrix();
bool invert()
matrix inversion (returns true on success)
bool transformCellSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
bool transformFaceSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
Point & point(unsigned int _i)
Get a point of the polyline.
ACG::Matrix4x4d Matrix4x4
Standard Type for a 4x4 Matrix used for scripting.
void setDescriptions()
Set Descriptions for scriptable functions.
size_t n_vertices() const
Get number of vertices.
bool manipPlaced()
Check if the manipulator has been placed.
void transform(int _objectId, Matrix4x4 _matrix)
transform an Object by a given matrix
void transformHandleRegion(int _objectId, Matrix4x4 _matrix)
Transform handle region using the given transformation matrix.
bool dataType(DataType _type) const
VectorT< T, 3 > transform_point(const VectorT< T, 3 > &_v) const
transform point (x',y',z',1) = M * (x,y,z,1)
Vector manipulatorDirectionZ(int _objectId)
Get the z-direction of the manipulator.
void translate(int _objectId, Vector _vector)
translate an Object by a given vector
Kernel::VertexHandle VertexHandle
Handle for referencing the corresponding item.
const UpdateType UPDATE_VISIBILITY(UpdateTypeSet(1)<< 1)
This is the update identifier for global Object visibility ( show/hide )
Vector manipulatorDirectionX(int _objectId)
Get the x-direction of the manipulator.
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.
void transpose()
transpose matrix
double manip_size_
Size for the manipulators.
#define DATA_TETRAHEDRAL_MESH
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
PolyhedralMesh * polyhedralMesh(BaseObjectData *_object)
Get an PolyhedralMesh from an object.
HexahedralMesh * hexahedralMesh(BaseObjectData *_object)
Get an HexahedralMesh from an object.
void setManipulatorDirection(int _objectId, Vector _directionX, Vector _directionY)
Set the direction of the manipulator.
const UpdateType UPDATE_GEOMETRY(UpdateTypeSet(1)<< 2)
Geometry updated.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
void objectRenderingMatrixScale(int _objectId, double _s)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
#define DATA_HEXAHEDRAL_MESH
bool transformVertexSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
void objectRenderingMatrixIdentity(int _objectId)
Sets the Object Matrix in the scenegraph to identity.
void ManipulatorPositionChanged(QtTranslationManipulatorNode *_node)
update object when its manipulator changes position
bool transformEdgeSelection(int _objectId, Matrix4x4 _matrix)
transform current selection of an Object by a given matrix
const VecT & vertex(const VertexHandle &_vh) const
Get point _vh's coordinates.
void translateFaceSelection(int _objectId, Vector _vector)
translate current face selection of an Object by a given vector
void manipulatorMoved(QtTranslationManipulatorNode *_node, QMouseEvent *_event)
move the object when its manipulator moves
double manip_size_modifier_
Modifier for the Size (changed by Mousewheel Events)
#define DATA_POLYHEDRAL_MESH
PolyLine * polyLine(BaseObjectData *_object)
Get a poly Line from an object.
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
void transformHandleVertices(ACG::Matrix4x4d _matrix, MeshT &_mesh)
ACG::Vec3d Vector
Standard Type for 3d Vector used for scripting.
double sceneRadius()
Returns the current scene radius from the active examiner widget.
#define DATA_TRIANGLE_MESH
void objectRenderingMatrixRotate(int _objectId, Vector _axis, double _angle)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
void translateEdgeSelection(int _objectId, Vector _vector)
translate current edge selection of an Object by a given vector
int lastActiveManipulator_
Stores the last manipulator which has been clicked ( used for the toolbox dialog) ...
Functions for modifying a Mesh.
void objectRenderingMatrixTranslate(int _objectId, Vector _translation)
Adds a scaling factor to the Object rendering Matrix in the scenegraph.
#define DATA_BSPLINE_CURVE
VectorT< T, 3 > transform_vector(const VectorT< T, 3 > &_v) const
transform vector (x',y',z',0) = A * (x,y,z,0)
void set_vertex(const VertexHandle &_vh, const VecT &_p)
Set the coordinates of point _vh.
Vector manipulatorDirectionY(int _objectId)
Get the y-direction of the manipulator.
Matrix4x4 getObjectRenderingMatrix(int _objectId)
Gets the Object Matrix in the scenegraph.
void setManipulatorPosition(int _objectId, Vector _position)
Set the position of the manipulator.
void translateVertexSelection(int _objectId, Vector _vector)
translate current vertex selection of an Object by a given vector
TetrahedralMesh * tetrahedralMesh(BaseObjectData *_object)
Get an TetrahedralMesh from an object.
QtTranslationManipulatorNode * manipulatorNode()
Vector manipulatorPosition(int _objectId)
Get the position of the manipulator.