CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

impmesh.h

00001 /*
00002     Copyright (C) 2002 by Keith Fulton and Jorrit Tyberghein
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 #ifndef __CS_IMPMESH_H__
00019 #define __CS_IMPMESH_H__
00020 
00021 #include "csutil/nobjvec.h"
00022 #include "iengine/movable.h"
00023 #include "iengine/sector.h"
00024 #include "csgeom/poly3d.h"
00025 #include "csengine/impprctx.h"
00026 #include "csgeom/box.h"
00027 
00028 class csVector3;
00029 class csMatrix3;
00030 class csMovable;
00031 class csMeshWrapper;
00032 struct iRenderView;
00033 struct iCamera;
00034 
00035 class csImposterMesh
00036 {
00037 private:
00038     csMeshWrapper *parent_mesh;  
00039     csImposterProcTex *tex;  
00040     csPoly3D cutout;     
00041     bool     ready;    
00042     float    incidence_dist;   
00043     csBox2   screen_rect;  
00044     csBox3   camera_box;   
00045 
00046 public:
00047     csImposterMesh (csMeshWrapper *parent,iObjectRegistry *objreg);
00048 
00049     float CalcIncidenceAngleDist (iRenderView *rview);
00050     bool CheckIncidenceAngle (iRenderView *rview,float tolerance);
00051     void FindImposterRectangle (const iCamera *camera);
00052     void Draw (iRenderView *rview);
00053 
00054     bool GetImposterReady () { return ready; }
00055     void SetImposterReady (bool r) { ready=r; }
00056 
00057     void SetIncidenceDist (float d) { incidence_dist=d; }
00058     float GetIncidenceDist () { return incidence_dist;  }
00059 
00060     csMeshWrapper *GetParent () { return parent_mesh; }
00061 };
00062 
00063 #endif // __CS_IMPMESH_H__

Generated for Crystal Space by doxygen 1.2.14