Files Classes Functions Hierarchy
#include <halfspaceContainer.h>
Public Member Functions | |
| halfspaceContainer (HS const &halfspace_, vector< PT > const &pts_) | |
| Needs a half space and a reference to the points to be operated on. | |
| void | isInsideOrOnBoundary (list< uint > const &target) |
| Copies the targets indexes which the half-space can see, or is on the boundary. | |
| void | subtractfrom (list< uint > &target) |
| Moves the target indexes which the half-space can see into index. | |
Public Attributes | |
| HS | halfspace |
| The half space. | |
| list< uint > | index |
| Indexes into a vector of T. | |
| vector< PT > const & | pts |
| Global points. | |
Definition at line 15 of file halfspaceContainer.h.
| halfspaceContainer< HS, PT >::halfspaceContainer | ( | HS const & | halfspace_, | |
| vector< PT > const & | pts_ | |||
| ) | [inline] |
Needs a half space and a reference to the points to be operated on.
Definition at line 31 of file halfspaceContainer.h.
| void halfspaceContainer< HS, PT >::isInsideOrOnBoundary | ( | list< uint > const & | target | ) | [inline] |
Copies the targets indexes which the half-space can see, or is on the boundary.
ie populates index.
Definition at line 68 of file halfspaceContainer.h.
References pts.
Referenced by quickhull2D< PT, D >::quickhull2D(), and quickhull3D< PT, D >::reset().
00071 { 00072 list< uint >::const_iterator i=target.begin(); 00073 list< uint >::const_iterator iend=target.end(); 00074 for ( ; i!=iend; ++i) 00075 { 00076 if (halfspace.isInsideOrOnBoundary(pts[*i])) 00077 index.push_back(*i); 00078 } 00079 }
| void halfspaceContainer< HS, PT >::subtractfrom | ( | list< uint > & | target | ) | [inline] |
Moves the target indexes which the half-space can see into index.
Includes the boundary.
Definition at line 51 of file halfspaceContainer.h.
References pts.
00054 { 00055 list<uint>::iterator i=target.begin(); 00056 for ( ; i!=target.end(); ++i) 00057 { 00058 if (halfspace.isInsideOrOnBoundary(pts[*i])) 00059 { 00060 index.push_back(*i); 00061 i=target.erase(i); 00062 } 00063 } 00064 }
| HS halfspaceContainer< HS, PT >::halfspace |
| list<uint> halfspaceContainer< HS, PT >::index |
| vector< PT > const& halfspaceContainer< HS, PT >::pts |
1.5.8