VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Rendering/VolumeOpenGL/vtkOpenGLProjectedTetrahedraMapper.h
Go to the documentation of this file.
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   bool HasHardwareSupport;
00084 
00085   vtkUnsignedCharArray *Colors;
00086   int UsingCellColors;
00087 
00088   vtkFloatArray *TransformedPoints;
00089 
00090   float MaxCellSize;
00091   vtkTimeStamp InputAnalyzedTime;
00092   vtkTimeStamp OpacityTextureTime;
00093   vtkTimeStamp ColorsMappedTime;
00094 
00095   int GaveError;
00096 
00097   vtkVolumeProperty *LastProperty;
00098 
00099   float *SqrtTable;
00100   float SqrtTableBias;
00101 
00102   virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume);
00103 
00104   float GetCorrectedDepth(float x, float y, float z1, float z2,
00105                           const float inverse_projection_mat[16],
00106                           int use_linear_depth_correction,
00107                           float linear_depth_correction);
00108 
00109 private:
00110   vtkOpenGLProjectedTetrahedraMapper(const vtkOpenGLProjectedTetrahedraMapper &);  // Not Implemented.
00111   void operator=(const vtkOpenGLProjectedTetrahedraMapper &);  // Not Implemented.
00112 
00113   class vtkInternals;
00114   vtkInternals *Internals;
00115 };
00116 
00117 #endif