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 "vtkExporter.h"
33 
34 class vtkLight;
35 class vtkActor;
36 class vtkActor2D;
37 class vtkPoints;
38 class vtkDataArray;
41 class vtkRenderer;
42 
44 {
45 public:
46  static vtkX3DExporter *New();
47  vtkTypeMacro(vtkX3DExporter,vtkExporter);
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51 
52  vtkSetStringMacro(FileName);
53  vtkGetStringMacro(FileName);
55 
57 
58  vtkSetMacro(Speed,double);
59  vtkGetMacro(Speed,double);
61 
63 
64  vtkSetClampMacro(Binary, int, 0, 1);
65  vtkBooleanMacro(Binary, int);
66  vtkGetMacro(Binary, int);
68 
70 
71  vtkSetClampMacro(Fastest, int, 0, 1);
72  vtkBooleanMacro(Fastest, int);
73  vtkGetMacro(Fastest, int);
75 
76 protected:
78  ~vtkX3DExporter();
79 
81  void WriteData();
82 
83  void WriteALight(vtkLight *aLight, vtkX3DExporterWriter* writer);
84  void WriteAnActor(vtkActor *anActor, vtkX3DExporterWriter* writer,
85  int index);
86  void WritePointData(vtkPoints *points, vtkDataArray *normals,
87  vtkDataArray *tcoords, vtkUnsignedCharArray *colors,
88  vtkX3DExporterWriter* writer, int index);
89  void WriteATextActor2D(vtkActor2D *anTextActor2D,
90  vtkX3DExporterWriter* writer);
91  void WriteATexture(vtkActor *anActor, vtkX3DExporterWriter* writer);
92  void WriteAnAppearance(vtkActor *anActor, bool writeEmissiveColor, vtkX3DExporterWriter* writer);
93  int HasHeadLight(vtkRenderer* ren);
94  char *FileName;
95  double Speed;
96  int Binary;
97  int Fastest;
98 
99 private:
100 
101  vtkX3DExporter(const vtkX3DExporter&); // Not implemented.
102  void operator=(const vtkX3DExporter&); // Not implemented.
103 };
104 
105 
106 #endif
abstract class to write a scene to a file
Definition: vtkExporter.h:44
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
X3D Exporter Writer.
virtual void WriteData()=0
a actor that draws 2D data
Definition: vtkActor2D.h:43
abstract specification for renderers
Definition: vtkRenderer.h:69
create an x3d file
a simple class to control print indentation
Definition: vtkIndent.h:37
a virtual light for 3D rendering
Definition: vtkLight.h:59
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
#define VTK_HYBRID_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38