00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
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 };
00096 #endif
00097