Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/md2_loader/src/lib/graphics/importer/abstract_model.h @ 4078

Last change on this file since 4078 was 4078, checked in by patrick, 19 years ago

orxonox/branches/md2_loader: fixed some compile errors, altered some variable names, automake now works and did update Makefile.in :)

File size: 3.3 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Patrick Boenzli
13   co-programmer:
14*/
15
16/*!
17    \file abstract_model.h
18    \brief Definition of an abstract model. containing all needed for other model
19*/
20
21#ifndef _ABSTRACT_MODEL_H
22#define _ABSTRACT_MODEL_H
23
24#include "stdincl.h"
25#include "base_object.h"
26
27
28
29//! This is our 3D point class.  CONFLICTING with Vector.cc
30class CVector3
31{
32public:
33        float x, y, z;
34};
35
36//! This is our 2D point class.  CONFLICTING with Vector.cc
37class CVector2
38{
39public:
40        float x, y;
41};
42
43// CONFLICTING with model.h
44struct tFace
45{
46        int vertIndex[3];                       // indicies for the verts that make up this triangle
47        int coordIndex[3];                      // indicies for the tex coords to texture this face
48};
49
50// CONFLICTING with material.cc, there are some small differences, i will use this struct and switch over later
51struct tMaterialInfo
52{
53        char  strName[255];                     // The texture name
54        char  strFile[255];                     // The texture file name (If this is set it's a texture map)
55        byte  color[3]; // The color of the object (R, G, B)
56        int   texureId;                         // the texture ID
57        float uTile;                            // u tiling of texture 
58        float vTile;                            // v tiling of texture 
59        float uOffset;                      // u offset of texture
60        float vOffset;                          // v offset of texture
61} ;
62
63//! properties of a 3D object
64struct t3DObject
65{
66        int  numOfVerts;                        // The number of verts in the model
67        int  numOfFaces;                        // The number of faces in the model
68        int  numTexVertex;                      // The number of texture coordinates
69        int  materialID;                        // The texture ID to use, which is the index into our texture array
70        bool bHasTexture;                       // This is TRUE if there is a texture map for this object
71        char strName[255];                      // The name of the object
72        CVector3  *pVerts;                      // The object's vertices
73        CVector3  *pNormals;            // The object's normals
74        CVector2  *pTexVerts;           // The texture's UV coordinates
75        tFace *pFaces;                          // The faces information of the object
76};
77
78// CONFLICTING with animation.cc
79struct tAnimationInfo
80{
81        char strName[255];                      // This stores the name of the animation (Jump, Pain, etc..)
82        int startFrame;                         // This stores the first frame number for this animation
83        int endFrame;                           // This stores the last frame number for this animation
84};
85
86// CONFLICTING with animation.cc and vector.cc
87struct t3DModel
88{
89        int numOfObjects;                                       // The number of objects in the model
90        int numOfMaterials;                                     // The number of materials for the model
91        int numOfAnimations;                            // The number of animations in this model (NEW)
92        int currentAnim;                                        // The current index into pAnimations list (NEW)
93        int currentFrame;                                       // The current frame of the current animation (NEW)
94        //vector<tAnimationInfo> pAnimations; // The list of animations (NEW)
95        //vector<tMaterialInfo> pMaterials;     // The list of material information (Textures and colors)
96        //vector<t3DObject> pObject;                    // The object list for our model
97};
98
99
100
101//! This class defines the basic components of a model
102class AbstractModel : public BaseObject {
103
104 public:
105  AbstractModel();
106  virtual ~AbstractModel();
107
108
109 private:
110
111};
112
113#endif /* _ABSTRACT_MODEL_H */
Note: See TracBrowser for help on using the repository browser.