K3dVertex.h

Go to the documentation of this file.
00001 
00012 /***************************************************************************
00013  *   Copyright (C) 2007 by Jan Koci   *
00014  *   honza.koci@email.cz   *
00015  *   http://kengine.sourceforge.net/tutorial/
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  *   This program is distributed in the hope that it will be useful,       *
00023  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00024  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00025  *   GNU General Public License for more details.                          *
00026  *                                                                         *
00027  *   You should have received a copy of the GNU General Public License     *
00028  *   along with this program; if not, write to the                         *
00029  *   Free Software Foundation, Inc.,                                       *
00030  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00031  ***************************************************************************/
00032 
00033 #pragma once
00034 
00035 #include "../MathCore/K3dVector3Obj.h"
00036 #include "../MathCore/K3dVector2.h"
00037 #include "../GLRenderer/K3dColor4.h"
00038 
00039 class K3dVertex
00040 {
00042                 K3dVector3Obj *m_pPosition;
00044                 K3dVector2 *m_pTexCoord;
00046                 K3dVector3Obj *m_pNormal;
00048                 K3dColor4 *m_pColor;
00050                 int m_iSize;
00051 
00052         public:
00053                 K3dVertex();
00054                 ~K3dVertex();
00055 
00057                 void Reset()
00058                 {
00059                         m_pPosition->Reset();
00060                 }
00061 
00063                 K3dVector3Obj* GetPosition()
00064                 {
00065                         return m_pPosition;
00066                 }
00067 
00068                 const K3dVector3Obj *GetPosition() const
00069                 {
00070                         return m_pPosition;
00071                 }
00072 
00074                 void SetPosition ( K3dVector3Obj* _pPosition )
00075                 {
00076                         m_pPosition = _pPosition;
00077                 }
00078 
00080                 K3dVector2 *GetTexCoord()
00081                 {
00082                         return m_pTexCoord;
00083                 }
00084 
00085                 const K3dVector2 *GetTexCoord() const
00086                 {
00087                         return m_pTexCoord;
00088                 }
00089 
00091                 void SetTexCoord ( K3dVector2* _pTexCoord )
00092                 {
00093                         m_pTexCoord = _pTexCoord;
00094                 }
00095 
00097                 K3dVector3Obj *GetNormal()
00098                 {
00099                         return m_pNormal;
00100                 }
00101 
00102                 const K3dVector3Obj *GetNormal() const
00103                 {
00104                         return m_pNormal;
00105                 }
00106 
00108                 void SetNormal ( K3dVector3Obj* _pNormal )
00109                 {
00110                         m_pNormal = _pNormal;
00111                 }
00112 
00114                 K3dColor4 *GetColor()
00115                 {
00116                         return m_pColor;
00117                 }
00118 
00120                 void SetColor ( K3dColor4* _pColor )
00121                 {
00122                         m_pColor = _pColor;
00123                 }
00124 
00126                 int &GetSize()
00127                 {
00128                         return m_iSize;
00129                 }
00130 };
00131 
00132 
00133 

Generated on Thu Aug 16 23:53:26 2007 for K3dEngine by  doxygen 1.5.0