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 class vtkRenderWindow;
46 
49 {
50 public:
54  virtual void PrintSelf(ostream &os, vtkIndent indent);
55 
56  virtual void ReleaseGraphicsResources(vtkWindow *window);
57 
58  virtual void Render(vtkRenderer *renderer, vtkVolume *volume);
59 
61 
63  vtkSetMacro(UseFloatingPointFrameBuffer,bool);
64  vtkGetMacro(UseFloatingPointFrameBuffer,bool);
65  vtkBooleanMacro(UseFloatingPointFrameBuffer,bool);
67 
70  virtual bool IsSupported(vtkRenderWindow *context);
71 
72 protected:
75 
76  void Initialize(vtkRenderer *ren);
78  int CurrentFBOWidth, CurrentFBOHeight;
79  bool AllocateFBOResources(vtkRenderer *ren);
84 
87 
89 
90  float MaxCellSize;
94 
95  int GaveError;
96 
98 
99  float *SqrtTable;
101 
102  virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume);
103 
104  float GetCorrectedDepth(float x, float y, float z1, float z2,
105  const float inverse_projection_mat[16],
106  int use_linear_depth_correction,
107  float linear_depth_correction);
108 
109 private:
111  void operator=(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented.
112 
113  class vtkInternals;
114  vtkInternals *Internals;
115 };
116 
117 #endif
OpenGL rendering window.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
#define VTKRENDERINGVOLUMEOPENGL_EXPORT
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
Abstract class that can sort cell data along a viewpoint.
virtual bool IsSupported(vtkRenderWindow *)
record modification and/or execution time
Definition: vtkTimeStamp.h:34
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
abstract specification for renderers
Definition: vtkRenderer.h:63
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
Unstructured grid volume renderer.
virtual void PrintSelf(ostream &os, vtkIndent indent)
represents the common properties for rendering a volume.
dynamic, self-adjusting array of unsigned char
static vtkProjectedTetrahedraMapper * New()
create a window for renderers to draw into
virtual void ReleaseGraphicsResources(vtkWindow *)