VTK
vtkX3DExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkX3DExporter.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 =========================================================================*/
29 #ifndef vtkX3DExporter_h
30 #define vtkX3DExporter_h
31 
32 #include "vtkIOExportModule.h" // For export macro
33 #include "vtkExporter.h"
34 
35 class vtkLight;
36 class vtkActor;
37 class vtkActor2D;
38 class vtkPoints;
39 class vtkDataArray;
42 class vtkRenderer;
43 
45 {
46 public:
47  static vtkX3DExporter *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  vtkSetStringMacro(FileName);
54  vtkGetStringMacro(FileName);
56 
58 
59  vtkSetMacro(Speed,double);
60  vtkGetMacro(Speed,double);
62 
64 
65  vtkSetClampMacro(Binary, int, 0, 1);
66  vtkBooleanMacro(Binary, int);
67  vtkGetMacro(Binary, int);
69 
71 
72  vtkSetClampMacro(Fastest, int, 0, 1);
73  vtkBooleanMacro(Fastest, int);
74  vtkGetMacro(Fastest, int);
76 
78 
79  vtkSetMacro(WriteToOutputString,int);
80  vtkGetMacro(WriteToOutputString,int);
81  vtkBooleanMacro(WriteToOutputString,int);
83 
85 
88  vtkGetMacro(OutputStringLength, int);
89  vtkGetStringMacro(OutputString);
90  unsigned char *GetBinaryOutputString()
91  {
92  return reinterpret_cast<unsigned char *>(this->OutputString);
93  }
95 
100 
101 protected:
104 
105  // Stream management
109 
111  void WriteData();
112 
113  void WriteALight(vtkLight *aLight, vtkX3DExporterWriter* writer);
115  int index);
117  vtkDataArray *tcoords, vtkUnsignedCharArray *colors,
118  vtkX3DExporterWriter* writer, int index);
119  void WriteATextActor2D(vtkActor2D *anTextActor2D,
120  vtkX3DExporterWriter* writer);
121  void WriteATexture(vtkActor *anActor, vtkX3DExporterWriter* writer);
122  void WriteAnAppearance(vtkActor *anActor, bool writeEmissiveColor, vtkX3DExporterWriter* writer);
124  char *FileName;
125  double Speed;
126  int Binary;
127  int Fastest;
128 
129 private:
130 
131  vtkX3DExporter(const vtkX3DExporter&); // Not implemented.
132  void operator=(const vtkX3DExporter&); // Not implemented.
133 };
134 
135 
136 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
vtkX3DExporter::~vtkX3DExporter
~vtkX3DExporter()
vtkLight
a virtual light for 3D rendering
Definition: vtkLight.h:61
vtkX3DExporter::WriteATextActor2D
void WriteATextActor2D(vtkActor2D *anTextActor2D, vtkX3DExporterWriter *writer)
vtkX3DExporter::Fastest
int Fastest
Definition: vtkX3DExporter.h:127
vtkX3DExporter::OutputStringLength
int OutputStringLength
Definition: vtkX3DExporter.h:108
vtkIOExportModule.h
vtkX3DExporter::GetBinaryOutputString
unsigned char * GetBinaryOutputString()
Definition: vtkX3DExporter.h:90
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkX3DExporter::Speed
double Speed
Definition: vtkX3DExporter.h:125
vtkX3DExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkgl::points
GLsizei const GLfloat * points
Definition: vtkgl.h:14786
vtkX3DExporter::vtkX3DExporter
vtkX3DExporter()
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkX3DExporter::OutputString
char * OutputString
Definition: vtkX3DExporter.h:107
vtkX3DExporter::WriteData
void WriteData()
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
vtkX3DExporterWriter
X3D Exporter Writer.
Definition: vtkX3DExporterWriter.h:35
vtkSetStringMacro
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:104
vtkX3DExporter::WriteAnActor
void WriteAnActor(vtkActor *anActor, vtkX3DExporterWriter *writer, int index)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3DExporter::RegisterAndGetOutputString
char * RegisterAndGetOutputString()
vtkX3DExporter::WriteATexture
void WriteATexture(vtkActor *anActor, vtkX3DExporterWriter *writer)
vtkgl::index
GLuint index
Definition: vtkgl.h:11983
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkExporter
abstract class to write a scene to a file
Definition: vtkExporter.h:46
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:64
vtkX3DExporter::WritePointData
void WritePointData(vtkPoints *points, vtkDataArray *normals, vtkDataArray *tcoords, vtkUnsignedCharArray *colors, vtkX3DExporterWriter *writer, int index)
vtkExporter.h
vtkX3DExporter
create an x3d file
Definition: vtkX3DExporter.h:45
vtkX3DExporter::HasHeadLight
int HasHeadLight(vtkRenderer *ren)
vtkX3DExporter::Binary
int Binary
Definition: vtkX3DExporter.h:126
vtkX3DExporter::WriteALight
void WriteALight(vtkLight *aLight, vtkX3DExporterWriter *writer)
vtkX3DExporter::New
static vtkX3DExporter * New()
vtkX3DExporter::WriteAnAppearance
void WriteAnAppearance(vtkActor *anActor, bool writeEmissiveColor, vtkX3DExporterWriter *writer)
vtkX3DExporter::WriteToOutputString
int WriteToOutputString
Definition: vtkX3DExporter.h:106
vtkX3DExporter::FileName
char * FileName
Definition: vtkX3DExporter.h:124
VTKIOEXPORT_EXPORT
#define VTKIOEXPORT_EXPORT
Definition: vtkIOExportModule.h:15