BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members
BALL::Triangle Class Reference

#include <BALL/STRUCTURE/triangle.h>

Inheritance diagram for BALL::Triangle:
BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >

Public Member Functions

Constructors and Destructors
 Triangle ()
 
 Triangle (TrianglePoint *v1, TrianglePoint *v2, TrianglePoint *v3)
 
 Triangle (TriangleEdge *e1, TriangleEdge *e2, TriangleEdge *e3, bool flip_normal=false)
 
 Triangle (const Triangle &triangle, bool deep=false)
 
virtual ~Triangle ()
 
Assignments
void set (const Triangle &triangle, bool deep=false)
 
Triangleoperator= (const Triangle &triangle)
 
Accessors
void setPoint (Position i, TrianglePoint *point) throw (Exception::IndexOverflow)
 
TrianglePointgetPoint (Position i) const throw (Exception::IndexOverflow)
 
void remove (TriangleEdge *edge)
 
Predicates
virtual bool operator== (const Triangle &) const
 
virtual bool operator!= (const Triangle &) const
 
virtual bool operator*= (const Triangle &) const
 
- Public Member Functions inherited from BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >
 GraphTriangle ()
 
 GraphTriangle (const GraphTriangle< TrianglePoint, TriangleEdge, Triangle > &face, bool deep=false)
 
 GraphTriangle (TrianglePoint *vertex1, TrianglePoint *vertex2, TrianglePoint *vertex3, TriangleEdge *edge1, TriangleEdge *edge2, TriangleEdge *edge3, Index index)
 
virtual ~GraphTriangle ()
 
void set (const GraphTriangle< TrianglePoint, TriangleEdge, Triangle > &face, bool deep=false)
 
void set (TrianglePoint *vertex1, TrianglePoint *vertex2, TrianglePoint *vertex3, TriangleEdge *edge1, TriangleEdge *edge2, TriangleEdge *edge3, Index index)
 
GraphTriangle< TrianglePoint,
TriangleEdge, Triangle > & 
operator= (const GraphTriangle< TrianglePoint, TriangleEdge, Triangle > &face)
 
void setVertex (Position i, TrianglePoint *vertex) throw (Exception::IndexOverflow)
 
TrianglePointgetVertex (Position i) const throw (Exception::IndexOverflow)
 
void setEdge (Position i, TriangleEdge *edge) throw (Exception::IndexOverflow)
 
TriangleEdgegetEdge (Position i) const throw (Exception::IndexOverflow)
 
bool getEdge (const TrianglePoint *vertex1, const TrianglePoint *vertex2, TriangleEdge *&edge) const
 
void setIndex (Index index)
 
Index getIndex () const
 
bool getEdges (const TrianglePoint *vertex, TriangleEdge *&edge1, TriangleEdge *&edge2) const
 
Index getSimilarEdge (const TriangleEdge *edge, TriangleEdge *&similar_edge) const
 
Index getRelativeIndex (const TrianglePoint *vertex) const
 
Index getRelativeIndex (const TriangleEdge *edge) const
 
TrianglePointthird (const TrianglePoint *v1, const TrianglePoint *v2) const
 
TriangleEdgethird (const TriangleEdge *e1, const TriangleEdge *e2) const
 
TriangleEdgegetOppositeEdge (const TrianglePoint *vertex) const
 
TrianglePointgetOppositeVertex (const TriangleEdge *edge) const
 
bool substitute (const TrianglePoint *old_vertex, TrianglePoint *new_vertex)
 
bool substitute (const TriangleEdge *old_edge, TriangleEdge *new_edge)
 
TrianglePointhas (TrianglePoint *vertex) const
 
TriangleEdgehas (TriangleEdge *edge) const
 

Friends

Class friends
class TriangleEdge
 
class TrianglePoint
 
class TriangulatedSurface
 
class TriangulatedSphere
 
class TriangulatedSES
 
class TriangulatedSAS
 
class SESTriangulator
 
class SASTriangulator
 
