In file apps/mazed/me_poly.h:

## class mz3DPolygon : public csObject

> This class represents a polygon of the 3D model

## Inheritance:

### Public Fields

float alpha
  alpha transparancy
int Color
  Polygon color (one of cs_Color_XXX) or -1 for default
csPolygon3D* csp
  corresponding csPolygon3D counterpart
bool mirror
  Whether this polygon will mirror the room or not
char* Name
  Polygon name (initially automatically generated)
mz3DModel* parent
  Parent model
char* portal
  Portal for this polygon (NULL if none)
csSector* sector
  sector this polygon belong to
bool selected
  Polygon is selected?
csReversibleTransform* SpaceWarp
  Space warp matrix (if any)
csTextureHandle* Texture
  Texture used for this polygon

### Public Methods

csPolyError Check()
  Check polygon for correctness and return error code
void DeleteVertex(int iVertex)
  Delete a vertex
char* ErrorText(csPolyError iCode)
  Return a descriptive string for given error code or NULL
mz3DPolygon(mz3DModel *iParent)
  Initialize the polygon object
mz3DPolygon(mz3DPolygon &iCopy)
  Copy constructor
bool NotifyVertexDeleted(int iVertex)
  This method is called to notify polygon that a vertex has been deleted from parent model
bool operator == (const mz3DPolygon &p)
  Compare two polygons for equality
inline int& operator [] (int iVertex)
  Get a reference to vertex iVertex
void Reverse()
  Reverse polygon's visible side
void SetName(const char *iName)
  Set name of this polygon
mz3DVertex& Vertex(int iVertex)
  Get a reference to vertex by index into this polygon
inline int Vertices()
  Get number of vertices in polygon
virtual ~mz3DPolygon()
  Destructor

### Private Fields

csVector V
  The vertices that form this polygon

### Inherited from csObject:

### Public Methods

CS_ID GetID()
csObject* GetObj(const csIdType& objtype)
virtual csObject* GetObjectParent()
void ObjAdd(csObject* obj)
csObjIterator ObjGet(const csIdType& objtype)
void ObjRelease(csObject* obj)
void ObjRemove(csObject* obj)

### Private Fields

CS_ID csid_value
csObjTree* objtree

### Private Methods

virtual void SetObjectParent(csObject* parent)

### Inherited from csBase:

## Documentation

> This class represents a polygon of the 3D model.

> It contains a list of indexes into parent model object's Vertex array; that is, mz3DPolygon's Vertex array contains just the indices of corresponding mz3DVector objects in parent model's Vertex array.

`csVector V`
  The vertices that form this polygon

`bool selected`
  Polygon is selected?

`mz3DModel* parent`
  Parent model

`int Color`
  Polygon color (one of cs_Color_XXX) or -1 for default

`char* Name`
  Polygon name (initially automatically generated)

`bool mirror`
  Whether this polygon will mirror the room or not

`float alpha`
  alpha transparancy

`csSector* sector`
  sector this polygon belong to

`csTextureHandle* Texture`
  Texture used for this polygon

`char* portal`
  Portal for this polygon (NULL if none)

`csReversibleTransform* SpaceWarp`
  Space warp matrix (if any)

`csPolygon3D* csp`
  corresponding csPolygon3D counterpart

`mz3DPolygon(mz3DModel *iParent)`
  Initialize the polygon object

`mz3DPolygon(mz3DPolygon &iCopy)`
  Copy constructor

`virtual ~mz3DPolygon()`
  Destructor

`inline int& operator [] (int iVertex)`
  Get a reference to vertex iVertex

`mz3DVertex& Vertex(int iVertex)`
  Get a reference to vertex by index into this polygon

`inline int Vertices()`
  Get number of vertices in polygon

`bool NotifyVertexDeleted(int iVertex)`
  This method is called to notify polygon that a vertex has been deleted from parent model. Polygon should re-scan its Vertex array upon reception of this model and decrement indices of all vertices which's indices are above index of the vertex that has been deleted. If polygon contains deleted vertex, it should be deleted too and returns "false".

`bool operator == (const mz3DPolygon &p)`
  Compare two polygons for equality

`csPolyError Check()`
  Check polygon for correctness and return error code

`char* ErrorText(csPolyError iCode)`
  Return a descriptive string for given error code or NULL

`void SetName(const char *iName)`
  Set name of this polygon

`void DeleteVertex(int iVertex)`
  Delete a vertex

`void Reverse()`
  Reverse polygon's visible side

This class has no child classes.

alphabetic index hierarchy of classes

this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de