00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkCellCenterDepthSort.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 00016 /* 00017 * Copyright 2003 Sandia Corporation. 00018 * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00019 * license for use of this work by or on behalf of the 00020 * U.S. Government. Redistribution and use in source and binary forms, with 00021 * or without modification, are permitted provided that this Notice and any 00022 * statement of authorship are reproduced on all copies. 00023 */ 00024 00038 #ifndef __vtkCellCenterDepthSort_h 00039 #define __vtkCellCenterDepthSort_h 00040 00041 #include "vtkVisibilitySort.h" 00042 00043 class vtkFloatArray; 00044 00045 class vtkCellCenterDepthSortStack; 00046 00047 class VTK_RENDERING_EXPORT vtkCellCenterDepthSort : public vtkVisibilitySort 00048 { 00049 public: 00050 vtkTypeRevisionMacro(vtkCellCenterDepthSort, vtkVisibilitySort); 00051 virtual void PrintSelf(ostream &os, vtkIndent indent); 00052 static vtkCellCenterDepthSort *New(); 00053 00054 virtual void InitTraversal(); 00055 virtual vtkIdTypeArray *GetNextCells(); 00056 00057 protected: 00058 vtkCellCenterDepthSort(); 00059 virtual ~vtkCellCenterDepthSort(); 00060 00061 vtkIdTypeArray *SortedCells; 00062 vtkIdTypeArray *SortedCellPartition; 00063 00064 vtkFloatArray *CellCenters; 00065 vtkFloatArray *CellDepths; 00066 vtkFloatArray *CellPartitionDepths; 00067 00068 virtual float *ComputeProjectionVector(); 00069 virtual void ComputeCellCenters(); 00070 virtual void ComputeDepths(); 00071 00072 private: 00073 vtkCellCenterDepthSortStack *ToSort; 00074 00075 vtkCellCenterDepthSort(const vtkCellCenterDepthSort &); // Not implemented. 00076 void operator=(const vtkCellCenterDepthSort &); // Not implemented. 00077 }; 00078 00079 #endif //__vtkCellCenterDepthSort_h 00080