PixelLightAPI  .
VisPortal.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: VisPortal.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_VISPORTAL_H__
00024 #define __PLSCENE_VISIBILITY_VISPORTAL_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include <PLCore/Base/Event/EventHandler.h>
00032 #include "PLScene/Visibility/VisNode.h"
00033 
00034 
00035 //[-------------------------------------------------------]
00036 //[ Namespace                                             ]
00037 //[-------------------------------------------------------]
00038 namespace PLScene {
00039 
00040 
00041 //[-------------------------------------------------------]
00042 //[ Forward declarations                                  ]
00043 //[-------------------------------------------------------]
00044 class SCCell;
00045 class VisContainer;
00046 
00047 
00048 //[-------------------------------------------------------]
00049 //[ Classes                                               ]
00050 //[-------------------------------------------------------]
00051 /**
00052 *  @brief
00053 *    Portal of the visibility tree
00054 */
00055 class VisPortal : public VisNode {
00056 
00057 
00058     //[-------------------------------------------------------]
00059     //[ Friends                                               ]
00060     //[-------------------------------------------------------]
00061     friend class VisContainer;
00062 
00063 
00064     //[-------------------------------------------------------]
00065     //[ Public functions                                      ]
00066     //[-------------------------------------------------------]
00067     public:
00068         /**
00069         *  @brief
00070         *    Returns the target visibility cell the portal links to
00071         *
00072         *  @return
00073         *    The target visibility cell the portal links to, a null pointer if it's not possible to
00074         *    'see through' the portal (SNCellPortal::NoSeeThrough flag) or on error.
00075         */
00076         PLS_API VisContainer *GetTargetVisContainer() const;
00077 
00078 
00079     //[-------------------------------------------------------]
00080     //[ Private functions                                     ]
00081     //[-------------------------------------------------------]
00082     private:
00083         /**
00084         *  @brief
00085         *    Constructor
00086         */
00087         VisPortal();
00088 
00089         /**
00090         *  @brief
00091         *    Destructor
00092         */
00093         virtual ~VisPortal();
00094 
00095         /**
00096         *  @brief
00097         *    Called when the scene node assigned with this visibility portal was destroyed
00098         */
00099         void OnDestroy();
00100 
00101 
00102     //[-------------------------------------------------------]
00103     //[ Private event handlers                                ]
00104     //[-------------------------------------------------------]
00105     private:
00106         PLCore::EventHandler<> EventHandlerDestroy;
00107 
00108 
00109     //[-------------------------------------------------------]
00110     //[ Private data                                          ]
00111     //[-------------------------------------------------------]
00112     private:
00113         VisContainer *m_pTargetCell;    /**< The target visibility cell the portal links to */
00114 
00115 
00116     //[-------------------------------------------------------]
00117     //[ Public virtual VisNode functions                      ]
00118     //[-------------------------------------------------------]
00119     public:
00120         PLS_API virtual bool IsPortal() const override;
00121 
00122 
00123 };
00124 
00125 
00126 //[-------------------------------------------------------]
00127 //[ Namespace                                             ]
00128 //[-------------------------------------------------------]
00129 } // PLScene
00130 
00131 
00132 #endif // __PLSCENE_VISIBILITY_VISPORTAL_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