#include <vtkCellCenterDepthSort.h>
vtkCellCenterDepthSort is a simple and fast implementation of depth sort, but it only provides approximate results. The sorting algorithm finds the centroids of all the cells. It then performs the dot product of the centroids against a vector pointing in the direction of the camera transformed into object space. It then performs an ordinary sort on the result.
Definition at line 47 of file vtkCellCenterDepthSort.h.
Public Types | |
typedef vtkVisibilitySort | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | InitTraversal () |
virtual vtkIdTypeArray * | GetNextCells () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkCellCenterDepthSort * | SafeDownCast (vtkObject *o) |
static vtkCellCenterDepthSort * | New () |
Protected Member Functions | |
vtkCellCenterDepthSort () | |
virtual | ~vtkCellCenterDepthSort () |
virtual float * | ComputeProjectionVector () |
virtual void | ComputeCellCenters () |
virtual void | ComputeDepths () |
Protected Attributes | |
vtkIdTypeArray * | SortedCells |
vtkIdTypeArray * | SortedCellPartition |
vtkFloatArray * | CellCenters |
vtkFloatArray * | CellDepths |
vtkFloatArray * | CellPartitionDepths |
vtkCellCenterDepthSort::vtkCellCenterDepthSort | ( | ) | [protected] |
virtual vtkCellCenterDepthSort::~vtkCellCenterDepthSort | ( | ) | [protected, virtual] |
virtual const char* vtkCellCenterDepthSort::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkVisibilitySort.
static int vtkCellCenterDepthSort::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 vtkVisibilitySort.
virtual int vtkCellCenterDepthSort::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 vtkVisibilitySort.
static vtkCellCenterDepthSort* vtkCellCenterDepthSort::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkVisibilitySort.
virtual void vtkCellCenterDepthSort::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 vtkVisibilitySort.
static vtkCellCenterDepthSort* vtkCellCenterDepthSort::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
virtual void vtkCellCenterDepthSort::InitTraversal | ( | ) | [virtual] |
To facilitate incremental sorting algorithms, the cells are retrieved in an iteration process. That is, call InitTraversal to start the iteration and call GetNextCells to get the cell IDs in order. However, for efficiencies sake, GetNextCells returns an ordered list of several id's in once call (but not necessarily all). GetNextCells will return NULL once the entire sorted list is output. The vtkIdTypeArray returned from GetNextCells is a cached array, so do not delete it. At the same note, do not expect the array to be valid after subsequent calls to GetNextCells.
Implements vtkVisibilitySort.
virtual vtkIdTypeArray* vtkCellCenterDepthSort::GetNextCells | ( | ) | [virtual] |
To facilitate incremental sorting algorithms, the cells are retrieved in an iteration process. That is, call InitTraversal to start the iteration and call GetNextCells to get the cell IDs in order. However, for efficiencies sake, GetNextCells returns an ordered list of several id's in once call (but not necessarily all). GetNextCells will return NULL once the entire sorted list is output. The vtkIdTypeArray returned from GetNextCells is a cached array, so do not delete it. At the same note, do not expect the array to be valid after subsequent calls to GetNextCells.
Implements vtkVisibilitySort.
virtual float* vtkCellCenterDepthSort::ComputeProjectionVector | ( | ) | [protected, virtual] |
virtual void vtkCellCenterDepthSort::ComputeCellCenters | ( | ) | [protected, virtual] |
virtual void vtkCellCenterDepthSort::ComputeDepths | ( | ) | [protected, virtual] |
vtkIdTypeArray* vtkCellCenterDepthSort::SortedCells [protected] |
Definition at line 61 of file vtkCellCenterDepthSort.h.
Definition at line 62 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellCenters [protected] |
Definition at line 64 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellDepths [protected] |
Definition at line 65 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellPartitionDepths [protected] |
Definition at line 66 of file vtkCellCenterDepthSort.h.