Class friends
  • class GraphVertex<Vertex,Edge,Face>;
  • class GraphEdge<Vertex,Edge,Face>;

Additional Inherited Members

- Protected Attributes inherited from BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >
TrianglePointvertex_ [3]
 
TriangleEdgeedge_ [3]
 
Index index_
 

Detailed Description

Generic TriangleEdge Class.

Definition at line 37 of file triangle.h.

Constructor & Destructor Documentation

BALL::Triangle::Triangle ( )

Default constructor. This method creates a new Triangle object.

BALL::Triangle::Triangle ( TrianglePoint v1,
TrianglePoint v2,
TrianglePoint v3 
)

Detailed constructor. Creates a new Triangle object. Its vertices are initialized with the passed TrianglePoint instances.

BALL::Triangle::Triangle ( TriangleEdge e1,
TriangleEdge e2,
TriangleEdge e3,
bool  flip_normal = false 
)

Detailed constructor. Creates a new Triangle object. Its edges are initialized with the passed TriangleEdge instances. Its vertices are taken from the edges. This requires the edges to be properly oriented in a counter clockwise manner.

BALL::Triangle::Triangle ( const Triangle triangle,
bool  deep = false 
)

Copy constructor. Create a new Triangle object from another.

Parameters
trianglethe Triangle object to be copied
deepif deep = false, all pointers are set to NULL (default). Otherwise the new Triangle object is linked to the neighbours of the old Triangle object.
virtual BALL::Triangle::~Triangle ( )
virtual

Destructor. Destructs the Triangle object.

Member Function Documentation

TrianglePoint* BALL::Triangle::getPoint ( Position  i) const throw (Exception::IndexOverflow)

Return one of the three points of the Triangle.

Parameters
ithe relative index of the point which should be given back. If i is greater three, an exception is thrown.
Returns
TrianglePoint* a pointer to the asked point
virtual bool BALL::Triangle::operator!= ( const Triangle ) const
virtual

Inequality operator.

Returns
false

Reimplemented from BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >.

virtual bool BALL::Triangle::operator*= ( const Triangle ) const
virtual

Similarity operator.

Returns
true

Reimplemented from BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >.

Triangle& BALL::Triangle::operator= ( const Triangle triangle)

Assign from another Triangle. The Triangle object is linked to the neighbours of the Triangle object to assign from

Parameters
trianglethe Triangle object to assign from
virtual bool BALL::Triangle::operator== ( const Triangle ) const
virtual

Equality operator.

Returns
true

Reimplemented from BALL::GraphTriangle< TrianglePoint, TriangleEdge, Triangle >.

void BALL::Triangle::remove ( TriangleEdge edge)

Remove an edge from the Triangle. The edge is set to NULL.

Parameters
edgethe edge to delete
void BALL::Triangle::set ( const Triangle triangle,
bool  deep = false 
)

Assign from another Triangle.

Parameters
trianglethe Triangle object to assign from
deepif deep = false, all pointers are set to NULL (default). Otherwise the Triangle object is linked to the neighbours of the Triangle object to assign from
void BALL::Triangle::setPoint ( Position  i,
TrianglePoint point 
) throw (Exception::IndexOverflow)

Set one of the three points of the Triangle.

Parameters
ithe relative index of the point which should be set. If i is greater three, an exception is thrown.
pointa pointer to the new point

Friends And Related Function Documentation

friend class SASTriangulator
friend

Definition at line 62 of file triangle.h.

friend class SESTriangulator
friend

Definition at line 61 of file triangle.h.

friend class TriangleEdge
friend

Definition at line 55 of file triangle.h.

friend class TrianglePoint
friend

Definition at line 56 of file triangle.h.

friend class TriangulatedSAS
friend

Definition at line 60 of file triangle.h.

friend class TriangulatedSES
friend

Definition at line 59 of file triangle.h.

friend class TriangulatedSphere
friend

Definition at line 58 of file triangle.h.

friend class TriangulatedSurface
friend

Definition at line 57 of file triangle.h.