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

object.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_OBJECT_H__
00023 #define __AELIB_AEGEOM_OBJECT_H__
00024 
00025 #define ONLY_INCLUDE_STD
00026 #include <aedefs.h>
00027 #undef ONLY_INCLUDE_STD
00028 #include <aeengine/eflags.h>
00029 #include <aegeom/vector3.h>
00030 #include <aegfx/color3.h>
00031 #include <aegfx/color4.h>
00032 #include <aegfx/material.h>
00033 #include <aegfx/texcoord2.h>
00034 #include <aereg/base.h>
00035 
00044 enum aeObjRenderingMode {
00046 
00052         TRIANGLES_NORMAL,
00054 
00061         TRIANGLES_STRIP,
00063 
00070         TRIANGLES_FAN,
00071 
00073 
00079         QUADS_NORMAL,
00081 
00090         QUADS_STRIP,
00091 
00093 
00098         LINES_NORMAL,
00100 
00105         LINES_STRIP,
00107 
00113         LINES_LOOP,
00114 
00116 
00119         POLYGON_NORMAL
00120 };
00121 
00127 class aeObject: public aeBase {
00128  protected:
00129         aeVector3_vector *vertexList;
00130         aeColor4_vector *vertexColorList;
00131         aeTexCoord2_vector *vertexTexcoordList;
00132         aeVector3 origin;
00133         aeColor4 currentVertexColor;
00134         aeTexCoord2 currentVertexTexcoord;
00135         bool hasMaterial;
00136         aeMaterial *material;
00137         char *objName;
00138         bool isObjTransparent;
00139         float objRadius;
00140         aeObjRenderingMode objRenderMode;
00141 
00142  public:
00143         virtual ~aeObject();
00144 
00151         virtual char *getName();
00152 
00159         virtual aeMaterial *getMaterial();
00160 
00166         virtual void draw(aeEngineflags *) = 0;
00167 
00174         virtual aeVector3 getOrigin();
00175 
00181         virtual void setOrigin(const aeVector3 &norigin);
00182 
00191         virtual void setColor(float r, float g, float b);
00192 
00202         virtual void setColor(float r, float g, float b, float a);
00203 
00211         virtual void setColor(const aeColor3 &color);
00212 
00220         virtual void setColor(const aeColor4 &color);
00221 
00230         virtual void setTexCoord(const aeTexCoord2 &texcoord);
00231 
00241         virtual void setTexCoord(float s, float t);
00242 
00248         virtual void setMaterial(aeMaterial *mat);
00249 
00256         virtual void addVertex(const aeVector3 &vertex);
00257 
00263         virtual void setTransparent(bool);
00264 
00271         virtual unsigned int getVertexCount();
00272 
00280         virtual aeVector3 getVertex(int);
00281 
00288         virtual float getBoundingSphereRadius();
00289 
00296         virtual bool isTransparent();
00297 
00319         virtual void setMode(aeObjRenderingMode mode);
00320 };
00321 
00322 #endif // __AELIB_AEGEOM_OBJECT_H__

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