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 "../../Geometry/K3dPolyObj.h" 00036 #include "../GameData/K3dGameData.h" 00037 #include "../K3dDefines.h" 00038 #include "../../Geometry/K3dVertexObj.h" 00039 #include "../../Geometry/K3dLineObj.h" 00040 #include "../../Geometry/K3dPolyPlane.h" 00041 #include "../../MathCore/K3dIntersection.h" 00042 #include "K3dPolyPlaneBuild.h" 00043 #include "K3dLineBuild.h" 00044 #include "K3dVertexBuild.h" 00045 #include "../Worker/K3dBoxWork.h" 00046 00047 #define K3D_PLANE_SIZE 5000 00048 00049 00050 class K3dBoxBuild: 00051 public K3dBoxWork 00052 { 00053 K3dGameData *m_pGameData; 00054 bool m_bIsVisible; 00055 K3dPolyObj *m_pPoly; 00056 K3dIntersection *m_pIntersection; 00057 K3dPolyPlaneBuild *m_pPolyPlaneBuild; 00058 K3dLineBuild *m_pLineBuild; 00059 K3dVertexBuild *m_pVertexBuild; 00060 public: 00061 K3dBoxBuild ( K3dGameData *_pGameData ); 00062 ~K3dBoxBuild(); 00063 00064 K3dPolyObj *CreateSceneBox(); 00065 void DeleteBoxes(); 00066 K3dLineObj *CreateEdge ( K3dVector3Obj *_pOrigin, K3dVector3Obj *_pDirection ); 00067 K3dPolyPlane *CreatePlane ( const K3dVector3Obj *_pV0, const K3dVector3Obj *_pV1, const K3dVector3Obj *_pV2 ); 00068 00070 bool &GetIsVisible() 00071 { 00072 return m_bIsVisible; 00073 } 00074 }; 00075 00076 00077