K3dPolyPlane.h

Go to the documentation of this file.
00001 
00011 /***************************************************************************
00012  *   Copyright (C) 2007 by Jan Koci   *
00013  *   honza.koci@email.cz   *
00014  *   http://kengine.sourceforge.net/tutorial/
00015  *                                                                         *
00016  *   This program is free software; you can redistribute it and/or modify  *
00017  *   it under the terms of the GNU General Public License as published by  *
00018  *   the Free Software Foundation; either version 2 of the License, or     *
00019  *   (at your option) any later version.                                   *
00020  *                                                                         *
00021  *   This program is distributed in the hope that it will be useful,       *
00022  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00023  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00024  *   GNU General Public License for more details.                          *
00025  *                                                                         *
00026  *   You should have received a copy of the GNU General Public License     *
00027  *   along with this program; if not, write to the                         *
00028  *   Free Software Foundation, Inc.,                                       *
00029  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00030  ***************************************************************************/
00031 
00032 #pragma once
00033 
00034 #include "K3dPlaneObj.h"
00035 
00036 class K3dPolyPlane: public K3dPlaneObj
00037 {
00038                 TVector3Array m_vVertex;                                
00039                 TVector3Array::iterator m_itVertex;             
00040         public:
00041                 K3dPolyPlane();
00042                 ~K3dPolyPlane();
00043 
00045                 TVector3Array &GetOnPlaneVertexArray()
00046                 {
00047                         return m_vVertex;
00048                 }
00049 
00051                 void AddOnPlaneVertex ( K3dVector3Obj *_pVertex )
00052                 {
00053                         m_vVertex.push_back ( _pVertex );
00054                 }
00055 
00057                 void DeleteOnPlaneVertex ( K3dVector3Obj *_pVertex )
00058                 {
00059                         m_itVertex = find ( m_vVertex.begin(), m_vVertex.end(), _pVertex );
00060                         if ( m_itVertex != m_vVertex.end() )
00061                         {
00062                                 m_vVertex.erase ( m_itVertex );
00063                         }
00064                         else
00065                         {
00066                                 cerr <<  "Error - K3dPolyPlane::DeleteOnPlaneVertex() -- Vertex  " << _pVertex << " doesn't exists " << endl;
00067                         }
00068                 }
00069 };
00070 
00071 

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