MyPolygon Class Reference

MyPolygon represents a single polygon to the 3D solution display engine. More...

#include <MyPolygon.h>

Collaboration diagram for MyPolygon:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyPolygon (MyPoint *inVtx[], TexAnchor *inAncs, Texture *_tex)
 MyPolygon ()
 ~MyPolygon ()
void init (MyPoint *inVtx[], TexAnchor *inAncs, Texture *_tex)
void init (TexAnchor *inAncs, Texture *_tex)
void calcNorm ()
 calculate the normal of this polygon which is the vector pependicular to it.

Public Attributes

MyPoint * vtx [4]
 A vector list of the polygons points in their order.
Coord3df center
 The normal of polygon.
TexAnchor texAncs [4]
 Texture anchors by the order of 0,0 - 1,0 - 1,1 - 0,1.
Texture * tex
HalfEdge * he
MyPoint * f

Static Public Attributes

static int g_ctorCount
static int g_dtorCount
 keep bookmarking of creation and deletion for debug

Detailed Description

MyPolygon represents a single polygon to the 3D solution display engine.

objects of this class aren't really used in the normal rendering of solutions. They are only used in the creation of the pieces display lists. Actual rendering is performed with these display lists. instances of this class are usually managed with in a Pool of objects

See also:
PicPainter MyObject MyPoint


Constructor & Destructor Documentation

MyPolygon::MyPolygon ( MyPoint *  inVtx[],
TexAnchor *  inAncs,
Texture *  _tex 
) [inline]

MyPolygon::MyPolygon (  )  [inline]

MyPolygon::~MyPolygon (  )  [inline]


Member Function Documentation

void MyPolygon::init ( MyPoint *  inVtx[],
TexAnchor *  inAncs,
Texture *  _tex 
) [inline]

void MyPolygon::init ( TexAnchor *  inAncs,
Texture *  _tex 
) [inline]

void MyPolygon::calcNorm (  ) 

calculate the normal of this polygon which is the vector pependicular to it.

this is done with some math using the polygon's vertices. if none of the vertices for a polygon that is not a line an asserion is asserted. That assertion means there is a bug somewhere.


Member Data Documentation

A vector list of the polygons points in their order.

The normal of polygon.

Texture anchors by the order of 0,0 - 1,0 - 1,1 - 0,1.

int MyPolygon::g_ctorCount [static]

int MyPolygon::g_dtorCount [static]

keep bookmarking of creation and deletion for debug


The documentation for this class was generated from the following files: