Navigation: Up, Table of Contents, Bibliography, Index, Title Page

3D Tetrahedron (CGAL_Tetrahedron_3)

Definition

An object t of the class CGAL_Tetrahedron_3 is an oriented tetrahedron in the three-dimensional Euclidean space E3.

It is defined by four vertices p0, p1, p2 and p3. The orientation of a tetrahedron is the orientation of its four vertices. That means it is positive when p3 is on the positive side of the plane defined by p0, p1 and p2.

The tetrahedron itself splits the space E3 in a positive and a negative side.

The boundary of a tetrahedron splits the space in two open regions, a bounded one and an unbounded one.

#include <CGAL/Tetrahedron_3.h>

Creation

CGAL_Tetrahedron_3<R> t ( CGAL_Point_3<R> p0,
CGAL_Point_3<R> p1,
CGAL_Point_3<R> p2,
CGAL_Point_3<R> p3);
introduces a tetrahedron t with vertices p0, p1, p2 and p3.

Operations

bool t == t2 Test for equality: two tetrahedra are equal, iff there exists a cyclic permutation of the vertices of t2, such that they are equal to the vertices of t.
bool t != t2 Test for inequality.
CGAL_Point_3<R> t.vertex ( int i) returns the i'th vertex modulo 4 of t.
CGAL_Point_3<R> t [ int i] returns vertex(int i).

Predicates

bool t.is_degenerate () Tetrahedron t is degenerate, if the vertices are coplanar.
CGAL_Orientation t.orientation ()
CGAL_Oriented_side t.oriented_side ( CGAL_Point_3<R> p)
CGAL_Bounded_side t.bounded_side ( CGAL_Point_3<R> p)

For convenience we provide the following boolean functions:

bool t.has_on_positive_side ( CGAL_Point_3<R> p)
bool t.has_on_negative_side ( CGAL_Point_3<R> p)
bool t.has_on_boundary ( CGAL_Point_3<R> p)
bool t.has_on_bounded_side ( CGAL_Point_3<R> p)
bool t.has_on_unbounded_side ( CGAL_Point_3<R> p)

Miscellaneous

CGAL_Bbox_3 t.bbox () returns a bounding box containing t.
CGAL_Tetrahedron_3<R>
t.transform ( CGAL_Aff_transformation_3<R> at)
returns the tetrahedron obtained by applying at on the three vertices of t.


Footnotes

  1. See Chapter [ref:Utilities] for the definition of CGAL_Oriented_side.

Return to chapter:
3D Simplices
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. Wed, January 20, 1999.