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

3D Triangle (CGAL_Triangle_3)

Definition

An object t of the class CGAL_Triangle_3 is a triangle in the three-dimensional Euclidean space E3. As the triangle is not a full-dimensional object there is only a test whether a point lies on the triangle or not.

#include <CGAL/Triangle_3.h>

Creation

CGAL_Triangle_3<R> t ( CGAL_Point_3<R> p,
CGAL_Point_3<R> q,
CGAL_Point_3<R> r);
introduces a triangle t with vertices p, q and r.

Operations

bool t == t2 Test for equality: two triangles t and t2 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 3 of t.
CGAL_Point_3<R> t [ int i] returns vertex(int i).
CGAL_Plane_3<R> t.supporting_plane ()
returns the supporting plane of t, with same orientation.

Predicates

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

Miscellaneous

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


Next: Class declaration of CGAL_Tetrahedron_3<R>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. Wed, January 20, 1999.