VTK
|
A simple implementation of vtkCellDepthSort. More...
#include <vtkCellCenterDepthSort.h>
Public Types | |
typedef vtkVisibilitySort | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkCellCenterDepthSort * | NewInstance () const |
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 (vtkObjectBase *o) |
static vtkCellCenterDepthSort * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkCellCenterDepthSort () | |
virtual | ~vtkCellCenterDepthSort () |
virtual float * | ComputeProjectionVector () |
virtual void | ComputeCellCenters () |
virtual void | ComputeDepths () |
Protected Attributes | |
vtkIdTypeArray * | SortedCells |
vtkIdTypeArray * | SortedCellPartition |
vtkFloatArray * | CellCenters |
vtkFloatArray * | CellDepths |
vtkFloatArray * | CellPartitionDepths |
A simple implementation of vtkCellDepthSort.
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 48 of file vtkCellCenterDepthSort.h.
Reimplemented from vtkVisibilitySort.
Definition at line 51 of file vtkCellCenterDepthSort.h.
vtkCellCenterDepthSort::vtkCellCenterDepthSort | ( | ) | [protected] |
virtual vtkCellCenterDepthSort::~vtkCellCenterDepthSort | ( | ) | [protected, virtual] |
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 | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkVisibilitySort.
virtual vtkObjectBase* vtkCellCenterDepthSort::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkVisibilitySort.
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 62 of file vtkCellCenterDepthSort.h.
Definition at line 63 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellCenters [protected] |
Definition at line 65 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellDepths [protected] |
Definition at line 66 of file vtkCellCenterDepthSort.h.
vtkFloatArray* vtkCellCenterDepthSort::CellPartitionDepths [protected] |
Definition at line 67 of file vtkCellCenterDepthSort.h.