/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific: main-programmer: Patrick Boenzli co-programmer: */ /*! \file abstract_model.h \brief Definition of an abstract model. containing all needed for other model */ #ifndef _ABSTRACT_MODEL_H #define _ABSTRACT_MODEL_H #include "stdincl.h" #include "base_object.h" //template class tList; template class vector; //! This is our 3D point class. CONFLICTING with Vector.cc class CVector3 { public: float x, y, z; }; //! This is our 2D point class. CONFLICTING with Vector.cc class CVector2 { public: float x, y; }; // CONFLICTING with model.h struct tFace { int vertIndex[3]; // indicies for the verts that make up this triangle int coordIndex[3]; // indicies for the tex coords to texture this face }; // CONFLICTING with material.cc, there are some small differences, i will use this struct and switch over later struct tMaterialInfo { char strName[255]; // The texture name char strFile[255]; // The texture file name (If this is set it's a texture map) byte color[3]; // The color of the object (R, G, B) int texureId; // the texture ID float uTile; // u tiling of texture float vTile; // v tiling of texture float uOffset; // u offset of texture float vOffset; // v offset of texture } ; //! properties of a 3D object struct t3DObject { int numOfVerts; // The number of verts in the model int numOfFaces; // The number of faces in the model int numTexVertex; // The number of texture coordinates int materialID; // The texture ID to use, which is the index into our texture array bool bHasTexture; // This is TRUE if there is a texture map for this object char strName[255]; // The name of the object CVector3 *pVerts; // The object's vertices CVector3 *pNormals; // The object's normals CVector2 *pTexVerts; // The texture's UV coordinates tFace *pFaces; // The faces information of the object }; // CONFLICTING with animation.cc struct tAnimationInfo { char strName[255]; // This stores the name of the animation (Jump, Pain, etc..) int startFrame; // This stores the first frame number for this animation int endFrame; // This stores the last frame number for this animation }; // CONFLICTING with animation.cc and vector.cc struct t3DModel { int numOfObjects; // The number of objects in the model int numOfMaterials; // The number of materials for the model int numOfAnimations; // The number of animations in this model (NEW) int currentAnim; // The current index into pAnimations list (NEW) int currentFrame; // The current frame of the current animation (NEW) vector* animationList; // The list of animations (NEW) vector* materialList; // The list of material information (Textures and colors) vector* objectList; // The object list for our model }; //! This class defines the basic components of a model class AbstractModel : public BaseObject { public: AbstractModel() {} virtual ~AbstractModel() {} }; #endif /* _ABSTRACT_MODEL_H */