#include <PicPainter.h>
Collaboration diagram for PicPainter:
Public Member Functions | |
PicPainter (PicDef *_pdef) | |
void | init (const DisplayConf &dpc, GLWidget *mainContext) |
create the polygon mesh and the display list. | |
void | paint (bool bTargets, GLWidget *context) const |
do the actual painting | |
Static Public Member Functions | |
static MyAllocator & | getAllocator () |
Static Public Attributes | |
static const BuildFrame | build [17] |
the actual internal lookup table. | |
Private Types | |
enum | EPlaceType { PLACE_NORM, PLACE_X, PLACE_Y } |
Private Member Functions | |
bool | uncub (int x, int y) |
void | placeSidePolygon (MyObject &obj, int b, bool is1, int x, int y) |
void | PlaceInto (int pntn, Coord3df *shpp, Coord3df *pnti1, Coord3df *pnti2, EPlaceType type) |
void | realPaint (MyObject &obj, bool fTargets, GLWidget *context) |
Private Attributes | |
PicDef * | m_pdef |
int | m_displayLst |
Static Private Attributes | |
static MyAllocator | g_smoothAllocator |
Classes | |
struct | BuildFrame |
BuildFrame is the datum of the internal lookup table used while creating the piece initial polygon mesh. More... |
It is the heart of the 3D engine and where most of the 3D drawing logic is performed. An instance of this class is contained in the PicDef instance of the piece it is responsible for. It is called into creating the display list from PicBucket::buildMeshes() and into actual drawing by SlvPainter::paint()
enum PicPainter::EPlaceType [private] |
PicPainter::PicPainter | ( | PicDef * | _pdef | ) | [inline] |
void PicPainter::init | ( | const DisplayConf & | dpc, | |
GLWidget * | mainContext | |||
) |
create the polygon mesh and the display list.
void PicPainter::paint | ( | bool | bTargets, | |
GLWidget * | context | |||
) | const |
do the actual painting
bTargets
draw for targets, no colors. static MyAllocator& PicPainter::getAllocator | ( | ) | [inline, static] |
bool PicPainter::uncub | ( | int | x, | |
int | y | |||
) | [private] |
void PicPainter::placeSidePolygon | ( | MyObject & | obj, | |
int | b, | |||
bool | is1, | |||
int | x, | |||
int | y | |||
) | [private] |
void PicPainter::PlaceInto | ( | int | pntn, | |
Coord3df * | shpp, | |||
Coord3df * | pnti1, | |||
Coord3df * | pnti2, | |||
EPlaceType | type | |||
) | [private] |
const PicPainter::BuildFrame PicPainter::build [static] |
the actual internal lookup table.
Cube::genLinesIFS() also uses this table for creating the lines objects.
PicDef* PicPainter::m_pdef [private] |
int PicPainter::m_displayLst [private] |
MyAllocator PicPainter::g_smoothAllocator [static, private] |