54 #include "MeshObjectInfoPlugin.hh" 56 #include <MeshTools/MeshInfoT.hh> 58 #include <Math_Tools/Math_Tools.hh> 60 #include "ValenceHistogramDialog.hh" 66 InfoMeshObjectPlugin::InfoMeshObjectPlugin() :
70 lastPickedObjectId_(-1)
74 InfoMeshObjectPlugin::~InfoMeshObjectPlugin() {
80 void InfoMeshObjectPlugin::initializePlugin() {
90 if ( OpenFlipper::Options::gui()) {
98 connect(info_->valenceHistograms_pb, SIGNAL( clicked() ),
99 this, SLOT( slotShowHistogram() ));
102 info_->pickMode->setCurrentIndex(0);
104 emit addWidgetToStatusbar(infoBar_);
105 infoBar_->hideCounts();
118 template<
class MeshT >
119 void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh ,
int _id,
unsigned int _index,
ACG::Vec3d& _hitPoint ) {
125 int closestVertexIndex = -1;
126 int closestEdgeIndex = -1;
128 switch (info_->pickMode->currentIndex() ) {
130 closestVertexIndex = getClosestVertexInFace(_mesh, _index, _hitPoint);
131 closestEdgeIndex = getClosestEdgeInFace (_mesh, _index, _hitPoint);
135 closestVertexIndex = getClosestVertexFromEdge(_mesh, _index, _hitPoint);
136 closestEdgeIndex = _index;
140 closestVertexIndex = _index;
144 emit log(
LOGERR,
"Error: unknown picking mode in printMeshInfo");
155 info_->generalBox->setTitle( tr(
"General object information for %1").arg( obj->
name() ) );
158 info_->
id->setText( locale.toString(_id) );
160 info_->vertices->setText( locale.toString( qulonglong(_mesh->n_vertices() ) ) );
162 info_->faces->setText( locale.toString( qulonglong( _mesh->n_faces() ) ) );
164 info_->edges->setText( locale.toString( qulonglong( _mesh->n_edges() ) ) );
169 info_->closestFaceLabel->setText( tr(
"Picked Face:") );
170 info_->closestFaceLabel->show();
171 info_->faceHandle->setText( locale.toString( _index ) );
172 info_->faceHandle->show();
175 info_->closestVertexLabel->setText( tr(
"Closest Vertex:") );
176 info_->vertexHandle->setText( locale.toString( closestVertexIndex ) );
179 info_->closestEdgeLabel->setText( tr(
"Closest Edge:") );
180 info_->edgeHandle->setText( locale.toString( closestEdgeIndex ) );
181 info_->closestEdgeLabel->show();
182 info_->edgeHandle->show();
185 info_->edgeLengthLabel->setText( tr(
"Closest Edge Length:") );
186 info_->edgeLengthLabel->show();
187 const typename MeshT::Point from = _mesh->point(_mesh->from_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
188 const typename MeshT::Point to = _mesh->point(_mesh->to_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
189 info_->edgeLength->setText( locale.toString( (to - from).norm() ) );
190 info_->edgeLength->show();
193 typename MeshT::FaceHandle fh = _mesh->face_handle(_index);
195 typename MeshT::FaceVertexIter fv_it = _mesh->fv_iter(fh);
196 QString adjacentVertices;
198 if ( fv_it.is_valid() ){
199 adjacentVertices = QString::number( fv_it->idx() );
203 while( fv_it.is_valid() ){
204 adjacentVertices +=
"; " + QString::number( fv_it->idx() );
208 info_->adjVertexHandles->setText( adjacentVertices );
209 info_->adjVertexHandles->show();
210 info_->adjacentVertexLabel->show();
213 info_->normalLabel->setText(tr(
"Normal of picked face:"));
214 info_->normalX->setText( QString::number( _mesh->normal(fh)[0],
'f' ) );
215 info_->normalY->setText( QString::number( _mesh->normal(fh)[1],
'f' ) );
216 info_->normalZ->setText( QString::number( _mesh->normal(fh)[2],
'f' ) );
217 info_->normalLabel->show();
218 info_->normalLeft->show();
219 info_->normalX->show();
220 info_->normalY->show();
221 info_->normalZ->show();
222 info_->normalRight->show();
225 info_->closestVertexPosLabel->setText(tr(
"Closest Vertex on the mesh:"));
230 info_->closestFaceLabel->setText( tr(
"Adjacent Faces:") );
231 info_->closestFaceLabel->show();
232 typename MeshT::HalfedgeHandle he1 = _mesh->halfedge_handle(_mesh->edge_handle(_index),0);
233 typename MeshT::HalfedgeHandle he2 = _mesh->halfedge_handle(_mesh->edge_handle(_index),1);
235 int fh1 = _mesh->face_handle(he1).idx();
236 int fh2 = _mesh->face_handle(he2).idx();
238 info_->faceHandle->setText( locale.toString( fh1 ) +
";" + locale.toString( fh2 ) );
239 info_->faceHandle->show();
242 info_->adjVertexHandles->setText(QString::number( _mesh->from_vertex_handle(he1).idx() ) +
";" + QString::number( _mesh->to_vertex_handle(he1).idx() ));
243 info_->adjVertexHandles->show();
244 info_->adjacentVertexLabel->show();
247 info_->closestVertexLabel->setText( tr(
"Closest Vertex:") );
248 info_->vertexHandle->setText( locale.toString( closestVertexIndex ) );
251 info_->closestEdgeLabel->setText( tr(
"Picked Edge:") );
252 info_->edgeHandle->setText( locale.toString( closestEdgeIndex ) );
253 info_->closestEdgeLabel->show();
254 info_->edgeHandle->show();
257 info_->edgeLengthLabel->setText( tr(
"Edge Length:") );
258 info_->edgeLengthLabel->show();
259 const typename MeshT::Point from = _mesh->point(_mesh->from_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
260 const typename MeshT::Point to = _mesh->point(_mesh->to_vertex_handle( _mesh->halfedge_handle( _mesh->edge_handle(closestEdgeIndex),0 ) ));
261 info_->edgeLength->setText( locale.toString( (to - from).norm() ) );
262 info_->edgeLength->show();
265 info_->normalLabel->hide();
266 info_->normalLeft->hide();
267 info_->normalX->hide();
268 info_->normalY->hide();
269 info_->normalZ->hide();
270 info_->normalRight->hide();
273 info_->closestVertexPosLabel->setText(tr(
"Closest Vertex on the mesh:"));
278 info_->closestFaceLabel->hide();
279 info_->faceHandle->hide();
282 info_->adjVertexHandles->hide();
283 info_->adjacentVertexLabel->hide();
286 info_->closestVertexLabel->setText( tr(
"Picked Vertex:") );
287 info_->vertexHandle->setText( locale.toString( closestVertexIndex ) );
290 info_->closestEdgeLabel->hide();
291 info_->edgeHandle->hide();
294 info_->edgeLengthLabel->hide();
295 info_->edgeLength->hide();
298 typename MeshT::VertexHandle vh = _mesh->vertex_handle(_index);
299 info_->normalLabel->setText(tr(
"Normal of picked vertex:"));
300 info_->normalX->setText( QString::number( _mesh->normal(vh)[0],
'f' ) );
301 info_->normalY->setText( QString::number( _mesh->normal(vh)[1],
'f' ) );
302 info_->normalZ->setText( QString::number( _mesh->normal(vh)[2],
'f' ) );
303 info_->normalLabel->show();
304 info_->normalLeft->show();
305 info_->normalX->show();
306 info_->normalY->show();
307 info_->normalZ->show();
308 info_->normalRight->show();
311 info_->closestVertexPosLabel->setText(tr(
"Picked Vertex on the mesh:"));
314 info_->closestFaceLabel->setText( tr(
"Adjacent Edges:") );
315 info_->closestFaceLabel->show();
319 typename MeshT::VertexEdgeIter ve_it = _mesh->ve_iter(vh);
320 QString adjacentEdges;
322 if ( ve_it.is_valid() ){
323 adjacentEdges = QString::number( ve_it->idx() );
327 while( ve_it.is_valid() ){
328 adjacentEdges +=
"; " + QString::number( ve_it->idx() );
332 info_->faceHandle->setText( adjacentEdges );
333 info_->faceHandle->show();
337 info_->vertexX->setText( QString::number( _mesh->point( _mesh->vertex_handle(closestVertexIndex) )[0],
'f' ) );
338 info_->vertexY->setText( QString::number( _mesh->point( _mesh->vertex_handle(closestVertexIndex) )[1],
'f' ) );
339 info_->vertexZ->setText( QString::number( _mesh->point( _mesh->vertex_handle(closestVertexIndex) )[2],
'f' ) );
343 int compo_count = MeshInfo::componentCount(_mesh);
344 info_->components->setText( locale.toString(compo_count));
346 int boundary_count = MeshInfo::boundaryCount(_mesh);
347 info_->boundaries->setText( locale.toString(boundary_count) );
349 int chi = _mesh->n_vertices();
350 chi -= _mesh->n_edges();
351 chi += _mesh->n_faces();
353 float genus = compo_count - 0.5*(chi + boundary_count);
354 if(compo_count == 1 && boundary_count == 0)
355 info_->genus->setText( QString::number(genus) );
356 else if(compo_count != 1)
357 info_->genus->setText(
"(multiple components)" );
359 info_->genus->setText(
"(not manifold)" );
362 typename MeshT::VertexIter v_it;
363 typename MeshT::VertexIter v_end = _mesh->vertices_end();
365 float maxX = FLT_MIN;
366 float minX = FLT_MAX;
368 float maxY = FLT_MIN;
369 float minY = FLT_MAX;
371 float maxZ = FLT_MIN;
372 float minZ = FLT_MAX;
377 float maxE = FLT_MIN;
378 float minE = FLT_MAX;
382 for (v_it = _mesh->vertices_begin(); v_it != v_end; ++v_it){
383 typename MeshT::Point p = _mesh->point( *v_it );
384 if (p[0] < minX) minX = p[0];
385 if (p[0] > maxX) maxX = p[0];
387 if (p[1] < minY) minY = p[1];
388 if (p[1] > maxY) maxY = p[1];
390 if (p[2] < minZ) minZ = p[2];
391 if (p[2] > maxZ) maxZ = p[2];
398 typename MeshT::VertexVertexIter vv_it;
400 for (vv_it=_mesh->vv_iter( *v_it ); vv_it.is_valid(); ++vv_it){
403 typename MeshT::Point p2 = _mesh->point( *vv_it );
404 typename MeshT::Scalar len = (p2 - p).norm();
406 if (len < minE) minE = len;
407 if (len > maxE) maxE = len;
411 if (valence < minV) minV = valence;
412 if (valence > maxV) maxV = valence;
419 info_->valenceMin->setText( QString::number(minV) );
420 info_->valenceMean->setText( QString::number( sumV / (
float)_mesh->n_vertices(),
'f' ) );
421 info_->valenceMax->setText( QString::number(maxV) );
426 if (_mesh->n_edges() >0 ) {
427 info_->edgeMin->setText( QString::number(minE,
'f') );
428 info_->edgeMean->setText( QString::number( sumE / (_mesh->n_edges()*2),
'f' ) );
429 info_->edgeMax->setText( QString::number(maxE,
'f') );
431 info_->edgeMin->setText(
"-" );
432 info_->edgeMean->setText(
"-" );
433 info_->edgeMax->setText(
"-" );
440 if (_mesh->n_faces() > 0 ) {
441 typename MeshT::FaceIter f_it;
442 typename MeshT::FaceIter f_end = _mesh->faces_end();
444 float maxA = FLT_MIN;
445 float minA = FLT_MAX;
447 float maxI = FLT_MIN;
448 float minI = FLT_MAX;
450 float maxD = FLT_MIN;
451 float minD = FLT_MAX;
454 unsigned int maxFValence = std::numeric_limits<unsigned int>::min();
455 unsigned int minFValence = std::numeric_limits<unsigned int>::max();
456 size_t sumFValence = 0;
459 for (f_it = _mesh->faces_begin(); f_it != f_end; ++f_it){
460 typename MeshT::ConstFaceVertexIter cfv_it = _mesh->cfv_iter(*f_it);
462 const typename MeshT::Point v0 = _mesh->point( *cfv_it );
464 const typename MeshT::Point v1 = _mesh->point( *cfv_it );
466 const typename MeshT::Point v2 = _mesh->point( *cfv_it );
470 if (aspect < minA) minA = aspect;
471 if (aspect > maxA) maxA = aspect;
476 double angle = OpenMesh::rad_to_deg(acos(
OpenMesh::sane_aarg( MathTools::sane_normalized(v2 - v0) | MathTools::sane_normalized(v1 - v0) )));
478 if (angle < minI) minI = angle;
479 if (angle > maxI) maxI = angle;
482 angle = OpenMesh::rad_to_deg(acos(
OpenMesh::sane_aarg( MathTools::sane_normalized(v2 - v1) | MathTools::sane_normalized(v0 - v1) )));
484 if (angle < minI) minI = angle;
485 if (angle > maxI) maxI = angle;
488 angle = OpenMesh::rad_to_deg(acos(
OpenMesh::sane_aarg( MathTools::sane_normalized(v1 - v2) | MathTools::sane_normalized(v0 - v2) )));
490 if (angle < minI) minI = angle;
491 if (angle > maxI) maxI = angle;
495 typename MeshT::FaceFaceIter ff_it;
496 const typename MeshT::Normal n1 = _mesh->normal(*f_it);
498 for (ff_it = _mesh->ff_iter(*f_it); ff_it.is_valid(); ++ff_it){
500 const typename MeshT::Normal n2 = _mesh->normal(*ff_it);
502 angle = OpenMesh::rad_to_deg(acos(
OpenMesh::sane_aarg( MathTools::sane_normalized(n1) | MathTools::sane_normalized(n2) )));
504 if (angle < minD) minD = angle;
505 if (angle > maxD) maxD = angle;
510 const unsigned int valence = _mesh->valence(*f_it);
511 minFValence = std::min(minFValence, valence);
512 maxFValence = std::max(maxFValence, valence);
513 sumFValence += valence;
516 info_->aspectMin->setText( QString::number(minA,
'f') );
517 info_->aspectMean->setText( QString::number( sumA / _mesh->n_faces(),
'f' ) );
518 info_->aspectMax->setText( QString::number(maxA,
'f') );
521 info_->angleMin->setText( QString::number(minI,
'f') );
522 info_->angleMean->setText(
"-" );
523 info_->angleMax->setText( QString::number(maxI,
'f') );
525 info_->faceValenceMin->setText(trUtf8(
"%1").arg(minFValence));
526 info_->faceValenceMax->setText(trUtf8(
"%1").arg(maxFValence));
527 info_->faceValenceMean->setText(trUtf8(
"%1").arg( static_cast<float>(sumFValence) / _mesh->n_faces()));
529 if ( _mesh->n_faces() > 1 ) {
530 info_->dihedralMin->setText( QString::number(minD,
'f') );
531 info_->dihedralMean->setText( QString::number( sumD / numD,
'f' ) );
532 info_->dihedralMax->setText( QString::number(maxD,
'f') );
534 info_->dihedralMin->setText(
"-" );
535 info_->dihedralMean->setText(
"-" );
536 info_->dihedralMax->setText(
"-" );
541 info_->aspectMin->setText(
"-" );
542 info_->aspectMean->setText(
"-" );
543 info_->aspectMax->setText(
"-" );
546 info_->angleMin->setText(
"-" );
547 info_->angleMean->setText(
"-" );
548 info_->angleMax->setText(
"-" );
550 info_->faceValenceMin->setText(
"-");
551 info_->faceValenceMax->setText(
"-");
552 info_->faceValenceMean->setText(
"-");
554 info_->dihedralMin->setText(
"-" );
555 info_->dihedralMean->setText(
"-" );
556 info_->dihedralMax->setText(
"-" );
563 MeshInfo::getBoundingBox(_mesh, min, max);
568 info_->bbMinX->setText( QString::number(min[0],
'f') );
569 info_->bbMinY->setText( QString::number(min[1],
'f') );
570 info_->bbMinZ->setText( QString::number(min[2],
'f') );
572 info_->bbMaxX->setText( QString::number(max[0],
'f') );
573 info_->bbMaxY->setText( QString::number(max[1],
'f') );
574 info_->bbMaxZ->setText( QString::number(max[2],
'f') );
576 info_->bbSizeX->setText( QString::number(diff[0],
'f') );
577 info_->bbSizeY->setText( QString::number(diff[1],
'f') );
578 info_->bbSizeZ->setText( QString::number(diff[2],
'f') );
583 info_->cogX->setText( QString::number(cog[0],
'f') );
584 info_->cogY->setText( QString::number(cog[1],
'f') );
585 info_->cogZ->setText( QString::number(cog[2],
'f') );
588 info_->pointX->setText( QString::number( _hitPoint[0],
'f' ) );
589 info_->pointY->setText( QString::number( _hitPoint[1],
'f' ) );
590 info_->pointZ->setText( QString::number( _hitPoint[2],
'f' ) );
592 info_->setWindowFlags(info_->windowFlags() | Qt::WindowStaysOnTopHint);
609 template <
class MeshT>
612 typename MeshT::FaceVertexIter fv_it;
614 int closest_v_idx = 0;
615 double dist = DBL_MAX;
618 typename MeshT::Point p;
620 for (fv_it = _mesh->fv_iter(_mesh->face_handle(_face_idx)); fv_it.is_valid(); ++fv_it){
622 p = _mesh->point( *fv_it );
626 const double temp_dist = (vTemp - _hitPoint).length();
628 if (temp_dist < dist) {
630 closest_v_idx = fv_it->idx();
634 return closest_v_idx;
648 template <
class MeshT>
651 typename MeshT::ConstFaceHalfedgeIter fh_it;
652 typename MeshT::VertexHandle v1, v2;
653 typename MeshT::Point p1, p2;
656 double dist = DBL_MAX;
657 int closest_e_handle = 0;
659 for (fh_it = _mesh->fh_iter(_mesh->face_handle(_face_idx)); fh_it.is_valid(); ++fh_it){
661 v1 = _mesh->from_vertex_handle(*fh_it);
662 v2 = _mesh->to_vertex_handle(*fh_it);
664 p1 = _mesh->point(v1);
665 p2 = _mesh->point(v2);
670 const ACG::Vec3d e = (vp2 - vp1).normalized();
672 const double x = g | e;
674 const double temp_dist = (_hitPoint - (vp1 + x * e)).
length();
676 if (temp_dist < dist) {
681 return closest_e_handle;
695 template <
class MeshT>
698 ACG::Vec3d toVertex = _mesh->point( _mesh->to_vertex_handle( _mesh->halfedge_handle(_mesh->edge_handle(_edge_idx),0 )) );
699 ACG::Vec3d fromVertex = _mesh->point( _mesh->from_vertex_handle( _mesh->halfedge_handle(_mesh->edge_handle(_edge_idx),0 )) );
701 double distTo = (_hitPoint - toVertex ).norm();
702 double distFrom = (_hitPoint - fromVertex).norm();
704 if ( distTo > distFrom )
705 return _mesh->from_vertex_handle( _mesh->halfedge_handle(_mesh->edge_handle(_edge_idx),0 ) ).idx();
707 return _mesh->to_vertex_handle( _mesh->halfedge_handle(_mesh->edge_handle(_edge_idx),0 ) ).idx();
722 size_t node_idx, target_idx;
725 if (info_->isHidden())
742 if (mesh->n_faces() != 0)
743 info_->pickMode->setCurrentIndex(0);
744 else if (mesh->n_edges() != 0)
745 info_->pickMode->setCurrentIndex(1);
747 info_->pickMode->setCurrentIndex(2);
752 if (mesh->n_faces() != 0)
753 info_->pickMode->setCurrentIndex(0);
754 else if (mesh->n_edges() != 0)
755 info_->pickMode->setCurrentIndex(1);
757 info_->pickMode->setCurrentIndex(2);
762 if (info_->pickMode->currentIndex() == 1 )
764 else if (info_->pickMode->currentIndex() == 2 )
774 lastPickedObject_ = object;
775 lastPickedObjectId_ =
object->
id();
783 lastPickedObject_ = 0;
789 emit log(
LOGERR , tr(
"Unable to pick object.") );
795 template<
class MeshT >
798 typename MeshT::ConstEdgeIter e_it(_mesh->edges_sbegin()),
799 e_end(_mesh->edges_end());
804 for (; e_it!=e_end; ++e_it)
806 typename MeshT::Scalar len = (_mesh->point(_mesh->to_vertex_handle(_mesh->halfedge_handle(*e_it, 0))) -
807 _mesh->point(_mesh->to_vertex_handle(_mesh->halfedge_handle(*e_it, 1)))).norm ();
808 if (len < min) min = len;
809 if (len > max) max = len;
813 mean /= _mesh->n_edges();
825 emit log(
LOGERR, tr(
"Unable to get object"));
833 emit log(
LOGERR,tr(
"Unable to get mesh"));
837 getEdgeLengths (mesh, min, max, mean);
844 emit log(
LOGERR,tr(
"Unable to get mesh"));
848 getEdgeLengths (mesh, min, max, mean);
866 if (_identifier == lastPickedObjectId_ && _deleted) {
867 lastPickedObject_ = 0;
868 lastPickedObjectId_ = -1;
873 infoBar_->hideCounts();
886 if (
object && !object->
target() ) {
888 if ( !_deleted || ( o_it->id() != _identifier ) ) {
896 if (
object && object->
target() ) {
902 infoBar_->vertices->setText( QLocale::system().toString( qulonglong(mesh->n_vertices()) ) );
903 infoBar_->edges->setText( QLocale::system().toString( qulonglong(mesh->n_edges()) ) );
904 infoBar_->faces->setText( QLocale::system().toString( qulonglong(mesh->n_faces()) ) );
906 infoBar_->showCounts();
915 infoBar_->vertices->setText( QLocale::system().toString( qulonglong(mesh->n_vertices()) ) );
916 infoBar_->edges->setText( QLocale::system().toString( qulonglong(mesh->n_edges()) ) );
917 infoBar_->faces->setText( QLocale::system().toString( qulonglong(mesh->n_faces()) ) );
919 infoBar_->showCounts();
925 infoBar_->hideCounts();
930 if ( _deleted && object->
target() ) {
936 infoBar_->hideCounts();
943 void InfoMeshObjectPlugin::slotObjectUpdated(
int _identifier ,
const UpdateType& _type){
945 updateData(_identifier,_type,
false);
951 void InfoMeshObjectPlugin::slotObjectSelectionChanged(
int _identifier ){
957 void InfoMeshObjectPlugin::objectDeleted(
int _identifier ){
964 void InfoMeshObjectPlugin::slotAllCleared(){
966 infoBar_->hideCounts();
970 void InfoMeshObjectPlugin::slotShowHistogram() {
971 if (!lastPickedObject_)
return;
988 dialog->setAttribute(Qt::WA_DeleteOnClose,
true);
int getClosestVertexFromEdge(MeshT *_mesh, int _edge_idx, ACG::Vec3d &_hitPoint)
Get closest vertex index from an edge.
int getClosestEdgeInFace(MeshT *_mesh, int _face_idx, const ACG::Vec3d &_hitPoint)
Get closest edge index from a face.
T sane_aarg(T _aarg)
Trigonometry/angles - related.
virtual QString getObjectinfo()
Get all Info for the Object as a string.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.
bool scenegraphPick(ACG::SceneGraph::PickTarget _pickTarget, const QPoint &_mousePos, size_t &_nodeIdx, size_t &_targetIdx, ACG::Vec3d *_hitPointPtr=0)
Execute picking operation on scenegraph.
pick any of the prior targets (should be implemented for all nodes)
bool getPickedObject(const size_t _node_idx, BaseObjectData *&_object)
Get the picked mesh.
DataType supportedDataTypes()
Get data type for information requests.
bool dataType(DataType _type) const
MeshT * mesh()
return a pointer to the mesh
const QStringList TARGET_OBJECTS("target")
Iterable object range.
int getClosestVertexInFace(MeshT *_mesh, int _face_idx, ACG::Vec3d &_hitPoint)
Get closest vertex index from a face.
void getEdgeLengths(MeshT *_mesh, double &min, double &max, double &mean)
Get edge lengths.
TriMesh * triMesh(BaseObjectData *_object)
Get a triangle mesh from an object.
Scalar aspectRatio(const VectorT< Scalar, N > &_v0, const VectorT< Scalar, N > &_v1, const VectorT< Scalar, N > &_v2)
return aspect ratio (length/height) of triangle
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.
Type for a MeshObject containing a triangle mesh.
QString name() const
return the name of the object. The name defaults to NONAME if unset.
VectorT< double, 3 > Vec3d
void slotInformationRequested(const QPoint _clickedPoint, DataType _type)
Show information dialog on clicked object.
picks edges (may not be implemented for all nodes)
auto length() const -> decltype(std::declval< VectorT< S, DIM >>().norm())
compute squared euclidean norm
void updateData(int _identifier, const UpdateType &_type, const bool deleted)
Slot that updates the visualization.
PickTarget
What target to use for picking.
DLLEXPORT ObjectIterator objectsEnd()
Return Iterator to Object End.
PolyMesh * polyMesh(BaseObjectData *_object)
Get a poly mesh from an object.
picks faces (should be implemented for all nodes)
#define DATA_TRIANGLE_MESH
int targetCount()
Get the number of target objects.
void pluginsInitialized()
initialize the plugin
Type for a Meshobject containing a poly mesh.
picks verices (may not be implemented for all nodes)