PicPainter Class Reference

PicPainter creates the display list of the polygon mesh of a single piece in the 3D soultion view. More...

#include <PicPainter.h>

Collaboration diagram for PicPainter:

Collaboration graph
[legend]
List of all members.

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 MyAllocatorgetAllocator ()

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

PicDefm_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...

Detailed Description

PicPainter creates the display list of the polygon mesh of a single piece in the 3D soultion view.

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()

See also:
SlvPainter MyAllocator MyObject


Member Enumeration Documentation

enum PicPainter::EPlaceType [private]

Enumerator:
PLACE_NORM 
PLACE_X 
PLACE_Y 


Constructor & Destructor Documentation

PicPainter::PicPainter ( PicDef _pdef  )  [inline]


Member Function Documentation

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]

void PicPainter::realPaint ( MyObject obj,
bool  fTargets,
GLWidget context 
) [private]


Member Data Documentation

the actual internal lookup table.

Cube::genLinesIFS() also uses this table for creating the lines objects.

int PicPainter::m_displayLst [private]


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