Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

graphics/vtk3DS.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtk3DS.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00040 
00041 #include <ctype.h>
00042 
00043 typedef float Vector[3];
00044 
00045 /* A generic list type */
00046 #define VTK_LIST_INSERT(root, node) list_insert ((List **)&root, (List *)node)
00047 #define VTK_LIST_FIND(root, name)   list_find   ((List **)&root, name)
00048 #define VTK_LIST_DELETE(root, node) list_delete ((List **)&root, (List *)node)
00049 #define VTK_LIST_KILL(root)         list_kill   ((List **)&root)
00050 
00051 #define VTK_LIST_FIELDS  \
00052     char name[80];   \
00053     void *next;
00054 
00055 
00056 typedef unsigned char  byte;
00057 typedef unsigned short word;
00058 typedef unsigned int  dword;
00059 
00060 typedef struct {
00061    VTK_LIST_FIELDS
00062 } List;
00063 
00064 
00065 typedef struct {
00066     int a, b, c;
00067 } Face;
00068 
00069 
00070 typedef struct {
00071     float red, green, blue;
00072 } Colour;
00073 
00074 
00075 /* Omni light command */
00076 typedef struct {
00077     VTK_LIST_FIELDS
00078 
00079     Vector pos;            /* Light position */
00080     Colour col;            /* Light colour */
00081     vtkLight *aLight;
00082 } OmniLight;
00083 
00084 
00085 /* Spotlight command */
00086 typedef struct {
00087     VTK_LIST_FIELDS
00088 
00089     Vector pos;            /* Spotlight position */
00090     Vector target;         /* Spotlight target location */
00091     Colour col;            /* Spotlight colour */
00092     float  hotspot;        /* Hotspot angle (degrees) */
00093     float  falloff;        /* Falloff angle (degrees) */
00094     int    shadow_flag;    /* Shadow flag (not used) */
00095     vtkLight *aLight;
00096 } SpotLight;
00097 
00098 
00099 /* Camera command */
00100 typedef struct {
00101     VTK_LIST_FIELDS
00102 
00103     Vector pos;            /* Camera location */
00104     Vector target;         /* Camera target */
00105     float  bank;           /* Banking angle (degrees) */
00106     float  lens;           /* Camera lens size (mm) */
00107     vtkCamera *aCamera;
00108 } Camera;
00109 
00110 
00111 /* Material list */
00112 typedef struct {
00113     VTK_LIST_FIELDS
00114 
00115     int  external;         /* Externally defined material? */
00116 } Material;
00117 
00118 
00119 /* Object summary */
00120 typedef struct {
00121     VTK_LIST_FIELDS
00122 
00123     Vector center;         /* Min value of object extents */
00124     Vector lengths;        /* Max value of object extents */
00125 } Summary;
00126 
00127 
00128 /* Material property */
00129 typedef struct {
00130     VTK_LIST_FIELDS
00131 
00132     Colour ambient;
00133     Colour diffuse;
00134     Colour specular;
00135     float  shininess;
00136     float  transparency;
00137     float  reflection;
00138     int    self_illum;
00139     char   tex_map[40];
00140     float  tex_strength;
00141     char   bump_map[40];
00142     float  bump_strength;
00143     vtkProperty *aProperty;
00144 } MatProp;
00145 
00146 
00147 
00148 class vtkActor;
00149 class vtkPolyDataMapper;
00150 class vtkPolyDataNormals;
00151 class vtkStripper;
00152 class vtkPoints;
00153 class vtkCellArray;
00154 class vtkPolyData;
00155 
00156 /* A mesh object */
00157 typedef struct {
00158     VTK_LIST_FIELDS
00159 
00160     int  vertices;         /* Number of vertices */
00161     Vector *vertex;        /* List of object vertices */
00162 
00163     int  faces;            /* Number of faces */
00164     Face *face;            /* List of object faces */
00165     Material **mtl;        /* Materials for each face */
00166 
00167     int hidden;            /* Hidden flag */
00168     int shadow;            /* Shadow flag */
00169     vtkActor *anActor;
00170     vtkPolyDataMapper *aMapper;
00171     vtkPolyDataNormals *aNormals;
00172     vtkStripper *aStripper;
00173     vtkPoints *aPoints;
00174     vtkCellArray *aCellArray;
00175     vtkPolyData *aPolyData;
00176  
00177 } Mesh;
00178 
00179 
00180 typedef struct {
00181     dword start;
00182     dword end;
00183     dword length;
00184     word  tag;
00185 } Chunk;
00186 
00187 
00188 typedef struct {
00189     byte red;
00190     byte green;
00191     byte blue;
00192 } Colour_24;
00193 
00194 
00195 

Generated on Wed Nov 21 12:26:56 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001