CGAL 5.1 - 3D Polyhedral Surface
CGAL::Polyhedron_traits_3< Kernel > Class Template Reference

#include <CGAL/Polyhedron_traits_3.h>

Definition

template<typename Kernel>
class CGAL::Polyhedron_traits_3< Kernel >

The class Polyhedron_traits_3 is a model of the PolyhedronTraits_3 concept. It defines the geometric types and primitive operations used in the polyhedral surface data structure Polyhedron_3<PolyhedronTraits_3> in terms of the CGAL Kernel. It keeps a local copy of the kernel which makes it suitable for kernels with local state.

Is Model Of:
PolyhedronTraits_3
See also
CGAL::Polyhedron_traits_with_normals_3<Kernel>

Implementation

Since the PolyhedronTraits_3 concept is a subset of the concept Kernel, this class just forwards the relevant types and access member functions from its template argument. However, it is useful for testing sufficiency of requirements.

Example

Instantiation of a polyhedral surface with the Cartesian kernel based on double coordinates.


File Polyhedron/polyhedron_prog_simple.cpp

#include <CGAL/Simple_cartesian.h>
#include <CGAL/Polyhedron_3.h>
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
typedef Polyhedron::Halfedge_handle Halfedge_handle;
int main() {
Polyhedron P;
Halfedge_handle h = P.make_tetrahedron();
if ( P.is_tetrahedron(h))
return 0;
return 1;
}

Types

typedef unspecified_type Kernel
 the Kernel model. More...
 
typedef Kernel::Point_3 Point_3
 
typedef Kernel::Plane_3 Plane_3
 
typedef Kernel::Construct_opposite_plane_3 Construct_opposite_plane_3
 

Creation

 Polyhedron_traits_3 ()
 default constructor, uses Kernel() as local reference to the kernel. More...
 
 Polyhedron_traits_3 (const Kernel &kernel)
 stores kernel as local reference. More...
 

Operations

Construct_opposite_plane_3 construct_opposite_plane_3_object ()
 forwarded to kernel. More...
 

Member Typedef Documentation

◆ Construct_opposite_plane_3

◆ Kernel

template<typename Kernel >
typedef unspecified_type CGAL::Polyhedron_traits_3< Kernel >::Kernel

the Kernel model.

◆ Plane_3

template<typename Kernel >
typedef Kernel::Plane_3 CGAL::Polyhedron_traits_3< Kernel >::Plane_3

◆ Point_3

template<typename Kernel >
typedef Kernel::Point_3 CGAL::Polyhedron_traits_3< Kernel >::Point_3

Constructor & Destructor Documentation

◆ Polyhedron_traits_3() [1/2]

template<typename Kernel >
CGAL::Polyhedron_traits_3< Kernel >::Polyhedron_traits_3 ( )

default constructor, uses Kernel() as local reference to the kernel.

◆ Polyhedron_traits_3() [2/2]

template<typename Kernel >
CGAL::Polyhedron_traits_3< Kernel >::Polyhedron_traits_3 ( const Kernel kernel)

stores kernel as local reference.

Member Function Documentation

◆ construct_opposite_plane_3_object()

template<typename Kernel >
Construct_opposite_plane_3 CGAL::Polyhedron_traits_3< Kernel >::construct_opposite_plane_3_object ( )

forwarded to kernel.

CGAL::Polyhedron_3::make_tetrahedron
Halfedge_handle make_tetrahedron()
a tetrahedron is added to the polyhedral surface.
CGAL::Polyhedron_traits_3::Kernel
unspecified_type Kernel
the Kernel model.
Definition: Polyhedron_traits_3.h:42
CGAL::Polyhedron_3
Definition: Polyhedron_3.h:113
CGAL::Simple_cartesian