VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkOpenGLProjectedTetrahedraMapper.h 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 00035 #ifndef __vtkOpenGLProjectedTetrahedraMapper_h 00036 #define __vtkOpenGLProjectedTetrahedraMapper_h 00037 00038 #include "vtkProjectedTetrahedraMapper.h" 00039 00040 class vtkVisibilitySort; 00041 class vtkUnsignedCharArray; 00042 class vtkFloatArray; 00043 00044 class VTK_VOLUMERENDERING_EXPORT vtkOpenGLProjectedTetrahedraMapper : public vtkProjectedTetrahedraMapper 00045 { 00046 public: 00047 vtkTypeMacro(vtkOpenGLProjectedTetrahedraMapper, 00048 vtkProjectedTetrahedraMapper); 00049 static vtkOpenGLProjectedTetrahedraMapper *New(); 00050 virtual void PrintSelf(ostream &os, vtkIndent indent); 00051 00052 virtual void ReleaseGraphicsResources(vtkWindow *window); 00053 00054 virtual void Render(vtkRenderer *renderer, vtkVolume *volume); 00055 00057 00059 vtkSetMacro(UseFloatingPointFrameBuffer,bool); 00060 vtkGetMacro(UseFloatingPointFrameBuffer,bool); 00061 vtkBooleanMacro(UseFloatingPointFrameBuffer,bool); 00063 00064 protected: 00065 vtkOpenGLProjectedTetrahedraMapper(); 00066 ~vtkOpenGLProjectedTetrahedraMapper(); 00067 00068 void Initialize(vtkRenderer *ren); 00069 bool Initialized; 00070 int CurrentFBOWidth, CurrentFBOHeight; 00071 bool CheckFBOResources(vtkRenderer *ren); 00072 bool CanDoFloatingPointFrameBuffer; 00073 bool FloatingPointFrameBufferResourcesAllocated; 00074 bool UseFloatingPointFrameBuffer; 00075 00076 vtkUnsignedCharArray *Colors; 00077 int UsingCellColors; 00078 00079 vtkFloatArray *TransformedPoints; 00080 00081 float MaxCellSize; 00082 vtkTimeStamp InputAnalyzedTime; 00083 vtkTimeStamp OpacityTextureTime; 00084 vtkTimeStamp ColorsMappedTime; 00085 00086 int GaveError; 00087 00088 vtkVolumeProperty *LastProperty; 00089 00090 float *SqrtTable; 00091 float SqrtTableBias; 00092 00093 virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume); 00094 00095 float GetCorrectedDepth(float x, float y, float z1, float z2, 00096 const float inverse_projection_mat[16], 00097 int use_linear_depth_correction, 00098 float linear_depth_correction); 00099 00100 private: 00101 vtkOpenGLProjectedTetrahedraMapper(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented. 00102 void operator=(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented. 00103 00104 class vtkInternals; 00105 00106 vtkInternals *Internals; 00107 }; 00108 00109 #endif