K3dColor4Build.cpp

Go to the documentation of this file.
00001 
00013 /***************************************************************************
00014  *   Copyright (C) 2007 by Jan Koci   *
00015  *   honza.koci@email.cz   *
00016  *   http://kengine.sourceforge.net/tutorial/
00017  *                                                                         *
00018  *   This program is free software; you can redistribute it and/or modify  *
00019  *   it under the terms of the GNU General Public License as published by  *
00020  *   the Free Software Foundation; either version 2 of the License, or     *
00021  *   (at your option) any later version.                                   *
00022  *                                                                         *
00023  *   This program is distributed in the hope that it will be useful,       *
00024  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00025  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00026  *   GNU General Public License for more details.                          *
00027  *                                                                         *
00028  *   You should have received a copy of the GNU General Public License     *
00029  *   along with this program; if not, write to the                         *
00030  *   Free Software Foundation, Inc.,                                       *
00031  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00032  ***************************************************************************/
00033 
00034 #include "K3dColor4Build.h"
00035 
00036 
00040 K3dColor4Build::K3dColor4Build(K3dGameData *_pGameData)
00041 {
00042         m_pGameData = _pGameData;
00043         // Set this pointer to the game data
00044         m_pGameData->SetColor4Build(this);
00045 }
00046 
00047 K3dColor4Build::~K3dColor4Build()
00048 {
00049         while(m_pGameData->GetColor4SP().GetNum())
00050         {
00051                 K3dColor4 *pColor = m_pGameData->GetColor4SP().Get(0);
00052                 pColor = m_pGameData->GetColor4SP().Delete(pColor);
00053         }
00054 }
00055 
00057 K3dColor4 *K3dColor4Build::CreateNewColor4()
00058 {
00059         // Create new vector
00060         K3dColor4 *pColor =  m_pGameData->GetColor4SP().New();
00061         // Set vector index
00062         pColor->GetId() = m_pGameData->GetColor4SP().GetNum()-1;
00063         return pColor;
00064 }

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