BALL  1.5.0
List of all members
BALL::TriangulatedSurface Class Reference

#include <BALL/STRUCTURE/triangulatedSurface.h>

Inheritance diagram for BALL::TriangulatedSurface:
BALL::TriangulatedSAS BALL::TriangulatedSES BALL::TriangulatedSphere

Public Types

Type definitions
typedef std::list< TrianglePoint * >::iterator PointIterator
 
typedef std::list< TrianglePoint * >::const_iterator ConstPointIterator
 
typedef std::list< TriangleEdge * >::iterator EdgeIterator
 
typedef std::list< TriangleEdge * >::const_iterator ConstEdgeIterator
 
typedef std::list< Triangle * >::iterator TriangleIterator
 
typedef std::list< Triangle * >::const_iterator ConstTriangleIterator
 

Public Member Functions

Constructors and Destructors
 TriangulatedSurface ()
 
 TriangulatedSurface (const TriangulatedSurface &surface, bool=true)
 
virtual ~TriangulatedSurface ()
 
Assignment
void clear ()
 
void set (const TriangulatedSurface &surface, bool=true)
 
TriangulatedSurfaceoperator= (const TriangulatedSurface &surface)
 
Accessors
void insert (TrianglePoint *point)
 
void insert (TriangleEdge *edge)
 
void insert (Triangle *triangle)
 
Size getNumberOfPoints () const
 
Size getNumberOfEdges () const
 
Size getNumberOfTriangles () const
 
void remove (TrianglePoint *point, bool deep=true)
 
void remove (PointIterator p, bool deep=true)
 
void remove (TriangleEdge *edge, bool deep=true)
 
void remove (EdgeIterator e, bool deep=true)
 
void remove (Triangle *triangle, bool deep=true)
 
void remove (TriangleIterator t, bool deep=true)
 
void exportSurface (Surface &surface)
 
TriangulatedSurfaceoperator+= (const TriangulatedSurface &surface)
 
void join (TriangulatedSurface &source)
 
void shift (const TVector3< double > &c)
 
void blowUp (const double &r)
 
void setIndices ()
 
void setDensity (const double &density)
 
double getDensity () const
 
void cut (const TPlane3< double > &plane, const double &fuzzy=0)
 
void shrink ()
 
void deleteIsolatedEdges ()
 
void deleteIsolatedPoints ()
 
void getBorder (std::list< TriangleEdge *> &border)
 

Static Public Member Functions

Static Members
static TriangulatedSurfacecreateTube (unsigned int num_vertices, unsigned int subdiv=0, bool closed=false, bool out=true)
 
static TriangulatedSurfacecreateDisk (unsigned int num_vertices, bool out=true)
 

External Iterators

Size number_of_points_
 
std::list< TrianglePoint * > points_
 
Size number_of_edges_
 
std::list< TriangleEdge * > edges_
 
Size number_of_triangles_
 
std::list< Triangle * > triangles_
 
double density_
 
PointIterator beginPoint ()
 
ConstPointIterator beginPoint () const
 
PointIterator endPoint ()
 
ConstPointIterator endPoint () const
 
EdgeIterator beginEdge ()
 
ConstEdgeIterator beginEdge () const
 
EdgeIterator endEdge ()
 
ConstEdgeIterator endEdge () const
 
TriangleIterator beginTriangle ()
 
ConstTriangleIterator beginTriangle () const
 
TriangleIterator endTriangle ()
 
ConstTriangleIterator endTriangle () const
 
bool canBeCopied () const
 
void copy (const TriangulatedSurface &surface)
 

Detailed Description

Generic TriangulatedSurface Class.

Definition at line 40 of file triangulatedSurface.h.

Member Typedef Documentation

◆ ConstEdgeIterator

typedef std::list<TriangleEdge*>::const_iterator BALL::TriangulatedSurface::ConstEdgeIterator

Definition at line 58 of file triangulatedSurface.h.

◆ ConstPointIterator

typedef std::list<TrianglePoint*>::const_iterator BALL::TriangulatedSurface::ConstPointIterator

Definition at line 54 of file triangulatedSurface.h.

◆ ConstTriangleIterator

typedef std::list<Triangle*>::const_iterator BALL::TriangulatedSurface::ConstTriangleIterator

Definition at line 62 of file triangulatedSurface.h.

◆ EdgeIterator

Definition at line 56 of file triangulatedSurface.h.

◆ PointIterator

Definition at line 52 of file triangulatedSurface.h.

◆ TriangleIterator

Definition at line 60 of file triangulatedSurface.h.

Constructor & Destructor Documentation

◆ TriangulatedSurface() [1/2]

BALL::TriangulatedSurface::TriangulatedSurface ( )

Default constructor. This method creates a new TriangulatedSurface object.

◆ TriangulatedSurface() [2/2]

BALL::TriangulatedSurface::TriangulatedSurface ( const TriangulatedSurface surface,
bool  = true 
)

Copy constructor. Create a new TriangulatedSurface object from another.

Parameters
surfacethe TriangulatedSurface object to be copied
boolignored - just for interface consistency

