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 "vtkRenderingVolumeOpenGLModule.h" // For export macro 00039 #include "vtkProjectedTetrahedraMapper.h" 00040 00041 class vtkVisibilitySort; 00042 class vtkUnsignedCharArray; 00043 class vtkFloatArray; 00044 class vtkRenderWindow; 00045 class vtkOpenGLRenderWindow; 00046 00047 class VTKRENDERINGVOLUMEOPENGL_EXPORT vtkOpenGLProjectedTetrahedraMapper 00048 : public vtkProjectedTetrahedraMapper 00049 { 00050 public: 00051 vtkTypeMacro(vtkOpenGLProjectedTetrahedraMapper, 00052 vtkProjectedTetrahedraMapper); 00053 static vtkOpenGLProjectedTetrahedraMapper *New(); 00054 virtual void PrintSelf(ostream &os, vtkIndent indent); 00055 00056 virtual void ReleaseGraphicsResources(vtkWindow *window); 00057 00058 virtual void Render(vtkRenderer *renderer, vtkVolume *volume); 00059 00061 00063 vtkSetMacro(UseFloatingPointFrameBuffer,bool); 00064 vtkGetMacro(UseFloatingPointFrameBuffer,bool); 00065 vtkBooleanMacro(UseFloatingPointFrameBuffer,bool); 00067 00070 virtual bool IsSupported(vtkRenderWindow *context); 00071 00072 protected: 00073 vtkOpenGLProjectedTetrahedraMapper(); 00074 ~vtkOpenGLProjectedTetrahedraMapper(); 00075 00076 void Initialize(vtkRenderer *ren); 00077 bool Initialized; 00078 int CurrentFBOWidth, CurrentFBOHeight; 00079 bool AllocateFBOResources(vtkRenderer *ren); 00080 bool CanDoFloatingPointFrameBuffer; 00081 bool FloatingPointFrameBufferResourcesAllocated; 00082 bool UseFloatingPointFrameBuffer; 00083 00084 vtkUnsignedCharArray *Colors; 00085 int UsingCellColors; 00086 00087 vtkFloatArray *TransformedPoints; 00088 00089 float MaxCellSize; 00090 vtkTimeStamp InputAnalyzedTime; 00091 vtkTimeStamp OpacityTextureTime; 00092 vtkTimeStamp ColorsMappedTime; 00093 00094 int GaveError; 00095 00096 vtkVolumeProperty *LastProperty; 00097 00098 float *SqrtTable; 00099 float SqrtTableBias; 00100 00101 virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume); 00102 00103 float GetCorrectedDepth(float x, float y, float z1, float z2, 00104 const float inverse_projection_mat[16], 00105 int use_linear_depth_correction, 00106 float linear_depth_correction); 00107 00108 private: 00109 vtkOpenGLProjectedTetrahedraMapper(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented. 00110 void operator=(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented. 00111 00112 class vtkInternals; 00113 vtkInternals *Internals; 00114 }; 00115 00116 #endif