\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - 2D and 3D Linear Geometry Kernel
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Triangle_3< Kernel > Class Template Reference

#include <CGAL/Triangle_3.h>

Definition

An object t of the class Triangle_3 is a triangle in the three-dimensional Euclidean space \( \E^3\).

As the triangle is not a full-dimensional object there is only a test whether a point lies on the triangle or not.

See also
Kernel::Triangle_3

Creation

 Triangle_3 (const Point_3< Kernel > &p, const Point_3< Kernel > &q, const Point_3< Kernel > &r)
 introduces a triangle t with vertices p, q and r. More...
 

Operations

bool operator== (const Triangle_3< Kernel > &t2) const
 Test for equality: two triangles t1 and t2 are equal, iff there exists a cyclic permutation of the vertices of t2, such that they are equal to the vertices oft1`. More...
 
bool operator!= (const Triangle_3< Kernel > &t2) const
 Test for inequality. More...
 
Point_3< Kernelvertex (int i) const
 returns the i'th vertex modulo 3 of t. More...
 
Point_3< Kerneloperator[] (int i) const
 returns vertex(int i). More...
 
Plane_3< Kernelsupporting_plane ()
 returns the supporting plane of t, with same orientation. More...
 

Predicates

bool is_degenerate () const
 t is degenerate if its vertices are collinear. More...
 
bool has_on (const Point_3< Kernel > &p) const
 A point is on t, if it is on a vertex, an edge or the face of t. More...
 

Miscellaneous

Kernel::FT squared_area () const
 returns a square of the area of t. More...
 
Bbox_3 bbox () const
 returns a bounding box containing t. More...
 
Triangle_3< Kerneltransform (const Aff_transformation_3< Kernel > &at) const
 returns the triangle obtained by applying at on the three vertices of t. More...
 

Constructor & Destructor Documentation

template<typename Kernel >
CGAL::Triangle_3< Kernel >::Triangle_3 ( const Point_3< Kernel > &  p,
const Point_3< Kernel > &  q,
const Point_3< Kernel > &  r 
)

introduces a triangle t with vertices p, q and r.

Member Function Documentation

template<typename Kernel >
Bbox_3 CGAL::Triangle_3< Kernel >::bbox ( ) const

returns a bounding box containing t.

template<typename Kernel >
bool CGAL::Triangle_3< Kernel >::has_on ( const Point_3< Kernel > &  p) const

A point is on t, if it is on a vertex, an edge or the face of t.

template<typename Kernel >
bool CGAL::Triangle_3< Kernel >::is_degenerate ( ) const

t is degenerate if its vertices are collinear.

template<typename Kernel >
bool CGAL::Triangle_3< Kernel >::operator!= ( const Triangle_3< Kernel > &  t2) const

Test for inequality.

template<typename Kernel >
bool CGAL::Triangle_3< Kernel >::operator== ( const Triangle_3< Kernel > &  t2) const

Test for equality: two triangles t1 and t2 are equal, iff there exists a cyclic permutation of the vertices of t2, such that they are equal to the vertices oft1`.

template<typename Kernel >
Point_3<Kernel> CGAL::Triangle_3< Kernel >::operator[] ( int  i) const

returns vertex(int i).

template<typename Kernel >
Kernel::FT CGAL::Triangle_3< Kernel >::squared_area ( ) const

returns a square of the area of t.

template<typename Kernel >
Plane_3<Kernel> CGAL::Triangle_3< Kernel >::supporting_plane ( )

returns the supporting plane of t, with same orientation.

template<typename Kernel >
Triangle_3<Kernel> CGAL::Triangle_3< Kernel >::transform ( const Aff_transformation_3< Kernel > &  at) const

returns the triangle obtained by applying at on the three vertices of t.

template<typename Kernel >
Point_3<Kernel> CGAL::Triangle_3< Kernel >::vertex ( int  i) const

returns the i'th vertex modulo 3 of t.