Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPlanesIntersection Class Reference

#include <vtkPlanesIntersection.h>

Inheritance diagram for vtkPlanesIntersection:

Inheritance graph
[legend]
Collaboration diagram for vtkPlanesIntersection:

Collaboration graph
[legend]
List of all members.

Detailed Description

Computes whether the convex region defined by (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 a view frustum created by a rectangular portion of the view plane. 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.
Created by:
  • Law, Charles
CVS contributions (if > 5%):
  • Law, Charles (98%)
CVS logs (CVSweb):
  • .cxx (/Parallel/vtkPlanesIntersection.cxx)
  • .h (/Parallel/vtkPlanesIntersection.h)

Definition at line 61 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

vtkPlanesIntersectionNew ()
int PolygonIntersectsBBox (double bounds[6], vtkPoints *pts)
vtkPlanesIntersectionConvertFrustumToWorld (vtkRenderer *ren, double x0, double x1, double y0, double y1)
vtkPlanesIntersectionConvert3DCell (vtkCell *cell)

Protected Member Functions

 vtkPlanesIntersection ()
 ~vtkPlanesIntersection ()


Constructor & Destructor Documentation

vtkPlanesIntersection::vtkPlanesIntersection  )  [protected]
 

vtkPlanesIntersection::~vtkPlanesIntersection  )  [protected]
 


Member Function Documentation

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.

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.

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.

vtkPlanesIntersection* vtkPlanesIntersection::ConvertFrustumToWorld vtkRenderer ren,
double  x0,
double  x1,
double  y0,
double  y1
[static]
 

Another convenience function provided by this class, it returns the vtkPlanesIntersection object representing the view frustum created by projecting a sub-rectangle of the view plane. Sub-rectangle range is [-1,1],[-1,1]. If you want the entire view plane, you can instead use vtkCamera::GetFrustumPlanes() to get the planes, then create a vtkPlanesIntersection object and use vtkPlanes::SetFrustumPlanes() to set the planes.

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.


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