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 "vtkRenderingVolumeOpenGL2Module.h" // For export macro
40 
41 #include "vtkglVBOHelper.h" // used for ivars
42 
43 class vtkVisibilitySort;
45 class vtkFloatArray;
46 class vtkRenderWindow;
48 
49 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
51 {
52 public:
56  virtual void PrintSelf(ostream &os, vtkIndent indent);
57 
58  virtual void ReleaseGraphicsResources(vtkWindow *window);
59 
60  virtual void Render(vtkRenderer *renderer, vtkVolume *volume);
61 
63 
65  vtkSetMacro(UseFloatingPointFrameBuffer,bool);
66  vtkGetMacro(UseFloatingPointFrameBuffer,bool);
67  vtkBooleanMacro(UseFloatingPointFrameBuffer,bool);
69 
72  virtual bool IsSupported(vtkRenderWindow *context);
73 
74 protected:
77 
78  void Initialize(vtkRenderer *ren);
79  bool Initialized;
80  int CurrentFBOWidth, CurrentFBOHeight;
81  bool AllocateFBOResources(vtkRenderer *ren);
82  bool CanDoFloatingPointFrameBuffer;
83  bool FloatingPointFrameBufferResourcesAllocated;
84  bool UseFloatingPointFrameBuffer;
85  bool HasHardwareSupport;
86 
87  vtkUnsignedCharArray *Colors;
88  int UsingCellColors;
89 
90  vtkFloatArray *TransformedPoints;
91 
92  float MaxCellSize;
93  vtkTimeStamp InputAnalyzedTime;
94  vtkTimeStamp ColorsMappedTime;
95 
96  // The VBO and its layout.
99 
100  // Structures for the various cell types we render.
102 
103  int GaveError;
104 
105  vtkVolumeProperty *LastProperty;
106 
107  float *SqrtTable;
108  float SqrtTableBias;
109 
110  virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume);
111 
112  float GetCorrectedDepth(float x, float y, float z1, float z2,
113  const float inverse_projection_mat[16],
114  int use_linear_depth_correction,
115  float linear_depth_correction);
116 
117 private:
119  void operator=(const vtkOpenGLProjectedTetrahedraMapper &); // Not Implemented.
120 
121  class vtkInternals;
122  vtkInternals *Internals;
123 };
124 
125 #endif
OpenGL rendering window.
OpenGL buffer object.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
Abstract class that can sort cell data along a viewpoint.
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
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
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:632
window superclass for vtkRenderWindow
Definition: vtkWindow.h:33
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
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
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
virtual void ReleaseGraphicsResources(vtkWindow *)
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69