◆ ~TriangulatedSurface()

virtual BALL::TriangulatedSurface::~TriangulatedSurface ( )
virtual

Destructor. Destructs the TriangulatedSurface object.

Member Function Documentation

◆ beginEdge() [1/2]

EdgeIterator BALL::TriangulatedSurface::beginEdge ( )

◆ beginEdge() [2/2]

ConstEdgeIterator BALL::TriangulatedSurface::beginEdge ( ) const

◆ beginPoint() [1/2]

PointIterator BALL::TriangulatedSurface::beginPoint ( )

◆ beginPoint() [2/2]

ConstPointIterator BALL::TriangulatedSurface::beginPoint ( ) const

◆ beginTriangle() [1/2]

TriangleIterator BALL::TriangulatedSurface::beginTriangle ( )

◆ beginTriangle() [2/2]

ConstTriangleIterator BALL::TriangulatedSurface::beginTriangle ( ) const

◆ blowUp()

void BALL::TriangulatedSurface::blowUp ( const double r)

Blow up th TriangulatedSurface. All points are multiplied by a scalar r.

Parameters
rthe blow up factor

◆ canBeCopied()

bool BALL::TriangulatedSurface::canBeCopied ( ) const
protected

◆ clear()

void BALL::TriangulatedSurface::clear ( )

Delete all points, edges and triangles.

◆ copy()

void BALL::TriangulatedSurface::copy ( const TriangulatedSurface surface)
protected

◆ createDisk()

static TriangulatedSurface* BALL::TriangulatedSurface::createDisk ( unsigned int  num_vertices,
bool  out = true 
)
static

A static function that constructs a triangulated disk. The disk lies in the x-y plane and has radius 1.

Parameters
num_verticesThe amount of vertices of which the border of the disk is composed
outControls whether the normals of the tube are pointing up or downwards. Default: true

◆ createTube()

static TriangulatedSurface* BALL::TriangulatedSurface::createTube ( unsigned int  num_vertices,
unsigned int  subdiv = 0,
bool  closed = false,
bool  out = true 
)
static

A static function that constructs a triangulated tube. The tube is oriented along the z-axis, starts at z=0, ends at z=1 and has radius 1

Parameters
num_verticesThe amount of vertices of which the base of the tube is composed
subdivControls the amount of subdivisions along the z-axis. Default: 0
closedShould the tube have opend or closed ends? Default: false
outControls whether the normals of the tube are pointing in or outwards. Default: true

◆ cut()

void BALL::TriangulatedSurface::cut ( const TPlane3< double > &  plane,
const double fuzzy = 0 
)

Cut the TriangulatedSurface on a plane.

Parameters
planethe plane to cut on
fuzzy

◆ deleteIsolatedEdges()

void BALL::TriangulatedSurface::deleteIsolatedEdges ( )

Delete all isolated edges of the TriangulatedSurface

◆ deleteIsolatedPoints()

void BALL::TriangulatedSurface::deleteIsolatedPoints ( )

Delete all isolated points of the TriangulatedSurface

◆ endEdge() [1/2]

EdgeIterator BALL::TriangulatedSurface::endEdge ( )

◆ endEdge() [2/2]

ConstEdgeIterator BALL::TriangulatedSurface::endEdge ( ) const

◆ endPoint() [1/2]

PointIterator BALL::TriangulatedSurface::endPoint ( )

◆ endPoint() [2/2]

ConstPointIterator BALL::TriangulatedSurface::endPoint ( ) const

◆ endTriangle() [1/2]

TriangleIterator BALL::TriangulatedSurface::endTriangle ( )

◆ endTriangle() [2/2]

ConstTriangleIterator BALL::TriangulatedSurface::endTriangle ( ) const

◆ exportSurface()

void BALL::TriangulatedSurface::exportSurface ( Surface surface)

Create a Surface object from the TriangulatedeSurface.

Parameters
surfacethe created Surface object

◆ getBorder()

void BALL::TriangulatedSurface::getBorder ( std::list< TriangleEdge *> &  border)

Get the border edges of the TriangulatedSurface. Border edges are the edges with only one triangle.

Parameters
bordera list of the border edges

◆ getDensity()

double BALL::TriangulatedSurface::getDensity ( ) const

Get the density used by triangulation algorithms.

◆ getNumberOfEdges()

Size BALL::TriangulatedSurface::getNumberOfEdges ( ) const

Get the number of edges of the TriangulatedSurface.

◆ getNumberOfPoints()

Size BALL::TriangulatedSurface::getNumberOfPoints ( ) const

Get the number of points of the TriangulatedSurface.

Deprecated:
Use TriangulatedSurface::getNumberOfPoints() instead

◆ getNumberOfTriangles()

Size BALL::TriangulatedSurface::getNumberOfTriangles ( ) const

Get the number of triangles of the TriangulatedSurface. Use TriangulatedSurface::getNumberOfTriangles() instead

◆ insert() [1/3]

void BALL::TriangulatedSurface::insert ( TrianglePoint point)

Insert a new point to the TriangulatedSurface.

Parameters
pointa pointer to the new point

◆ insert() [2/3]

