class csPolygonSet : public csObject, public csPolygonParentInt A PolygonSet class is a set of polygons (amazing, isn't it :-) A PolygonSet describes a set of polygons that form a convex and (probably) closed hull
A PolygonSet class is a set of polygons (amazing, isn't it :-) A PolygonSet describes a set of polygons that form a convex and (probably) closed hull. All polygons in a set share vertices from the same pool.A recent extension also allows PolygonSets that are not convex by adding an optional BSP tree. This BSP tree is only useful if the PolygonSet is concave. Otherwise the tree is wasted.
Every polygon in the set has a visible and an invisible face; if the vertices of the polygon are ordered clockwise then the polygon is visible. Using this feature it is possible to define two kinds of PolygonSets: in one kind the polygons are oriented such that they are visible from within the hull. In other words, the polygons form a sort of container or room where the camera can be located. We call this kind of PolygonSet a csSector (a subclass of PolygonSet). In another kind the polygons are oriented such that they are visible from the outside. We call this kind of PolygonSet a Thing (another subclass of PolygonSet).
Things and csSectors have many similarities. That's why the PolygonSet class was created: to exploit these similarities. However, there are some important differences between Things and csSectors:
- Currently, only things can move. This means that the object space coordinates of a csSector are ALWAYS equal to the world space coordinates. It would be possible to allow moveable csSectors but I don't how this should be integrated into an easy model of the world.
- Things do not require portals but can use them.
If 'pr' != NULL it will also return a value between 0 and 1
indicating where on the 'start'-'end' vector the intersection
happened.
csVector3* wor_verts
csVector3* obj_verts
csVector3* cam_verts
csTransformedSet cam_verts_set
csPolygonInt** polygons
int num_polygon
int max_polygon
csCurve** curves
int num_curves
int max_curves
csSector* sector
csBspTree* bsp
csPolygonSetBBox* bbox
long light_frame_number
void DrawOnePolygon(csPolygon3D* p, csPolygon2D* poly, csRenderView* d, bool use_z_buf)
void DrawPolygonArray(csPolygonInt** polygon, int num, csRenderView* rview, bool use_z_buf)
void* TestQueuePolygonArray(csPolygonInt** polygon, int num, csRenderView* d, csPolygon2DQueue* poly_queue)
csFog fog
static long current_light_frame_number
int draw_busy
csVector3 curves_center
float curves_scale
csVector3* curve_vertices
csVector2* curve_texels
int num_curve_vertices
int max_curve_vertices
csPolygonSet()
virtual ~csPolygonSet()
virtual void Prepare()
int AddVertex(const csVector3& v)
int AddVertex(float x, float y, float z)
int AddVertexSmart(const csVector3& v)
int AddVertexSmart(float x, float y, float z)
csVector3& Vwor(int idx)
csVector3& Vobj(int idx)
csVector3& Vcam(int idx)
void CamUpdate()
int GetNumVertices()
void AddPolygon(csPolygonInt* spoly)
csPolygon3D* NewPolygon(csTextureHandle* texture)
int GetNumPolygons()
csPolygonInt* GetPolygon(int idx)
csPolygon3D* GetPolygon(char* name)
void AddCurve(csCurve* curve)
int GetNumCurves()
csCurve* GetCurve(int idx)
csCurve* GetCurve(char* name)
int GetNumCurveVertices()
csVector3& CurveVertex(int i)
csVector2& CurveTexel(int i)
void AddCurveVertex(csVector3& v, csVector2& t)
void UseBSP()
bool IsBSP()
virtual csPolygon3D* IntersectSegment(const csVector3& start, const csVector3& end, csVector3& isect, float* pr = NULL)
void UpdateTransformation(const csCamera& c)
void UpdateTransformation(const csVector3& trans)
csPolygonSet* GetNext()
void SetNext(csPolygonSet* next)
void SetSector(csSector* sector)
csSector* GetSector()
csFrustrumList* GetShadows(csVector3& origin)
void CreateBoundingBox()
csPolygonSetBBox* GetBoundingBox()
bool HasFog()
csFog& GetFog()
void GetCameraMinMaxZ(float& minz, float& mazx)
csVector2* IntersectCameraZPlane(float z, csVector2* clipper, int num_clip, int& num_pts)
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de