CGAL 5.1.2 - Optimal Distances
CGAL::Width_default_traits_3< K > Class Template Reference

#include <CGAL/Width_default_traits_3.h>

Definition

The class Width_default_traits_3 is a traits class for Width_3<Traits> using the three-dimensional CGAL kernel.

Template Parameters
Kmust be a model for Kernel.
Is Model Of:
WidthTraits_3
See also
CGAL::Width_3<Traits>
WidthTraits_3
Examples:
Polytope_distance_d/width_simplex.cpp.

Types

typedef K::Point_3 Point_3
 
typedef K::Plane_3 Plane_3
 
typedef K::Vector_3 Vector_3
 
typedef K::RT RT
 
typedef Convex_hull_traits_3< K > ChullTraits
 

Creation

 Width_default_traits_3 ()
 default constructor.
 

Operations

RT get_hx (const Point_3 &p) const
 returns the homogeneous \( x\)-coordinate of point \( p\).
 
RT get_hy (const Point_3 &p) const
 returns the homogeneous \( y\)-coordinate of point \( p\).
 
RT get_hz (const Point_3 &p) const
 returns the homogeneous \( z\)-coordinate of point \( p\).
 
RT get_hw (const Point_3 &p) const
 returns the homogenizing coordinate of point \( p\).
 
void get_point_coordinates (const Point_3 &p, RT &px, RT &py, RT &pz, RT &ph) const
 returns all homogeneous coordinates of point \( p\) at once.
 
RT get_a (const Plane_3 &f) const
 returns the first coefficient of plane \( f\).
 
RT get_b (const Plane_3 &f) const
 returns the second coefficient of plane \( f\).
 
RT get_c (const Plane_3 &f) const
 returns the third coefficient of plane \( f\).
 
RT get_d (const Plane_3 &f) const
 returns the fourth coefficient of plane \( f\).
 
void get_plane_coefficients (const Plane_3 &f, RT &a, RT &b, RT &c, RT &d) const
 returns all four plane coefficients of \( f\) at once.
 
Point_3 make_point (const RT &hx, const RT &hy, const RT &hz, const RT &hw) const
 returns a point of type Point_3 with homogeneous coordinates \( hx\), \( hy\), \( hz\) and \( hw\).
 
Plane_3 make_plane (const RT &a, const RT &b, const RT &c, const RT &d) const
 returns a plane of type Plane_3 whose coefficients are \( a\), \( b\), \( c\) and \( d\).
 
Vector make_vector (const RT &a, const RT &b, const RT &c) const
 returns a vector of type Vector_3 with the four coefficients \( a\), \( b\), \( c\) and 1.