#include <vtkPlanesIntersection.h>
A subclass of vtkPlanes, this class determines whether it intersects an axis aligned box. This is motivated by the need to intersect the axis aligned region of a spacial decomposition of volume data with various other regions. It uses the algorithm from Graphics Gems IV, page 81.
Definition at line 50 of file vtkPlanesIntersection.h.
Public Member Functions | |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetRegionVertices (vtkPoints *pts) |
void | SetRegionVertices (double *v, int nvertices) |
int | GetNumRegionVertices () |
int | GetRegionVertices (double *v, int nvertices) |
int | IntersectsRegion (vtkPoints *R) |
Static Public Member Functions | |
static vtkPlanesIntersection * | New () |
static int | PolygonIntersectsBBox (double bounds[6], vtkPoints *pts) |
static vtkPlanesIntersection * | Convert3DCell (vtkCell *cell) |
Protected Member Functions | |
vtkPlanesIntersection () | |
~vtkPlanesIntersection () | |
Static Protected Member Functions | |
static void | ComputeNormal (double *p1, double *p2, double *p3, double normal[3]) |
static double | EvaluatePlaneEquation (double *x, double *p) |
static void | PlaneEquation (double *n, double *x, double *p) |
static int | GoodNormal (double *n) |
static int | Invert3x3 (double M[3][3]) |
vtkPlanesIntersection::vtkPlanesIntersection | ( | ) | [protected] |
vtkPlanesIntersection::~vtkPlanesIntersection | ( | ) | [protected] |
void vtkPlanesIntersection::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
static vtkPlanesIntersection* vtkPlanesIntersection::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkPlanes.
void vtkPlanesIntersection::SetRegionVertices | ( | vtkPoints * | pts | ) |
It helps if you know the vertices of the convex region. If you don't, we will calculate them. Region vertices are 3-tuples.
void vtkPlanesIntersection::SetRegionVertices | ( | double * | v, | |
int | nvertices | |||
) |
int vtkPlanesIntersection::GetNumRegionVertices | ( | ) |
int vtkPlanesIntersection::GetRegionVertices | ( | double * | v, | |
int | nvertices | |||
) |
int vtkPlanesIntersection::IntersectsRegion | ( | vtkPoints * | R | ) |
Return 1 if the axis aligned box defined by R intersects the region defined by the planes, or 0 otherwise.
static int vtkPlanesIntersection::PolygonIntersectsBBox | ( | double | bounds[6], | |
vtkPoints * | pts | |||
) | [static] |
A convenience function provided by this class, returns 1 if the polygon defined in pts intersects the bounding box defined in bounds, 0 otherwise. The points must define a planar polygon.
static vtkPlanesIntersection* vtkPlanesIntersection::Convert3DCell | ( | vtkCell * | cell | ) | [static] |
Another convenience function provided by this class, returns the vtkPlanesIntersection object representing a 3D cell. The point IDs for each face must be given in counter-clockwise order from the outside of the cell.
static void vtkPlanesIntersection::ComputeNormal | ( | double * | p1, | |
double * | p2, | |||
double * | p3, | |||
double | normal[3] | |||
) | [static, protected] |
static double vtkPlanesIntersection::EvaluatePlaneEquation | ( | double * | x, | |
double * | p | |||
) | [static, protected] |
static void vtkPlanesIntersection::PlaneEquation | ( | double * | n, | |
double * | x, | |||
double * | p | |||
) | [static, protected] |
static int vtkPlanesIntersection::GoodNormal | ( | double * | n | ) | [static, protected] |
static int vtkPlanesIntersection::Invert3x3 | ( | double | M[3][3] | ) | [static, protected] |