Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

vuConvexHull Class Reference

#include <vuConvexHull.h>

Collaboration diagram for vuConvexHull:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 vuConvexHull ()
void setPoints (int npoints, float *plist)
void addPoint (float x, float y)
void addPoint (int index, float x, float y)
void clearPoints ()
int getNPoints ()
int angleThreshold (float angle_th)
bool getCHull (vuDVector< int > &indices)
bool getCHull (int &lenHull, int *indices)

Private Member Functions

void setPoints (const vuDVector< CHPoint > &plist)
void addPoint (const CHPoint &p)
void sortPList ()
void sweepLine ()
void mergeULHulls ()
void calcConvexHull ()

Static Private Member Functions

float knickTest (const CHPoint &b, const CHPoint &q, const CHPoint &r)

Private Attributes

vuDVector< CHPointm_PList
vuDVector< CHPointm_CHull
vuDVector< CHPointm_UHull
vuDVector< CHPointm_LHull
bool m_CHCalculated

Constructor & Destructor Documentation

vuConvexHull::vuConvexHull  )  [inline]
 

Definition at line 10 of file vuConvexHull.h.


Member Function Documentation

void vuConvexHull::addPoint const CHPoint p  )  [private]
 

Definition at line 26 of file vuConvexHull.cpp.

References vuDVector< T >::add(), vuDVector< T >::getLength(), vuConvexHull::CHPoint::index, m_CHCalculated, and m_PList.

Here is the call graph for this function:

void vuConvexHull::addPoint int  index,
float  x,
float  y
 

Definition at line 47 of file vuConvexHull.cpp.

References vuDVector< T >::add(), vuDVector< T >::getLength(), m_CHCalculated, and m_PList.

Here is the call graph for this function:

void vuConvexHull::addPoint float  x,
float  y
 

Definition at line 41 of file vuConvexHull.cpp.

References vuDVector< T >::add(), getNPoints(), m_CHCalculated, and m_PList.

Referenced by vuLightDial::DrawShape(), and vuLightDial::OnMouseEvent().

Here is the call graph for this function:

int vuConvexHull::angleThreshold float  angle_th  ) 
 

Definition at line 157 of file vuConvexHull.cpp.

References calcConvexHull(), vuVector::dot, vuDVector< T >::getLength(), m_CHull, M_PI, vuVector::normalize(), and vuDVector< T >::remove().

Here is the call graph for this function:

void vuConvexHull::calcConvexHull  )  [private]
 

Definition at line 149 of file vuConvexHull.cpp.

References m_CHCalculated, mergeULHulls(), sortPList(), and sweepLine().

Referenced by angleThreshold(), and getCHull().

Here is the call graph for this function:

void vuConvexHull::clearPoints  ) 
 

Definition at line 61 of file vuConvexHull.cpp.

References vuDVector< T >::getLength(), m_PList, and vuDVector< T >::removeRange().

Referenced by vuLightDial::DrawShape().

Here is the call graph for this function:

bool vuConvexHull::getCHull int &  lenHull,
int *  indices
 

Definition at line 79 of file vuConvexHull.cpp.

References calcConvexHull(), vuDVector< T >::getLength(), and m_CHull.

Here is the call graph for this function:

bool vuConvexHull::getCHull vuDVector< int > &  indices  ) 
 

Definition at line 66 of file vuConvexHull.cpp.

References vuDVector< T >::add(), calcConvexHull(), vuDVector< T >::getLength(), m_CHull, and vuDVector< T >::removeAll().

Referenced by vuLightDial::DrawShape().

Here is the call graph for this function:

int vuConvexHull::getNPoints  )  [inline]
 

Definition at line 16 of file vuConvexHull.h.

Referenced by addPoint(), sortPList(), and sweepLine().

float vuConvexHull::knickTest const CHPoint b,
const CHPoint q,
const CHPoint r
[static, private]
 

Definition at line 134 of file vuConvexHull.cpp.

References vuConvexHull::CHPoint::x, and vuConvexHull::CHPoint::y.

Referenced by sweepLine().

void vuConvexHull::mergeULHulls  )  [private]
 

Definition at line 139 of file vuConvexHull.cpp.

References vuDVector< T >::add(), vuDVector< T >::getLength(), m_CHull, m_LHull, m_UHull, and vuDVector< T >::removeAll().

Referenced by calcConvexHull().

Here is the call graph for this function:

void vuConvexHull::setPoints const vuDVector< CHPoint > &  plist  )  [private]
 

Definition at line 16 of file vuConvexHull.cpp.

References vuDVector< T >::add(), vuDVector< T >::getLength(), m_CHCalculated, and m_PList.

Here is the call graph for this function:

void vuConvexHull::setPoints int  npoints,
float plist
 

Definition at line 6 of file vuConvexHull.cpp.

References vuDVector< T >::add(), m_CHCalculated, and m_PList.

Here is the call graph for this function:

void vuConvexHull::sortPList  )  [private]
 

Definition at line 93 of file vuConvexHull.cpp.

References getNPoints(), and m_PList.

Referenced by calcConvexHull().

Here is the call graph for this function:

void vuConvexHull::sweepLine  )  [private]
 

Definition at line 112 of file vuConvexHull.cpp.

References vuDVector< T >::add(), vuDVector< T >::getLength(), getNPoints(), knickTest(), m_LHull, m_PList, m_UHull, vuDVector< T >::remove(), and vuDVector< T >::removeAll().

Referenced by calcConvexHull().

Here is the call graph for this function:


Member Data Documentation

bool vuConvexHull::m_CHCalculated [private]
 

Definition at line 60 of file vuConvexHull.h.

Referenced by addPoint(), calcConvexHull(), and setPoints().

vuDVector<CHPoint> vuConvexHull::m_CHull [private]
 

Definition at line 58 of file vuConvexHull.h.

Referenced by angleThreshold(), getCHull(), and mergeULHulls().

vuDVector<CHPoint> vuConvexHull::m_LHull [private]
 

Definition at line 59 of file vuConvexHull.h.

Referenced by mergeULHulls(), and sweepLine().

vuDVector<CHPoint> vuConvexHull::m_PList [private]
 

Definition at line 57 of file vuConvexHull.h.

Referenced by addPoint(), clearPoints(), setPoints(), sortPList(), and sweepLine().

vuDVector<CHPoint> vuConvexHull::m_UHull [private]
 

Definition at line 59 of file vuConvexHull.h.

Referenced by mergeULHulls(), and sweepLine().


The documentation for this class was generated from the following files:
Generated on Wed Dec 15 21:21:14 2004 for vuVolume by  doxygen 1.3.9.1