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