VTK
vtkOpenGLProjectedTetrahedraMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkOpenGLProjectedTetrahedraMapper.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*
17  * Copyright 2003 Sandia Corporation.
18  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
19  * license for use of this work by or on behalf of the
20  * U.S. Government. Redistribution and use in source and binary forms, with
21  * or without modification, are permitted provided that this Notice and any
22  * statement of authorship are reproduced on all copies.
23  */
24 
35 #ifndef __vtkOpenGLProjectedTetrahedraMapper_h
36 #define __vtkOpenGLProjectedTetrahedraMapper_h
37 
38 #include "vtkRenderingVolumeOpenGLModule.h" // For export macro
40 
41 class vtkVisibilitySort;
43 class vtkFloatArray;
44 
45 class VTKRENDERINGVOLUMEOPENGL_EXPORT vtkOpenGLProjectedTetrahedraMapper
47 {
48 public:
52  virtual void PrintSelf(ostream &os, vtkIndent indent);
53 
54  virtual void ReleaseGraphicsResources(vtkWindow *window);
55 
56  virtual void Render(vtkRenderer *renderer, vtkVolume *volume);
57 
59 
61  vtkSetMacro(UseFloatingPointFrameBuffer,bool);
62  vtkGetMacro(UseFloatingPointFrameBuffer,bool);
63  vtkBooleanMacro(UseFloatingPointFrameBuffer,bool);
65 
66 protected:
69 
70  void Initialize(vtkRenderer *ren);
72  int CurrentFBOWidth, CurrentFBOHeight;
73  bool CheckFBOResources(vtkRenderer *ren);
77 
80 
82 
83  float MaxCellSize;
87 
88  int GaveError;
89 
91 
92  float *SqrtTable;
94 
95  virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume);
96 
97  float GetCorrectedDepth(float x, float y, float z1, float z2,
98  const float inverse_projection_mat[16],
99  int use_linear_depth_correction,
100  float linear_depth_correction);
101 
102 private:
104  void operator=(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented.
105 
106  class vtkInternals;
107 
108  vtkInternals *Internals;
109 };
110 
111 #endif