VTK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
vtkPlanesIntersection Class Reference

A vtkPlanesIntersection object is a vtkPlanes object that can compute whether the arbitrary convex region bounded by it's planes intersects an axis-aligned box. More...

#include <vtkPlanesIntersection.h>

Inheritance diagram for vtkPlanesIntersection:
Inheritance graph
[legend]
Collaboration diagram for vtkPlanesIntersection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual int IsA (const char *type)
vtkPlanesIntersectionNewInstance () const
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 int IsTypeOf (const char *type)
static vtkPlanesIntersectionSafeDownCast (vtkObjectBase *o)
static vtkPlanesIntersectionNew ()
static int PolygonIntersectsBBox (double bounds[6], vtkPoints *pts)
static vtkPlanesIntersectionConvert3DCell (vtkCell *cell)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 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])

Detailed Description

A vtkPlanesIntersection object is a vtkPlanes object that can compute whether the arbitrary convex region bounded by it's planes intersects an axis-aligned box.

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.

Caveat:
An instance of vtkPlanes can be redefined by changing the planes, but this subclass then will not know if the region vertices are up to date. (Region vertices can be specified in SetRegionVertices or computed by the subclass.) So Delete and recreate if you want to change the set of planes.

Definition at line 51 of file vtkPlanesIntersection.h.


Constructor & Destructor Documentation


Member Function Documentation

static int vtkPlanesIntersection::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPlanes.

virtual int vtkPlanesIntersection::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPlanes.

Reimplemented from vtkPlanes.

virtual vtkObjectBase* vtkPlanesIntersection::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkPlanes.

Reimplemented from vtkPlanes.

void vtkPlanesIntersection::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPlanes.

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkPlanes.

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 
)

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.

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]

The documentation for this class was generated from the following file: