Main Page | Class Hierarchy | Compound List | File List | Compound Members

DGeometry.h

00001 /*
00002   Debris - A 3D-Space-Shooter Game based on OpenGL
00003   Copyright (C) 2002  Daniel Wagner <daniel@kwaxi.org> and
00004   Sebastian Zambal <e9826978@student.tuwien.ac.at>
00005 
00006   file: DGeometry.h
00007 */
00008 
00009 #pragma once
00010 
00011 #include "DObject.h"
00012 #include "debris.h"
00013 
00015 
00018 class DMatrix : DObject {
00019 public:
00021         float *m;
00023         DMatrix(void);
00025         void Identity(void);
00027         void PostTranslate(float x, float y, float z);
00029         void PostRotate(float alpha, float x, float y, float z);
00031         void PostRotateX(float alpha);
00033         void PostRotateY(float alpha);
00035         void PostRotateZ(float alpha);
00037         void Transform(float *vec);
00039         void Transform(float &x, float &y, float &z);
00040 };
00041 
00043 
00046 struct DVertex {
00048         float coord[3];
00050         float texCoord[2];
00052         float normal[3];
00053 };
00054 
00056 
00059 struct DTriangle {
00061         int a, b, c;
00062 };
00063 
00065 
00068 struct DMesh {
00070         int triangleCount;
00072         DTriangle *triangle;
00074         int vertexCount;
00076         DVertex *vertex;
00078         GLuint textureID;
00080         GLuint dls;
00082         float *center;
00083         float radius;
00084 };
00085 
00087 
00090 struct DGeomData {
00092         int meshCount;
00094         DMesh *meshes;
00096         char *name;
00098         GLuint dls, dlw;
00099 };
00100 
00102 
00105 class DGeometry:DObject {
00106 public:
00108         DGeomData *geometry;
00110         int counter;
00112         DTextures *textures;
00113 
00115         DGeometry(void);
00117         ~DGeometry(void);
00119         int LoadGeometry(char *fileName);
00121         int LoadGeometryWithTexture(char *fileName);
00122 };

Generated on Thu Jun 19 21:55:39 2003 for Debris by doxygen 1.3.2