void BALL::TriangulatedSurface::insert ( TriangleEdge edge)

Insert a new edge to the TriangulatedSurface.

Parameters
edgea pointer to the new edge

◆ insert() [3/3]

void BALL::TriangulatedSurface::insert ( Triangle triangle)

Insert a new triangle to the TriangulatedSurface.

Parameters
trianglea pointer to the new triangle

◆ join()

void BALL::TriangulatedSurface::join ( TriangulatedSurface source)

Add a TriangulatedSurface object. The lists of points, edges and triangles of the given TriangulatedSurface objact are appended. After this operation, the given TriangulatedSurface objact will be empty!

Parameters
sourcethe TriangulatedSurface object to add

◆ operator+=()

TriangulatedSurface& BALL::TriangulatedSurface::operator+= ( const TriangulatedSurface surface)

Add a TriangulatedSurface object. The lists of points, edges and triangles of the given TriangulatedSurface objact are appended. The given TriangulatedSurface objact will be unchanged.

Parameters
surfacethe TriangulatedSurface object to add

◆ operator=()

TriangulatedSurface& BALL::TriangulatedSurface::operator= ( const TriangulatedSurface surface)

Assign from another TriangulatedSurface.

Parameters
surfacethe TriangulatedSurface object to assign from

◆ remove() [1/6]

void BALL::TriangulatedSurface::remove ( TrianglePoint point,
bool  deep = true 
)

Remove a point from the TriangulatedSurface. If deep is true (default) the incidence-structure will be updated.

Parameters
pointa pointer to the point to delete
deeplook above

◆ remove() [2/6]

void BALL::TriangulatedSurface::remove ( PointIterator  p,
bool  deep = true 
)

Remove a point from the TriangulatedSurface. If deep is true (default) the incidence-structure will be updated.

Parameters
pan iterator into the list of points of the TriangulatedSurface which indicates the point to delete
deeplook above

◆ remove() [3/6]

void BALL::TriangulatedSurface::remove ( TriangleEdge edge,
bool  deep = true 
)

Remove an edge from the TriangulatedSurface. If deep is true (not default) the incidence-structure will be updated.

Parameters
edgea pointer to the edge to delete
deeplook above

◆ remove() [4/6]

void BALL::TriangulatedSurface::remove ( EdgeIterator  e,
bool  deep = true 
)

Remove an edge from the TriangulatedSurface. If deep is true (not default) the incidence-structure will be updated.

Parameters
ean iterator into the list of edges of the TriangulatedSurface which indicates the edge to delete
deeplook above

◆ remove() [5/6]

void BALL::TriangulatedSurface::remove ( Triangle triangle,
bool  deep = true 
)

Remove a triangle from the TriangulatedSurface. If deep is true (not default) the incidence-structure will be updated.

Parameters
trianglea pointer to the triangle to delete
deeplook above

◆ remove() [6/6]

void BALL::TriangulatedSurface::remove ( TriangleIterator  t,
bool  deep = true 
)

Remove a triangle from the TriangulatedSurface. If deep is true (not default) the incidence-structure will be updated.

Parameters
tan iterator into the list of triangles of the TriangulatedSurface which indicates the triangle to delete
deeplook above

◆ set()

void BALL::TriangulatedSurface::set ( const TriangulatedSurface surface,
bool  = true 
)

Assign from another TriangulatedSurface.

Parameters
surfacethe TriangulatedSurface object to assign from
boolignored - just for interface consistency

◆ setDensity()

void BALL::TriangulatedSurface::setDensity ( const double density)

Set the density used by triangulation algorithms.

◆ setIndices()

void BALL::TriangulatedSurface::setIndices ( )

Set the indices of all points, edges and triangles.

◆ shift()

void BALL::TriangulatedSurface::shift ( const TVector3< double > &  c)

Shift the TriangulatedSurface. All points are shifted by a vector c.

Parameters
cthe shift vector

◆ shrink()

void BALL::TriangulatedSurface::shrink ( )

Delete all triangles on the border of the TriangulatedSurface

Member Data Documentation

◆ density_

double BALL::TriangulatedSurface::density_
protected

Definition at line 360 of file triangulatedSurface.h.

◆ edges_

std::list<TriangleEdge*> BALL::TriangulatedSurface::edges_
protected

Definition at line 350 of file triangulatedSurface.h.

◆ number_of_edges_

Size BALL::TriangulatedSurface::number_of_edges_
protected

Definition at line 347 of file triangulatedSurface.h.

◆ number_of_points_

Size BALL::TriangulatedSurface::number_of_points_
protected

Definition at line 341 of file triangulatedSurface.h.

◆ number_of_triangles_

Size BALL::TriangulatedSurface::number_of_triangles_
protected

Definition at line 353 of file triangulatedSurface.h.

◆ points_

std::list<TrianglePoint*> BALL::TriangulatedSurface::points_
protected

Definition at line 344 of file triangulatedSurface.h.

◆ triangles_

std::list<Triangle*> BALL::TriangulatedSurface::triangles_
protected

Definition at line 356 of file triangulatedSurface.h.