00001 #ifndef HEXAHEDRON_3_H // -*- C++ -*-
00002 #define HEXAHEDRON_3_H
00003
00004 #include "kernel_rep.h"
00005
00006
00007 #include <CGAL/Point_3.h>
00008 #include <CGAL/Plane_3.h>
00009
00010
00011
00012
00013 class Hexahedron_3
00014 {
00015 public:
00016 typedef Exact_rep R;
00017 typedef CGAL::Point_3<R> Point;
00018 typedef CGAL::Plane_3<R> Plane;
00019
00020
00022 Hexahedron_3( CGAL::Point_3<R> vertices[8] );
00023
00024 Hexahedron_3( CGAL::Point_3<R> v0,
00025 CGAL::Point_3<R> v1,
00026 CGAL::Point_3<R> v2,
00027 CGAL::Point_3<R> v3,
00028 CGAL::Point_3<R> v4,
00029 CGAL::Point_3<R> v5,
00030 CGAL::Point_3<R> v6,
00031 CGAL::Point_3<R> v7 );
00032
00033
00035
00036
00038 CGAL::Plane_3<R> plane_0164() const;
00039 CGAL::Plane_3<R> plane_1276() const;
00040 CGAL::Plane_3<R> plane_2357() const;
00041 CGAL::Plane_3<R> plane_0453() const;
00042 CGAL::Plane_3<R> plane_4675() const;
00043 CGAL::Plane_3<R> plane_0321() const;
00044
00045 CGAL::Plane_3<R> plane(int i) const;
00046
00047
00049 const CGAL::Point_3<R>& vertex(int i) const
00050 {
00051 CGAL_assertion( 0 <= i );
00052 CGAL_assertion( i < 8 );
00053 return vert[i];
00054 }
00055
00056
00057 private:
00058 CGAL::Point_3<R> vert[8];
00059
00060
00061 void verify_facet(int i, int j, int k, int l);
00062 void verify();
00063 };
00064
00065
00066 #endif