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 | ( | ) |
|
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 |