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 
36 #ifndef vtkOpenGLProjectedTetrahedraMapper_h
37 #define vtkOpenGLProjectedTetrahedraMapper_h
38 
39 #include "vtkRenderingVolumeOpenGL2Module.h" // For export macro
41 
42 #include "vtkOpenGLHelper.h" // used for ivars
43 
44 class vtkVisibilitySort;
46 class vtkFloatArray;
47 class vtkRenderWindow;
50 
51 class VTKRENDERINGVOLUMEOPENGL2_EXPORT vtkOpenGLProjectedTetrahedraMapper
53 {
54 public:
58  virtual void PrintSelf(ostream &os, vtkIndent indent);
59 
60  virtual void ReleaseGraphicsResources(vtkWindow *window);
61 
62  virtual void Render(vtkRenderer *renderer, vtkVolume *volume);
63 
65 
69  vtkSetMacro(UseFloatingPointFrameBuffer,bool);
70  vtkGetMacro(UseFloatingPointFrameBuffer,bool);
71  vtkBooleanMacro(UseFloatingPointFrameBuffer,bool);
73 
78  virtual bool IsSupported(vtkRenderWindow *context);
79 
80 protected:
83 
84  void Initialize(vtkRenderer *ren);
85  bool Initialized;
86  int CurrentFBOWidth, CurrentFBOHeight;
87  bool AllocateFBOResources(vtkRenderer *ren);
88  bool CanDoFloatingPointFrameBuffer;
89  bool FloatingPointFrameBufferResourcesAllocated;
90  bool UseFloatingPointFrameBuffer;
91  bool HasHardwareSupport;
92 
93  vtkUnsignedCharArray *Colors;
94  int UsingCellColors;
95 
96  vtkFloatArray *TransformedPoints;
97 
98  float MaxCellSize;
99  vtkTimeStamp InputAnalyzedTime;
100  vtkTimeStamp ColorsMappedTime;
101 
102  // The VBO and its layout.
104 
105  // Structures for the various cell types we render.
107 
108  int GaveError;
109 
110  vtkVolumeProperty *LastProperty;
111 
112  float *SqrtTable;
113  float SqrtTableBias;
114 
115  virtual void ProjectTetrahedra(vtkRenderer *renderer, vtkVolume *volume,
116  vtkOpenGLRenderWindow* renWin);
117 
118  float GetCorrectedDepth(float x, float y, float z1, float z2,
119  const float inverse_projection_mat[16],
120  int use_linear_depth_correction,
121  float linear_depth_correction);
122 
123 private:
125  void operator=(const vtkOpenGLProjectedTetrahedraMapper &) VTK_DELETE_FUNCTION;
126 
127  class vtkInternals;
128  vtkInternals *Internals;
129 };
130 
131 #endif
OpenGL rendering window.
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Abstract class that can sort cell data along a viewpoint.
virtual bool IsSupported(vtkRenderWindow *)
Return true if the rendering context provides the nececessary functionality to use this class...
record modification and/or execution time
Definition: vtkTimeStamp.h:35
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
abstract specification for renderers
Definition: vtkRenderer.h:63
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
Unstructured grid volume renderer.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
represents the common properties for rendering a volume.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
static vtkProjectedTetrahedraMapper * New()
create a window for renderers to draw into
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...