CGAL::Tetrahedron_3<Kernel>

Definition

An object t of the class Tetrahedron_3<Kernel> is an oriented tetrahedron in the three-dimensional Euclidean space 3.

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 3 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.

Creation

Tetrahedron_3<Kernel> t ( Point_3<Kernel> p0, Point_3<Kernel> p1, Point_3<Kernel> p2, Point_3<Kernel> p3);
introduces a tetrahedron t with vertices p0, p1, p2 and p3.

Operations

bool t.operator== ( t2) const Test for equality: two tetrahedra t and t2 are equal, iff t and t2 have the same orientation and their sets (not sequences) of vertices are equal.

bool t.operator!= ( t2) const Test for inequality.

Point_3<Kernel> t.vertex ( int i) const returns the i'th vertex modulo 4 of t.

Point_3<Kernel> t.operator[] ( int i) const returns vertex(int i).

Predicates

bool t.is_degenerate () const Tetrahedron t is degenerate, if the vertices are coplanar.

Orientation t.orientation () const

Oriented_side t.oriented_side ( Point_3<Kernel> p) const
Precondition: : t is not degenerate.

Bounded_side t.bounded_side ( Point_3<Kernel> p) const
Precondition: : t is not degenerate.

For convenience we provide the following Boolean functions:

bool t.has_on_positive_side ( Point_3<Kernel> p) const
bool t.has_on_negative_side ( Point_3<Kernel> p) const
bool t.has_on_boundary ( Point_3<Kernel> p) const
bool t.has_on_bounded_side ( Point_3<Kernel> p) const
bool t.has_on_unbounded_side ( Point_3<Kernel> p) const

Miscellaneous

Kernel::FT t.volume () const returns the signed volume of t.

Bbox_3 t.bbox () const returns a bounding box containing t.

Tetrahedron_3<Kernel> t.transform ( Aff_transformation_3<Kernel> at) const
returns the tetrahedron obtained by applying at on the three vertices of t.

See Also

Kernel::Tetrahedron_3