PixelLightAPI  .
VisManager.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: VisManager.h                                   *
00003  *
00004  *  Copyright (C) 2002-2011 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_VISIBILITY_VISMANAGER_H__
00024 #define __PLSCENE_VISIBILITY_VISMANAGER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/Container/Pool.h>
00032 #include "PLScene/PLScene.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLScene {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Forward declarations                                  ]
00043 //[-------------------------------------------------------]
00044 class VisNode;
00045 
00046 
00047 //[-------------------------------------------------------]
00048 //[ Classes                                               ]
00049 //[-------------------------------------------------------]
00050 /**
00051 *  @brief
00052 *    Internal visibility manager used by VisContainer
00053 */
00054 class VisManager {
00055 
00056 
00057     //[-------------------------------------------------------]
00058     //[ Friends                                               ]
00059     //[-------------------------------------------------------]
00060     friend class VisContainer;
00061     friend class SceneContext;
00062 
00063 
00064     //[-------------------------------------------------------]
00065     //[ Public functions                                      ]
00066     //[-------------------------------------------------------]
00067     public:
00068         /**
00069         *  @brief
00070         *    Resource cleanup
00071         */
00072         PLS_API void Cleanup();
00073 
00074 
00075     //[-------------------------------------------------------]
00076     //[ Private functions                                     ]
00077     //[-------------------------------------------------------]
00078     private:
00079         /**
00080         *  @brief
00081         *    Constructor
00082         */
00083         VisManager();
00084 
00085         /**
00086         *  @brief
00087         *    Destructor
00088         */
00089         ~VisManager();
00090 
00091         /**
00092         *  @brief
00093         *    Returns a free visibility node
00094         *
00095         *  @return
00096         *    Free visibility node
00097         *
00098         *  @note
00099         *    - Use FreeNode() if you no longer need this node
00100         */
00101         VisNode &GetFreeNode();
00102 
00103         /**
00104         *  @brief
00105         *    Frees a visibility node
00106         *
00107         *  @param[in] cNode
00108         *    Visibility node to free
00109         */
00110         void FreeNode(VisNode &cNode);
00111 
00112 
00113     //[-------------------------------------------------------]
00114     //[ Private data                                          ]
00115     //[-------------------------------------------------------]
00116     private:
00117         PLCore::Pool<VisNode*> m_lstFreeNodes;  /**< List of currently free visibility nodes */
00118 
00119 
00120 };
00121 
00122 
00123 //[-------------------------------------------------------]
00124 //[ Namespace                                             ]
00125 //[-------------------------------------------------------]
00126 } // PLScene
00127 
00128 
00129 #endif // __PLSCENE_VISIBILITY_VISMANAGER_H__


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:05
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported