Page principale | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe

C:/Projects/ngn/include/face.h

00001 /***************************************************************************
00002  *            face.h
00003  *
00004  *  Tue Sep  7 14:32:34 2004
00005  *  Copyright  2004  thierry schartz
00006  *  thierry.schartz@bluebottle.com
00007  ****************************************************************************/
00008 
00009 /*
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00023  */
00024  
00025 #ifndef _FACE_H
00026 #define _FACE_H
00027 
00028 #ifdef WIN32
00029 #include <windows.h>
00030 #endif
00031 
00032 #include "object.h"
00033 #include "vector3d.h"
00034 
00035 namespace ngn {
00036 
00037 
00042         class NGN_API Face : public Object3d
00043         {
00044         public:
00045                 Face();
00046                 Face( const Face& other );
00047                 virtual ~Face();
00048                 
00049                 // return pointer to vertexarray
00050                 float* getVertexArray() const;
00051                 // return size of array
00052                 int getVertexArraySize() ;
00054                 void setCoords( const core::Vector3df& v0, const core::Vector3df& v1, const core::Vector3df& v2 );
00056                 virtual void render( const Camera& cam );
00057 
00058         protected:
00060                 virtual void computeCentre();
00061 
00062         private:
00063 
00064                 // create vertex array from Vector3d's
00065                 void createVertexArray();
00066 
00067 
00068                 // 3 vertices
00069                 core::Vector3df m_v0, m_v1, m_v2;
00070                 // vertex array
00071                 float *m_pVerts;
00072                 static int m_nVerts;
00073         
00074         };
00075 
00076 
00077 
00078 
00079 }//ngn
00080 #endif

Généré le Fri Nov 19 14:20:29 2004 pour NGN par  doxygen 1.3.9.1