00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __NEPLANARREFLECTION_H
00028 #define __NEPLANARREFLECTION_H
00029
00030 #include "material.h"
00031 #include "nemath.h"
00032 #include "plane.h"
00033 #include "polygon.h"
00034 #include "render.h"
00035 #include "room.h"
00036 #include "sceneentity.h"
00037 #include "vertex.h"
00038
00039 namespace NeoEngine
00040 {
00041
00042 class NEOENGINE_API PlanarReflection : public FrameCallback, public SceneEntity, public Plane
00043 {
00044 public:
00045
00046 DefineVisitable();
00047
00048 protected:
00049
00050 Vector3d m_akPoints[3];
00051
00052 VertexBufferPtr m_pkVertexBuffer;
00053
00054 PolygonBufferPtr m_pkPolygonBuffer;
00055
00056 Texture *m_pkTexture;
00057
00058 bool m_bIsRendering;
00059
00060 void Draw();
00061
00062 public:
00063
00064 MaterialPtr m_pkMaterial;
00065
00066 PlanarReflection( const MaterialPtr &rkMaterial, VertexBufferPtr &pkVertexBuffer, PolygonBufferPtr &pkPolygonBuffer );
00067
00068 virtual ~PlanarReflection();
00069
00070 virtual VertexBufferPtr &GetVertexBuffer();
00071
00072 virtual PolygonBufferPtr &GetPolygonBuffer();
00073
00074 virtual void SetVertexBuffer( VertexBufferPtr pkVertexBuffer );
00075
00076 virtual void SetPolygonBuffer( PolygonBufferPtr pkPolygonBuffer );
00077
00078 virtual void FrameEvent( FrameCallback::FRAMECALLBACKTYPE eType, void *pData );
00079
00080 virtual bool Render( Frustum *pkFrustum = 0, bool bForce = false );
00081 };
00082
00083 };
00084
00085 #endif // NEPLANARREFLECTION_H