MyObject Class Reference

MyObject is a mesh of polygons which make out a single piece in the 3D solution engine. More...

#include <MyObject.h>

Collaboration diagram for MyObject:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MyObject (MyAllocator *alloc=NULL)
 ~MyObject ()
void AddPoly (Coord3df *inplst, TexAnchor *ancs=NULL, Texture *tex=NULL)
void AddLine (Coord3df *inp1, Coord3df *inp2, double inR, double inG, double inB, MyLine::ELineType type)
void setNakedLineColor (float color)
void vectorify ()
void clacNormals (bool vtxNormals)
void subdivide (bool smooth)
 perform the subdivision algorithm over the current mesh, producing a mesh that has 4 times as many polygons.

Public Attributes

MyPolygon ** poly
MyLine * lines
MyPoint ** points
int nPolys
int nLines
int nPoints
float nakedLinesColor
bool verterxNormals

Private Types

typedef QList< MyPolygon * > TPolyList
typedef QLinkedList< MyLine > TLineList
typedef QList< MyPoint * > TPointsList
typedef QSet< MyPointWrapper > TPointsSet
typedef QVector< HalfEdge * > THalfEdgeList

Private Member Functions

MyPoint * CopyCheckPoint (Coord3df *p)
void basicAddPoint (MyPoint *pnt)
void basicAddPoly (MyPoint *inparr[], TexAnchor *ancs=NULL, Texture *tex=NULL)
bool buildHalfEdges (THalfEdgeList &lst)

Private Attributes

TPolyList plylst
TLineList lnlst
TPointsList pntlst
MyAllocator * m_alloc
TPointsSet m_tmppoints

Friends

uint qHash (const MyObject::MyPointWrapper &pnt)
bool operator== (const MyObject::MyPointWrapper &p1, const MyObject::MyPointWrapper &p2)

Classes

struct  MyPointWrapper
 MyPointWrapper is a shallow wrapper for a MyPoint pointer. More...

Detailed Description

MyObject is a mesh of polygons which make out a single piece in the 3D solution engine.

The polygons and points are actually saved in an Indexed Face Set data structure. There is a main MyPoint repository and the polygons reference the points in there. MyObject instances are used only for creating the piece display list. after the list is created it is saved in the Piece's PicPainter member and the MyObject instance is discarded.

See also:
PicPainter MyPolygon MyPoint MyLine


Member Typedef Documentation

typedef QList<MyPolygon*> MyObject::TPolyList [private]

typedef QLinkedList<MyLine> MyObject::TLineList [private]

typedef QList<MyPoint*> MyObject::TPointsList [private]

typedef QSet<MyPointWrapper> MyObject::TPointsSet [private]

typedef QVector<HalfEdge*> MyObject::THalfEdgeList [private]


Constructor & Destructor Documentation

MyObject::MyObject ( MyAllocator *  alloc = NULL  )  [inline]

MyObject::~MyObject (  )  [inline]


Member Function Documentation

void MyObject::AddPoly ( Coord3df *  inplst,
TexAnchor *  ancs = NULL,
Texture *  tex = NULL 
)

void MyObject::AddLine ( Coord3df *  inp1,
Coord3df *  inp2,
double  inR,
double  inG,
double  inB,
MyLine::ELineType  type 
)

void MyObject::setNakedLineColor ( float  color  )  [inline]

void MyObject::vectorify (  ) 

void MyObject::clacNormals ( bool  vtxNormals  ) 

void MyObject::subdivide ( bool  smooth  ) 

perform the subdivision algorithm over the current mesh, producing a mesh that has 4 times as many polygons.

  • smooth should the subdivision be averaged or flat (no averaging)

MyPoint * MyObject::CopyCheckPoint ( Coord3df *  p  )  [private]

void MyObject::basicAddPoint ( MyPoint *  pnt  )  [inline, private]

void MyObject::basicAddPoly ( MyPoint *  inparr[],
TexAnchor *  ancs = NULL,
Texture *  tex = NULL 
) [inline, private]

bool MyObject::buildHalfEdges ( THalfEdgeList &  lst  )  [private]


Friends And Related Function Documentation

uint qHash ( const MyObject::MyPointWrapper &  pnt  )  [friend]

bool operator== ( const MyObject::MyPointWrapper &  p1,
const MyObject::MyPointWrapper &  p2 
) [friend]


Member Data Documentation


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