Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Properly oriented Polyhedron_3 vertex normals for rendering with OpenGL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Properly oriented Polyhedron_3 vertex normals for rendering with OpenGL


Chronological Thread 
  • From: Zhe Cao <>
  • To:
  • Subject: Re: [cgal-discuss] Properly oriented Polyhedron_3 vertex normals for rendering with OpenGL
  • Date: Thu, 21 Apr 2016 14:17:20 -0700 (PDT)
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:5tEjHBy9sgoZMYXXCy+O+j09IxM/srCxBDY+r6Qd0ekRIJqq85mqBkHD//Il1AaPBtWLrawUwLOL6OjJYi8p39WoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6kO74TNaIBjjLw09fr2zQd6CyZrnnLnvoNX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD86Fpy8kVWqrze+E0TKdTES89G2Ez/szi8xfZHiWV4X5JYGUb2jFBBECR/hH3GJz4tW2j68Jg0y3cNMawULNiCmfq1LtiVBK90HRPDDU+6myC0sE=

Hi Petros,

I am also trying to compute the normal of a polyhedron_3 mesh at each
vertex. And I've tried using compute_vertex_normal function you mentioned
here, but I got NaN value. Here is my code:

typedef CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;

for (Vertex_iterator v_it = polyhedron.vertices_begin(); v_it !=
polyhedron.vertices_end(); v_it++){
Kernel::Vector_3 v_n = compute_vertex_normal<Polyhedron::Vertex,
Kernel>(Polyhedron::Vertex(v_it->point()));
}

Could you tell me which part is wrong here? Thank you very much.



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Properly-oriented-Polyhedron-3-vertex-normals-for-rendering-with-OpenGL-tp4661567p4661861.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page