PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: SQPlaneSet.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLSCENE_SCENEQUERY_PLANESET_H__ 00024 #define __PLSCENE_SCENEQUERY_PLANESET_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include <PLMath/PlaneSet.h> 00032 #include "PLScene/Scene/SceneQuery.h" 00033 00034 00035 //[-------------------------------------------------------] 00036 //[ Namespace ] 00037 //[-------------------------------------------------------] 00038 namespace PLScene { 00039 00040 00041 //[-------------------------------------------------------] 00042 //[ Forward declarations ] 00043 //[-------------------------------------------------------] 00044 class SceneHierarchyNode; 00045 00046 00047 //[-------------------------------------------------------] 00048 //[ Classes ] 00049 //[-------------------------------------------------------] 00050 /** 00051 * @brief 00052 * Plane set volume intersection scene query class 00053 * 00054 * @remarks 00055 * This plane set volume test scene query will enumerate all 00056 * scene nodes within the given plane set. 00057 */ 00058 class SQPlaneSet : public SceneQuery { 00059 00060 00061 //[-------------------------------------------------------] 00062 //[ RTTI interface ] 00063 //[-------------------------------------------------------] 00064 pl_class(PLS_RTTI_EXPORT, SQPlaneSet, "PLScene", PLScene::SceneQuery, "Plane set volume intersection scene query class") 00065 // Constructors 00066 pl_constructor_0(DefaultConstructor, "Default constructor", "") 00067 pl_class_end 00068 00069 00070 //[-------------------------------------------------------] 00071 //[ Public functions ] 00072 //[-------------------------------------------------------] 00073 public: 00074 /** 00075 * @brief 00076 * Default constructor 00077 */ 00078 PLS_API SQPlaneSet(); 00079 00080 /** 00081 * @brief 00082 * Destructor 00083 */ 00084 PLS_API virtual ~SQPlaneSet(); 00085 00086 /** 00087 * @brief 00088 * Returns the used plane set 00089 * 00090 * @return 00091 * The used plane set 00092 */ 00093 PLS_API PLMath::PlaneSet &GetPlaneSet(); 00094 00095 00096 //[-------------------------------------------------------] 00097 //[ Private functions ] 00098 //[-------------------------------------------------------] 00099 private: 00100 /** 00101 * @brief 00102 * Recursive part of PerformQuery() 00103 * 00104 * @param[in] cHierarchyNode 00105 * Current scene hierarchy node we work on 00106 * 00107 * @return 00108 * 'true' to continue the query, 'false' if stop it right now 00109 */ 00110 bool PerformQueryRec(SceneHierarchyNode &cHierarchyNode); 00111 00112 00113 //[-------------------------------------------------------] 00114 //[ Private data ] 00115 //[-------------------------------------------------------] 00116 private: 00117 PLMath::PlaneSet m_cPlaneSet; /**< Plane set used for the query */ 00118 00119 00120 //[-------------------------------------------------------] 00121 //[ Public virtual SceneQuery functions ] 00122 //[-------------------------------------------------------] 00123 public: 00124 PLS_API virtual bool PerformQuery() override; 00125 00126 00127 }; 00128 00129 00130 //[-------------------------------------------------------] 00131 //[ Namespace ] 00132 //[-------------------------------------------------------] 00133 } // PLScene 00134 00135 00136 #endif // __PLSCENE_SCENEQUERY_PLANESET_H__
|