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

planarreflection.h

00001 /***************************************************************************
00002                 planarreflection.h  -  Planar reflection class
00003                              -------------------
00004     begin                : Sun Apr 27 2003
00005     copyright            : (C) 2003 by Cody Russell
00006     email                : cody [at] jhu.edu
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, planarreflection.h
00020 
00021  The Initial Developer of the Original Code is Cody Russell.
00022  Portions created by Cody Russell are Copyright (C) 2003
00023  Cody Russell. All Rights Reserved.
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 }; // namespace NeoEngine
00084 
00085 #endif // NEPLANARREFLECTION_H

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