00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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__