*** empty log message ***

This commit is contained in:
Matthias Bäsken 2003-01-08 15:52:43 +00:00
parent c33a403f12
commit b861c92626
3 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,50 @@
# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)
#---------------------------------------------------------------------#
# compiler flags
#---------------------------------------------------------------------#
# -DCGAL_CONCEPT_ARCHETYPE_ALLOW_COMPARISONS
CXXFLAGS = \
-I../../include \
$(CGAL_CXXFLAGS)
#---------------------------------------------------------------------#
# linker flags
#---------------------------------------------------------------------#
LIBPATH = \
$(CGAL_LIBPATH)
LDFLAGS = \
$(CGAL_LDFLAGS)
#---------------------------------------------------------------------#
# target entries
#---------------------------------------------------------------------#
all: \
test_delaunay_2 \
test_polyhedron_prog_incr_builder
test_delaunay_2$(EXE_EXT): test_delaunay_2$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_delaunay_2 test_delaunay_2$(OBJ_EXT) $(LDFLAGS)
test_polyhedron_prog_incr_builder$(EXE_EXT): test_polyhedron_prog_incr_builder$(OBJ_EXT)
$(CGAL_CXX) $(LIBPATH) $(EXE_OPT)test_polyhedron_prog_incr_builder test_polyhedron_prog_incr_builder$(OBJ_EXT) $(LDFLAGS)
clean: \
test_delaunay_2.clean \
test_polyhedron_prog_incr_builder.clean
#---------------------------------------------------------------------#
# suffix rules
#---------------------------------------------------------------------#
.C$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<
.cpp$(OBJ_EXT):
$(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<

View File

@ -0,0 +1,24 @@
// small example for compilation
// check of Delaunay_triangulation_2 using the kernel concept
// archetype
#include <CGAL/basic.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Kernel_archetype.h>
typedef CGAL::Kernel_archetype K;
typedef K::Point_2 Point;
typedef CGAL::Delaunay_triangulation_2<K> Delaunay_triang_2;
Delaunay_triang_2 dt;
int main()
{
std::list<Point> input;
Point act;
dt.insert(act);
return 0;
}

View File

@ -0,0 +1,50 @@
// original version see examples/Polyhedron/polyhedron_prog_incr_builder.C
// this time we test compilation with the
// kernel concept archetype
// we use interface restrictions in this example
#include <CGAL/basic.h>
#include <CGAL/Polyhedron_incremental_builder_3.h>
#include <CGAL/Polyhedron_3.h>
// limit interface of the kernel archetype ...
#define CGAL_CA_LIMITED_INTERFACE
#define CGAL_CA_POINT_3
#define CGAL_CA_PLANE_3
#include <CGAL/Kernel_archetype.h>
// A modifier creating a triangle with the incremental builder.
template <class HDS>
class Build_triangle : public CGAL::Modifier_base<HDS> {
public:
Build_triangle() {}
void operator()( HDS& hds) {
// Postcondition: `hds' is a valid polyhedral surface.
CGAL::Polyhedron_incremental_builder_3<HDS> B( hds, true);
B.begin_surface( 3, 1, 6);
typedef typename HDS::Vertex Vertex;
typedef typename Vertex::Point Point;
B.add_vertex( Point());
B.add_vertex( Point());
B.add_vertex( Point());
B.begin_facet();
B.add_vertex_to_facet( 0);
B.add_vertex_to_facet( 1);
B.add_vertex_to_facet( 2);
B.end_facet();
B.end_surface();
}
};
typedef CGAL::Kernel_archetype Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Polyhedron::HalfedgeDS HalfedgeDS;
int main() {
Polyhedron P;
Build_triangle<HalfedgeDS> triangle;
P.delegate( triangle);
CGAL_assertion( P.is_triangle( P.halfedges_begin()));
return 0;
}