Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query
- Date: Thu, 06 Jan 2011 17:37:50 +0100
Arun Ramasamy wrote:
HI,You can use function coplanar_orientation with consecutive segments of
I've to determine if a given 3D point is inside a 3D facet of a polyhedron. The facet is guaranteed to be a convex polygon and point is guaranteed to be in the same plane as the facet. Currently I'm planning to either
1. rotate everything to the X-Y plane and do a 2D evaluation using sign of angles and such or
2. Remove the least varying component from the facet and point coordinates (say Z) and do a 2D evaluation.
Is there any better way to do this, where I don't have to reduce this to a 2D operation. Is that query supported in CGAL ?
Please let me know if anything is not clear.
thanks arun
the facet:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_coplanar_orientation.html#Index_anchor_428
Note that the point has to be in the plane (not almost in the plane).
If your point is not exactly in the plane, using a projection along x,y
or z axis should be a better solution (check the normal vector of the
plane to choose which one).
FYI, in the next release, they will probably be something called
Projection_traits that allows to use to 2D algorithms on 3D points
by considering them as 2D points projected onto a plane (xy, yx or
zx). With this traits used together with Polygon_2::bounded_side
(http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polygon_ref/Class_Polygon_2.html)
you could also have the answer.
S.
- [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query, Arun Ramasamy, 01/06/2011
- Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query, Sebastien Loriot (GeometryFactory), 01/06/2011
- Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query, Arun Ramasamy, 01/07/2011
- Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query, Sebastien Loriot (GeometryFactory), 01/06/2011
Archive powered by MHonArc 2.6.16.