Alpha shapes examples compile with debugging enabled (Added AlphaSimplex3D::boundary())
authorDmitriy Morozov <morozov@cs.duke.edu>
Wed, 31 Jan 2007 16:53:35 -0500
changeset 16 626e2b875d21
parent 15 ef3bf83302ca
child 17 b1757b725708
Alpha shapes examples compile with debugging enabled (Added AlphaSimplex3D::boundary())
examples/alphashapes/alphashapes3d.h
examples/alphashapes/alphashapes3d.hpp
--- a/examples/alphashapes/alphashapes3d.h	Tue Jan 30 13:51:04 2007 -0500
+++ b/examples/alphashapes/alphashapes3d.h	Wed Jan 31 16:53:35 2007 -0500
@@ -41,6 +41,7 @@
 		typedef 	std::set<AlphaSimplex3D>							SimplexSet;
 		typedef		SimplexWithVertices<Vertex_handle>					Parent;
 		typedef		Parent::VertexContainer								VertexSet;
+		typedef		std::list<AlphaSimplex3D>							Cycle;
 
     public:
 									AlphaSimplex3D()					{}
@@ -61,6 +62,7 @@
 		virtual RealType			value() const						{ return CGAL::to_double(alpha_); }
 		RealValue					alpha() const						{ return alpha_; }
 		bool						attached() const					{ return attached_; }
+		Cycle						boundary() const;
 
 		// Ordering
 		struct AlphaOrder
--- a/examples/alphashapes/alphashapes3d.hpp	Tue Jan 30 13:51:04 2007 -0500
+++ b/examples/alphashapes/alphashapes3d.hpp	Wed Jan 31 16:53:35 2007 -0500
@@ -124,6 +124,17 @@
 	alpha_ = CGAL::squared_radius(p1, p2, p3, p4);
 }
 
+AlphaSimplex3D::Cycle
+AlphaSimplex3D::boundary() const
+{
+	Cycle bdry;
+	Parent::Cycle pbdry = Parent::boundary();
+	for (Parent::Cycle::const_iterator cur = pbdry.begin(); cur != pbdry.end(); ++cur)
+		bdry.push_back(*cur);
+	return bdry;
+}
+
+
 bool 
 AlphaSimplex3D::AlphaOrder::
 operator()(const AlphaSimplex3D& first, const AlphaSimplex3D& second) const