#include <MyObject.h>
Collaboration diagram for MyObject:
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... |
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.
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] |
MyObject::MyObject | ( | MyAllocator * | alloc = NULL |
) | [inline] |
MyObject::~MyObject | ( | ) | [inline] |
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.
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] |
uint qHash | ( | const MyObject::MyPointWrapper & | pnt | ) | [friend] |
bool operator== | ( | const MyObject::MyPointWrapper & | p1, | |
const MyObject::MyPointWrapper & | p2 | |||
) | [friend] |
int MyObject::nPolys |
int MyObject::nLines |
TPolyList MyObject::plylst [private] |
TLineList MyObject::lnlst [private] |
TPointsList MyObject::pntlst [private] |
MyAllocator* MyObject::m_alloc [private] |
TPointsSet MyObject::m_tmppoints [private] |