K3dVector3Build.cpp

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 #include "K3dVector3Build.h"
00034 
00038 K3dVector3Build::K3dVector3Build(K3dGameData *_pGameData):
00039         K3dVector3Work(_pGameData)
00040 {
00041         m_pGameData = _pGameData;
00042         // Set this pointer to the game data
00043         m_pGameData->SetVector3Build(this);
00044 }
00045 
00046 K3dVector3Build::~K3dVector3Build()
00047 {
00048         while(m_pGameData->GetVector3SP().GetNum())
00049         {
00050                 K3dVector3Obj *p = m_pGameData->GetVector3SP().Get(0);
00051                 p = m_pGameData->GetVector3SP().Delete(p);
00052         }
00053 }
00054 
00057 K3dVector3Obj *K3dVector3Build::CreateNewVector3()
00058 {
00059         // Create new vector
00060         K3dVector3Obj *pVector3 = m_pGameData->GetVector3SP().New();
00061         // Set vector index
00062         pVector3->GetId() = m_pGameData->GetVector3SP().GetNum()-1;
00063         return pVector3;
00064 }

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