From 84be467dcc8fd40652bc3a093140fc34d8ac1529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Ulman?= <ulman@mpi-cbg.de> Date: Thu, 13 Oct 2016 00:29:55 +0200 Subject: [PATCH] Display non-important tweaks: Debugging f-tree segment lines plus radius points. --- cmath3d/TriangleMesh.h | 1 + src/graphics.cpp | 25 +++++++++++++++++++++++++ src/main.cpp | 2 +- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/cmath3d/TriangleMesh.h b/cmath3d/TriangleMesh.h index 92d58df..b3d99b0 100644 --- a/cmath3d/TriangleMesh.h +++ b/cmath3d/TriangleMesh.h @@ -105,6 +105,7 @@ class ActiveMesh std::vector<int> segToPoint; std::vector<float> segFromRadius; std::vector<float> segToRadius; + size_t PointsFirstOffset; void RenderMask(i3d::Image3d<i3d::GRAY16>& mask); void RenderMaskB(i3d::Image3d<i3d::GRAY16>& mask); diff --git a/src/graphics.cpp b/src/graphics.cpp index 048c0cc..0af17c1 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -353,6 +353,31 @@ void ActiveMesh::displayMesh(void) glVertex3f(Pos[*id].x,Pos[*id].y,Pos[*id].z); ++id; glEnd(); } + +/* + //show line segments + glLineWidth(1); + glBegin(GL_LINES); + for (unsigned int i=0; i < segFromPoint.size(); ++i) + { + glVertex3f(fPoints[segFromPoint[i]].x, + fPoints[segFromPoint[i]].y, + fPoints[segFromPoint[i]].z); + glVertex3f(fPoints[segToPoint[i]].x, + fPoints[segToPoint[i]].y, + fPoints[segToPoint[i]].z); + } + glEnd(); + + //show points after rotation + glPointSize(3); + glBegin(GL_POINTS); + for (unsigned int i=0; i < 10*segFromPoint.size()+1; ++i) + glVertex3f(Pos[PointsFirstOffset+i].x, + Pos[PointsFirstOffset+i].y, + Pos[PointsFirstOffset+i].z); + glEnd(); +*/ } void ActiveMesh::displayMeshEdges(void) diff --git a/src/main.cpp b/src/main.cpp index 945a2f9..5801cae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,7 +40,7 @@ int main(void) return(2); } - std::cout << "mesh: " << filename << "\n"; + //std::cout << "mesh: " << filename << "\n"; std::cout << "vertices #: " << mesh.Pos.size() << "\n"; std::cout << "triangles #: " << mesh.ID.size()/3 << "\n"; std::cout << "normals #: " << mesh.norm.size() << "\n"; -- GitLab