|
MeVisLab Toolbox Reference
|
This class is a helper class used internally by CSOPointInPolygon. More...
#include <CSOPointInPolygon.h>
Public Member Functions | |
| ProjectedCSO () | |
| Default constructor. | |
| bool | contains (const Vector3 &p) const |
| Checks whether the projected CSO contains the point p. | |
Static Public Member Functions | |
| static ProjectedCSO | fromCSO (const CSO *cso) |
| Projects the given planar CSO cso to one of the 2D planes X-Y, X-Z, Y-Z. | |
| static ProjectedCSO | fromPointListAndNormal (const std::vector< Vector3 > &points, const Vector3 &normal) |
| The same as fromCSO() but with a vector of positions and a normal instead of a CSO. | |
This class is a helper class used internally by CSOPointInPolygon.
This class represents the projection of a planar CSO to one of the 2D planes X-Y, X-Z, or Y-Z.
Definition at line 33 of file CSOPointInPolygon.h.
| ml::ProjectedCSO::ProjectedCSO | ( | ) |
Default constructor.
Creates an invalid projected CSO. Use fromCSO() for creating a projected CSO.
Referenced by fromCSO(), and fromPointListAndNormal().
| bool ml::ProjectedCSO::contains | ( | const Vector3 & | p | ) | const |
|
static |
Projects the given planar CSO cso to one of the 2D planes X-Y, X-Z, Y-Z.
This is done by ignoring one of the 3D coordinates and using the other two. To achieve optimal numerical robustness, the normal vector of the CSO is calculated and the coordinate with the largest absolute value is chosen. Returns an invalid projected CSO if the given CSO is not planar.
See John M. Snyder, Alan H. Barr, "Ray Tracing Complex Models Containing Surface Tessellations", Computer Graphics 21(4), 119-126 (1987) [also in the Proceedings of SIGGRAPH 1987] for details.
| cso | The CSO to be projected to 2D. |
References ProjectedCSO().
|
static |
The same as fromCSO() but with a vector of positions and a normal instead of a CSO.
References ProjectedCSO().