animated.h

00001 /*--License:
00002         Lilith 3D Engine
00003         Copyright Lee Thomason (Grinning Lizard Software) 2002-2007
00004         www.grinninglizard.com/lilith
00005 
00006         This program is free software; you can redistribute it and/or
00007         modify it under the terms of the GNU General Public License
00008         as published by the Free Software Foundation; either version 2
00009         of the License, or (at your option) any later version.
00010 
00011         This program is distributed in the hope that it will be useful,
00012         but WITHOUT ANY WARRANTY; without even the implied warranty of
00013         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014         GNU General Public License for more details.
00015 
00016         You should have received a copy of the GNU General Public License
00017         along with this program; if not, write to the Free Software
00018         Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 
00020         The full text of the license can be found in license.txt
00021 */
00022 
00023 #ifndef LILITH_ANIMATED_INCLUDED
00024 #define LILITH_ANIMATED_INCLUDED
00025 
00026 #ifdef _MSC_VER
00027 #pragma warning( disable : 4530 )
00028 #pragma warning( disable : 4786 )
00029 #endif
00030 
00031 #include "../grinliz/gltypes.h"
00032 #include "../grinliz/glrandom.h"
00033 #include "meshresource.h"
00034 #include "mesh.h"
00035 #include <string>
00036 
00037 namespace lilith3d
00038 {
00039 
00043 class AnimatedResource : public MeshResource
00044 {
00045   public:
00046         virtual ~AnimatedResource()                                                     {}
00047 
00048         virtual const AnimatedResource* ToAnimated() const { return this; }
00049 
00050   protected:
00051         AnimatedResource( const std::string& _name ) : MeshResource( _name ) {}
00052 
00053   private:
00054 };
00055 
00056 
00062 class AnimatedMesh : public Mesh
00063 {
00064   public:
00065         AnimatedMesh( const AnimatedResource* meshResource );
00066         virtual ~AnimatedMesh();
00067 
00068         virtual void StreamOutMesh( ELightPass light, EPass pass ) = 0;
00069 
00070         #ifdef SHADOW_VOLUME
00071         virtual void StreamOutShadow( ShadowVolumeCache* cache ) = 0;
00072         #endif
00073 
00074         // [internal] called by the quadtree when the terrain changes.
00075         virtual void UpdateZ( float z );
00076         virtual void SetPosV( const grinliz::Vector3F& pos, const grinliz::Matrix4& rotation );
00077 
00079         const AnimatedResource* GetAnimatedResource() const { return animatedResource; }
00080 
00084         static void StandingOn( const grinliz::Vector3F& location, LilithObject* object );
00085 
00086         virtual void IntersectRay(      int flags, 
00087                                                                 const grinliz::Vector3F& point, 
00088                                                                 const grinliz::Vector3F& dir, 
00089                                                                 LilithObjectList* vec ) = 0;
00090 
00091   protected:
00092         const AnimatedResource* animatedResource;
00093 };
00094 
00095 };      // namespace lilith3d
00096 #endif
00097 

Generated on Fri Mar 23 19:36:21 2007 for Lilith3D by  doxygen 1.5.1-p1