[AE Engine logo] Public API Reference
Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

md2object.h

00001 /*
00002  *  AE Engine
00003  *
00004  *  Copyright (C) 2003 Riku "Rakkis" Nurminen
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 
00022 #ifndef __AELIB_AEGEOM_MD2OBJECT_H__
00023 #define __AELIB_AEGEOM_MD2OBJECT_H__
00024 
00025 #include <aedefs.h>
00026 #include <aeengine/eflags.h>
00027 #include <aegeom/object.h>
00028 #include <aegeom/model.h>
00029 #include <aegeom/vector3.h>
00030 #include <aegfx/material.h>
00031 #include <aegfx/texcoord2.h>
00032 #include <aegfx/texture.h>
00033 #include <aemdlldr/mdlstruct.h>
00034 
00041 class aeMD2Object: public aeModel {
00042         AECF_CNDEF
00043 
00044  private:
00045         int frameSize;
00046         int currentFrame;
00047         int nextFrame;
00048         int startFrame;
00049         int endFrame;
00050         int keyFrame;
00051         float interpol;
00052         float percent;
00053         mesh_t *triIndex;
00054 
00055  public:
00056         aeMD2Object(char *mdlstr, aeVector3_vector *vertList, aeTexCoord2_vector *stList,
00057                                 mesh_t *triIdx, unsigned int numframes, unsigned int numverts, unsigned int numtris,
00058                                 unsigned int numst, unsigned int framesize);
00059 
00060         ~aeMD2Object();
00061 
00067         void draw(aeEngineflags *);
00068 
00076         int animate(aeEngineflags *);
00077 
00083         int renderFrame(aeEngineflags *);
00084 
00092         void setAnimation(int startframe, int endframe, float percent);
00093 
00099         void setFrame(int keyframe);
00100 
00107         modelState_t getState();
00108 
00114         void setState(modelState_t state);      
00115 };
00116 
00117 #endif // __AELIB_AEGEOM_MD2OBJECT_H__

AE Engine Public API Reference
Generated on Wed Apr 9 09:43:39 2003 by Doxygen.