Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | Related Pages

renderentity.h

Go to the documentation of this file.
00001 /***************************************************************************
00002               renderentity.h  -  Base class for renderable entities
00003                              -------------------
00004     begin                : Thu Sep 11 2003
00005     copyright            : (C) 2003 by Reality Rift Studios
00006     email                : mattias@realityrift.com
00007  ***************************************************************************
00008 
00009  The contents of this file are subject to the Mozilla Public License Version
00010  1.1 (the "License"); you may not use this file except in compliance with
00011  the License. You may obtain a copy of the License at 
00012  http://www.mozilla.org/MPL/
00013 
00014  Software distributed under the License is distributed on an "AS IS" basis,
00015  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00016  for the specific language governing rights and limitations under the
00017  License.
00018 
00019  The Original Code is the NeoEngine, renderentity.h
00020 
00021  The Initial Developer of the Original Code is Mattias Jansson.
00022  Portions created by Mattias Jansson are Copyright (C) 2003
00023  Reality Rift Studios. All Rights Reserved.
00024 
00025  ***************************************************************************/
00026 
00027 
00028 #ifndef __NERENDERENTITY_H
00029 #define __NERENDERENTITY_H
00030 
00031 
00038 #include "base.h"
00039 #include "activator.h"
00040 
00041 
00042 namespace NeoEngine
00043 {
00044 
00045 
00046 //External classes
00047 class Frustum;
00048 
00049 
00065 class NEOENGINE_API RenderEntity : public virtual Activator
00066 {
00067     public:
00068 
00070         static unsigned int                           s_uiFrameCount;
00071 
00073         unsigned int                                  m_uiLastFrame;
00074 
00077                                                       RenderEntity() : m_uiLastFrame( 0 ) {}
00078 
00081         virtual                                      ~RenderEntity() {}
00082 
00089         inline virtual bool                           Render( Frustum *pkFrustum = 0, bool bForce = false ) { if( bForce ) { m_uiLastFrame = s_uiFrameCount; return true; } if( !m_bActive || ( m_uiLastFrame >= s_uiFrameCount ) ) return false; m_uiLastFrame = s_uiFrameCount; return true; }
00090 };
00091 
00092 
00093 }; // namespace NeoEngine
00094 
00095 
00096 #endif

Generated on Wed Jan 21 14:21:07 2004 for NeoEngine by doxygen 1.3.5