Skip to content

Commit

Permalink
Merge pull request #3773 from maxGimeno/Demo-Fix_clip_plane_tooltip-GF
Browse files Browse the repository at this point in the history
Polyhedron demo: fix the plane_item's equation
  • Loading branch information
lrineau committed Mar 19, 2019
2 parents 82451a2 + 3760964 commit 49fe08b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
Expand Down
7 changes: 6 additions & 1 deletion Polyhedron/demo/Polyhedron/Scene_plane_item.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "Scene_plane_item.h"
#include <QApplication>
#include <CGAL/Three/Three.h>

using namespace CGAL::Three;


Expand Down Expand Up @@ -186,7 +188,10 @@ Scene_plane_item* Scene_plane_item::clone() const {
}

QString Scene_plane_item::toolTip() const {
const CGAL::qglviewer::Vec& pos = frame->position();

const CGAL::qglviewer::Vec offset = static_cast<CGAL::Three::Viewer_interface*>(CGAL::QGLViewer::QGLViewerPool().first())->offset();

const CGAL::qglviewer::Vec& pos = frame->position() - offset;
const CGAL::qglviewer::Vec& n = frame->inverseTransformOf(CGAL::qglviewer::Vec(0.f, 0.f, 1.f));
return
tr("<p><b>%1</b> (mode: %2, color: %3)<br />")
Expand Down

0 comments on commit 49fe08b

Please sign in to comment.