VTK
vtkRIBExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRIBExporter.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 =========================================================================*/
51 #ifndef vtkRIBExporter_h
52 #define vtkRIBExporter_h
53 
54 #include "vtkIOExportModule.h" // For export macro
55 #include "vtkExporter.h"
56 
57 class vtkActor;
58 class vtkCamera;
59 class vtkLight;
60 class vtkPolyData;
61 class vtkProperty;
62 class vtkRenderer;
63 class vtkTexture;
65 
67 {
68 public:
69  static vtkRIBExporter *New();
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
74 
76  vtkSetVector2Macro(Size,int);
77  vtkGetVectorMacro(Size,int,2);
79 
81 
82  vtkSetVector2Macro(PixelSamples,int);
83  vtkGetVectorMacro(PixelSamples,int,2);
85 
87 
89  vtkSetStringMacro(FilePrefix);
90  vtkGetStringMacro(FilePrefix);
92 
94 
95  vtkSetStringMacro(TexturePrefix);
96  vtkGetStringMacro(TexturePrefix);
98 
100 
118 
120 
123  vtkSetClampMacro(ExportArrays, int, 0, 1);
124  vtkBooleanMacro(ExportArrays, int);
125  vtkGetMacro(ExportArrays, int);
127 
128 protected:
131 
133  int Size[2];
134  int PixelSamples[2];
135 
138 
140 
141  void WriteHeader (vtkRenderer *aRen);
142  void WriteTrailer ();
143  void WriteTexture (vtkTexture *aTexture);
144  void WriteViewport (vtkRenderer *aRenderer, int size[2]);
145  void WriteCamera (vtkCamera *aCamera);
146  void WriteLight (vtkLight *aLight, int count);
148  void WriteProperty (vtkProperty *aProperty, vtkTexture *aTexture);
150  vtkProperty *aProperty);
152  vtkProperty *aProperty);
154 
155  void WriteData();
156  void WriteActor(vtkActor *anActor);
157 
162  void ModifyArrayName(char *newname, const char* name);
163 
164  char *GetTextureName (vtkTexture *aTexture);
165  char *GetTIFFName (vtkTexture *aTexture);
166  char *FilePrefix;
167  FILE *FilePtr;
169 private:
170  vtkRIBExporter(const vtkRIBExporter&); // Not implemented.
171  void operator=(const vtkRIBExporter&); // Not implemented.
172 };
173 
174 #endif
175 
vtkSetVector2Macro
#define vtkSetVector2Macro(name, type)
Definition: vtkSetGet.h:254
vtkLight
a virtual light for 3D rendering
Definition: vtkLight.h:61
vtkRIBExporter::WriteCamera
void WriteCamera(vtkCamera *aCamera)
vtkgl::count
GLuint GLuint GLsizei count
Definition: vtkgl.h:11315
vtkRIBExporter::FilePrefix
char * FilePrefix
Definition: vtkRIBExporter.h:166
vtkIOExportModule.h
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkRIBExporter::WriteViewport
void WriteViewport(vtkRenderer *aRenderer, int size[2])
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkRIBExporter
export a scene into RenderMan RIB format.
Definition: vtkRIBExporter.h:67
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkgl::name
GLuint const GLchar * name
Definition: vtkgl.h:11983
vtkTexture
handles properties associated with a texture map
Definition: vtkTexture.h:70
vtkRIBExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkX3D::Background
@ Background
Definition: vtkX3D.h:71
vtkRIBExporter::TexturePrefix
char * TexturePrefix
Definition: vtkRIBExporter.h:168
vtkRIBExporter::GetTextureName
char * GetTextureName(vtkTexture *aTexture)
vtkRIBExporter::Background
int Background
Definition: vtkRIBExporter.h:132
vtkRIBExporter::vtkRIBExporter
vtkRIBExporter()
vtkRIBExporter::FilePtr
FILE * FilePtr
Definition: vtkRIBExporter.h:167
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkCamera
a virtual camera for 3D rendering
Definition: vtkCamera.h:49
vtkRIBExporter::WritePolygons
void WritePolygons(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
vtkRIBExporter::GetTIFFName
char * GetTIFFName(vtkTexture *aTexture)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkRIBExporter::WriteActor
void WriteActor(vtkActor *anActor)
vtkRIBExporter::ExportArrays
int ExportArrays
Definition: vtkRIBExporter.h:137
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkRIBExporter::~vtkRIBExporter
~vtkRIBExporter()
vtkExporter
abstract class to write a scene to a file
Definition: vtkExporter.h:46
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
vtkExporter.h
vtkRIBExporter::WriteLight
void WriteLight(vtkLight *aLight, int count)
vtkRIBExporter::WriteProperty
void WriteProperty(vtkProperty *aProperty, vtkTexture *aTexture)
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:64
vtkRIBExporter::WriteTrailer
void WriteTrailer()
vtkRIBExporter::New
static vtkRIBExporter * New()
vtkRIBExporter::WriteAmbientLight
void WriteAmbientLight(int count)
vtkRIBExporter::WriteHeader
void WriteHeader(vtkRenderer *aRen)
vtkRIBExporter::WriteTexture
void WriteTexture(vtkTexture *aTexture)
vtkRIBExporter::WriteStrips
void WriteStrips(vtkPolyData *pd, vtkUnsignedCharArray *colors, vtkProperty *aProperty)
vtkRIBExporter::ModifyArrayName
void ModifyArrayName(char *newname, const char *name)
vtkRIBExporter::WriteData
void WriteData()
vtkgl::size
GLsizeiptr size
Definition: vtkgl.h:11843
VTKIOEXPORT_EXPORT
#define VTKIOEXPORT_EXPORT
Definition: vtkIOExportModule.h:15