Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/3D/libASE/libASE.h

Go to the documentation of this file.
00001 /*
00002     This file is part of the Virtual Object System of
00003     the Interreality project (http://interreality.org).
00004 
00005     Copyright (C) 2003 Peter Amstutz
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 
00021     Peter Amstutz <tetron@interreality.org>
00022 */
00023 
00024 #ifndef _LIBASE_H_
00025 #define _LIBASE_H_
00026 
00027 #if defined(_WIN32) && defined(_MSC_VER)
00028 # ifdef LIBASE_EXPORTS
00029 #  define LIBASE_API __declspec(dllexport)
00030 # else
00031 #  define LIBASE_API __declspec(dllimport)
00032 # endif
00033 #else
00034 # define LIBASE_API
00035 #endif
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 #include <stdio.h>
00042 
00043 typedef struct
00044 {
00045     float r;
00046     float g;
00047     float b;
00048 } ASE_ColorRGB;
00049 
00050 typedef struct
00051 {
00052     float x;
00053     float y;
00054     float z;
00055 } ASE_Vector3D;
00056 
00057 typedef struct
00058 {
00059     char* name;
00060     int inherit_pos[3];
00061     int inherit_rot[3];
00062     int inherit_scl[3];
00063     float matrix[3][3];
00064     ASE_Vector3D pos;
00065     ASE_Vector3D rotaxis;
00066     float rotangle;
00067     ASE_Vector3D scale;
00068     ASE_Vector3D scaleaxis;
00069     float scaleangle;
00070 } ASE_Transform;
00071 
00072 typedef struct
00073 {
00074     int vertex[3];
00075     int texture_coordinates[3];
00076     int smoothing;
00077     int mtlid;
00078     int ab;
00079     int bc;
00080     int ca;
00081     ASE_Vector3D face_normal;
00082 } ASE_Face;
00083 
00084 typedef struct
00085 {
00086     int timevalue;
00087     int vertexCount;
00088     int textureCoordinateCount;
00089     int faceCount;
00090     ASE_Vector3D* vertices;
00091     ASE_Vector3D* vertex_normals;
00092     ASE_Vector3D* texture_coordinates;
00093     ASE_Face* faces;
00094 } ASE_Mesh;
00095 
00096 typedef struct
00097 {
00098     char *name;
00099     ASE_Transform transform;
00100     ASE_Mesh mesh;
00101     int motionblur;
00102     int castShadow;
00103     int receiveShadow;
00104     int material;
00105 } ASE_GeomObject;
00106 
00107 typedef struct
00108 {
00109     int timevalue;
00110     ASE_ColorRGB color;
00111     float intensity;
00112     float aspect;
00113     float tdist;
00114     float mapBias;
00115     float mapRange;
00116     int mapSize;
00117     float rayBias;
00118 } ASE_LightSettings;
00119 
00120 typedef struct
00121 {
00122     char* name;
00123     char* type;
00124     ASE_Transform transform;
00125     char* shadows;
00126     int uselight;
00127     char* spotshape;
00128     int useglobal;
00129     int absMapBias;
00130     int overshoot;
00131     ASE_LightSettings settings;
00132 } ASE_Light;
00133 
00134 typedef struct
00135 {
00136     char* name;
00137     char* mapclass;
00138     int subno;
00139     float amount;
00140     char* image_path;
00141     char* type;
00142     float u_offset;
00143     float v_offset;
00144     float u_tiling;
00145     float v_tiling;
00146     float angle;
00147     float blur;
00148     float blur_offset;
00149     float noise_amt;
00150     float noise_size;
00151     int noise_level;
00152     float noise_phase;
00153     char* bitmap_filter;
00154 } ASE_MaterialMap;
00155 
00156 typedef struct ASE_Material
00157 {
00158     char* name;
00159     char* matclass;
00160     ASE_ColorRGB ambient;
00161     ASE_ColorRGB diffuse;
00162     ASE_ColorRGB specular;
00163     float shine;
00164     float shinestrength;
00165     float transparency;
00166     float wiresize;
00167     char* shading;
00168     float xp_falloff;
00169     float selfIllum;
00170     char* falloff;
00171     char* xp_type;
00172     ASE_MaterialMap diffuseMaterialMap;
00173     int numsubmaterials;
00174     struct ASE_Material* submaterials;
00175 } ASE_Material;
00176 
00177 typedef struct
00178 {
00179     int timevalue;
00180     float near_val;
00181     float far_val;
00182     float fov;
00183     float tdist;
00184 } ASE_CameraSettings;
00185 
00186 typedef struct
00187 {
00188     char* name;
00189     char* type;
00190     ASE_Transform camera;
00191     ASE_Transform target;
00192     ASE_CameraSettings settings;
00193 } ASE_Camera;
00194 
00195 typedef struct
00196 {
00197     int firstFrame;
00198     int lastFrame;
00199     int frameSpeed;
00200     int ticksPerFrame;
00201     ASE_ColorRGB background_light;
00202     ASE_ColorRGB ambient_light;
00203 
00204     int objectCount;
00205     int lightCount;
00206     int materialCount;
00207     int cameraCount;
00208 
00209     ASE_GeomObject* objs;
00210     ASE_Light* lights;
00211     ASE_Material* materials;
00212     ASE_Camera* cameras;
00213 } ASE_Scene;
00214 
00215 LIBASE_API ASE_Scene* ASE_loadFilename(char* filename);
00216 
00217 LIBASE_API ASE_Scene* ASE_loadFile(FILE* file);
00218 
00219 LIBASE_API ASE_Scene* ASE_loadBuffer(char* buffer, int size);
00220 
00221 #ifdef __cplusplus
00222 };
00223 #endif
00224 
00225 #endif

Generated on Tue Aug 12 03:55:37 2003 for Interreality Project - VOS by doxygen 1.3.2