VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtk3DS.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtk3DS.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 #include <ctype.h>
17 
18 class vtkLight;
19 class vtkCamera;
21 
22 typedef float vtk3DSVector[3];
23 
24 /* A generic list type */
25 #define VTK_LIST_INSERT(root, node) list_insert ((vtk3DSList **)&root, reinterpret_cast<vtk3DSList *>(node))
26 #define VTK_LIST_FIND(root, name) list_find ((vtk3DSList **)&root, name)
27 #define VTK_LIST_DELETE(root, node) list_delete ((vtk3DSList **)&root, (vtk3DSList *)node)
28 #define VTK_LIST_KILL(root) list_kill ((vtk3DSList **)&root)
29 
30 #define VTK_LIST_FIELDS \
31  char name[80]; \
32  void *next;
33 
34 
35 typedef unsigned char byte;
36 typedef unsigned short word;
37 typedef unsigned int dword;
38 
39 typedef struct {
41 } vtk3DSList;
42 
43 
44 typedef struct {
45  int a, b, c;
46 } vtk3DSFace;
47 
48 
49 typedef struct {
50  float red, green, blue;
51 } vtk3DSColour;
52 
53 
54 /* Omni light command */
55 typedef struct {
57 
58  vtk3DSVector pos; /* Light position */
59  vtk3DSColour col; /* Light colour */
62 
63 
64 /* Spotlight command */
65 typedef struct {
67 
68  vtk3DSVector pos; /* Spotlight position */
69  vtk3DSVector target; /* Spotlight target location */
70  vtk3DSColour col; /* Spotlight colour */
71  float hotspot; /* Hotspot angle (degrees) */
72  float falloff; /* Falloff angle (degrees) */
73  int shadow_flag; /* Shadow flag (not used) */
76 
77 
78 /* Camera command */
79 typedef struct {
81 
82  vtk3DSVector pos; /* Camera location */
83  vtk3DSVector target; /* Camera target */
84  float bank; /* Banking angle (degrees) */
85  float lens; /* Camera lens size (mm) */
87 } vtk3DSCamera;
88 
89 
90 /* Material list */
91 typedef struct {
93 
94  int external; /* Externally defined material? */
96 
97 
98 /* Object summary */
99 typedef struct {
101 
102  vtk3DSVector center; /* Min value of object extents */
103  vtk3DSVector lengths; /* Max value of object extents */
104 } vtk3DSSummary;
105 
106 
107 /* Material property */
108 typedef struct {
110 
114  float shininess;
116  float reflection;
118  char tex_map[40];
120  char bump_map[40];
123 } vtk3DSMatProp;
124 
125 
126 
127 class vtkActor;
128 class vtkPolyDataMapper;
129 class vtkPolyDataNormals;
130 class vtkStripper;
131 class vtkPoints;
132 class vtkCellArray;
133 class vtkPolyData;
134 
135 /* A mesh object */
136 typedef struct {
138 
139  int vertices; /* Number of vertices */
140  vtk3DSVector *vertex; /* List of object vertices */
141 
142  int faces; /* Number of faces */
143  vtk3DSFace *face; /* List of object faces */
144  vtk3DSMaterial **mtl; /* Materials for each face */
145 
146  int hidden; /* Hidden flag */
147  int shadow; /* Shadow flag */
155 
156 } vtk3DSMesh;
157 
158 
159 typedef struct {
164 } vtk3DSChunk;
165 
166 
167 typedef struct {
172 
173 
174 
175 // VTK-HeaderTest-Exclude: vtk3DS.h
float transparency
Definition: vtk3DS.h:115
vtk3DSVector target
Definition: vtk3DS.h:69
float tex_strength
Definition: vtk3DS.h:119
dword length
Definition: vtk3DS.h:162
vtkPolyData * aPolyData
Definition: vtk3DS.h:154
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
#define VTK_LIST_FIELDS
Definition: vtk3DS.h:30
vtk3DSVector * vertex
Definition: vtk3DS.h:140
GLclampf green
Definition: vtkgl.h:11313
vtkActor * anActor
Definition: vtk3DS.h:148
int shadow_flag
Definition: vtk3DS.h:73
represent surface properties of a geometric object
Definition: vtkProperty.h:63
GLclampf GLclampf blue
Definition: vtkgl.h:11313
int self_illum
Definition: vtk3DS.h:117
vtkStripper * aStripper
Definition: vtk3DS.h:151
float falloff
Definition: vtk3DS.h:72
int shadow
Definition: vtk3DS.h:147
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
int faces
Definition: vtk3DS.h:142
vtkProperty * aProperty
Definition: vtk3DS.h:122
vtk3DSVector lengths
Definition: vtk3DS.h:103
float shininess
Definition: vtk3DS.h:114
VTK_LIST_FIELDS vtk3DSVector pos
Definition: vtk3DS.h:82
create triangle strips and/or poly-lines
Definition: vtkStripper.h:65
vtkCamera * aCamera
Definition: vtk3DS.h:86
VTK_LIST_FIELDS vtk3DSVector center
Definition: vtk3DS.h:102
unsigned short word
Definition: vtk3DS.h:36
vtkLight * aLight
Definition: vtk3DS.h:74
a virtual camera for 3D rendering
Definition: vtkCamera.h:48
vtk3DSMaterial ** mtl
Definition: vtk3DS.h:144
a virtual light for 3D rendering
Definition: vtkLight.h:60
unsigned char byte
Definition: vtk3DS.h:35
float red
Definition: vtk3DS.h:50
compute normals for polygonal mesh
dword end
Definition: vtk3DS.h:161
unsigned int dword
Definition: vtk3DS.h:37
vtkPolyDataNormals * aNormals
Definition: vtk3DS.h:150
vtkCellArray * aCellArray
Definition: vtk3DS.h:153
float hotspot
Definition: vtk3DS.h:71
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
map vtkPolyData to graphics primitives
object to represent cell connectivity
Definition: vtkCellArray.h:49
int c
Definition: vtk3DS.h:45
vtkLight * aLight
Definition: vtk3DS.h:60
float vtk3DSVector[3]
Definition: vtk3DS.h:20
dword start
Definition: vtk3DS.h:160
vtkPolyDataMapper * aMapper
Definition: vtk3DS.h:149
vtk3DSColour col
Definition: vtk3DS.h:70
vtkPoints * aPoints
Definition: vtk3DS.h:152
VTK_LIST_FIELDS int external
Definition: vtk3DS.h:94
vtk3DSColour specular
Definition: vtk3DS.h:113
vtk3DSFace * face
Definition: vtk3DS.h:143
vtk3DSVector target
Definition: vtk3DS.h:83
float bank
Definition: vtk3DS.h:84
vtk3DSColour diffuse
Definition: vtk3DS.h:112
vtk3DSColour col
Definition: vtk3DS.h:59
word tag
Definition: vtk3DS.h:163
VTK_LIST_FIELDS vtk3DSVector pos
Definition: vtk3DS.h:58
int hidden
Definition: vtk3DS.h:146
VTK_LIST_FIELDS vtk3DSColour ambient
Definition: vtk3DS.h:111
float lens
Definition: vtk3DS.h:85
represent and manipulate 3D points
Definition: vtkPoints.h:39
float reflection
Definition: vtk3DS.h:116
float bump_strength
Definition: vtk3DS.h:121
VTK_LIST_FIELDS int vertices
Definition: vtk3DS.h:139
VTK_LIST_FIELDS vtk3DSVector pos
Definition: vtk3DS.h:68