#include <Cube.h>
Collaboration diagram for Cube:
Public Member Functions | |
Cube (const Shape *shapeset, const PicsSet *picset, const EngineConf *conf) | |
~Cube () | |
void | puttgr (Solutions *slvs, SolveThread *thread) |
void | prnSolves (Solutions *solve) |
void | genLinesIFS (SlvCube *slvc, LinesCollection &ifs) |
int & | cub (int x, int y, int z) |
int | cub (int x, int y, int z) const |
Private Member Functions | |
CubeCell & | cell (int x, int y, int z) |
int | uncub (int p, int x, int y) |
void | PlaceInto (int pntn, int f, Coord3df *shpp, Coord3df *pnti1, Coord3df *pnti2) |
float | getLineColor (int p, int l) |
void | placeSidePolygon (int b, MyObject &obj, int f, int curf, bool is1, int x, int y, bool backface) |
void | SymetricGetNextRtn (int sc, int fc, int &nextrt) |
void | clear (int cl=0) |
void | putpic (const int n, const int r, const int p) |
void | putorig (const int n, const int r, const int p) |
void | rmvpic (const int p) |
void | AddPic (const int p) |
void | RmvPic (const int p) |
bool | SuperCheck (const int fc) |
bool | NovaAnotherpic (ShapePlace &plcfc, int fc) |
bool | NovaAssemble (int fc) |
Private Attributes | |
EngineConf | lconf |
a local copy of the options | |
const PicsSet * | pics |
this PicsSet was created on demand in CubeDoc::solveGo() according to the current piece selection. | |
const Shape * | shape |
a pointer to the instance in CubeDoc | |
const int | xsz |
const int | ysz |
const int | zsz |
const int | xTysz |
the value of xsz times ysz. keep the sized close by for optimizations. | |
CubeCell * | cub_ |
main 3d ploting area | |
ShapePlace * | plc |
places data, size sn, in each a size pn try bool array | |
UsedPieces | use |
pn sized array. which pieces are in use in this cube. | |
Static Private Attributes | |
static const int | whichKJ [3][2][3] |
Classes | |
struct | CubeCell |
CubeCell is the basic voxel value in the Cube 3D space. More... |
Cube is constructed on demand when the user presses the "Solve It!" button. it is constructed with a Shape just generated from the current BuildWorld and with a PicsSet produced from the current pieces selection. puttgr() is the entry point of the solution engine. it is called from within a SolveThread which is a worker thread dedicated for finding solutions. The solution engine output is fed through the Solutions instance given to puttgr() and signaled out through SolveThread's signals. An instance of this class is created in SolveThread::run() for the main solution engine. Another temporary instnce is created in SlvCube::genPainter() for creating line objects.
Cube::Cube | ( | const Shape * | shapeset, | |
const PicsSet * | picset, | |||
const EngineConf * | conf | |||
) |
Cube::~Cube | ( | ) |
void Cube::puttgr | ( | Solutions * | slvs, | |
SolveThread * | thread | |||
) |
void Cube::prnSolves | ( | Solutions * | solve | ) |
void Cube::genLinesIFS | ( | SlvCube * | slvc, | |
LinesCollection & | ifs | |||
) |
int& Cube::cub | ( | int | x, | |
int | y, | |||
int | z | |||
) | [inline] |
int Cube::cub | ( | int | x, | |
int | y, | |||
int | z | |||
) | const [inline] |
CubeCell& Cube::cell | ( | int | x, | |
int | y, | |||
int | z | |||
) | [inline, private] |
int Cube::uncub | ( | int | p, | |
int | x, | |||
int | y | |||
) | [private] |
void Cube::PlaceInto | ( | int | pntn, | |
int | f, | |||
Coord3df * | shpp, | |||
Coord3df * | pnti1, | |||
Coord3df * | pnti2 | |||
) | [private] |
float Cube::getLineColor | ( | int | p, | |
int | l | |||
) | [private] |
void Cube::placeSidePolygon | ( | int | b, | |
MyObject & | obj, | |||
int | f, | |||
int | curf, | |||
bool | is1, | |||
int | x, | |||
int | y, | |||
bool | backface | |||
) | [private] |
void Cube::SymetricGetNextRtn | ( | int | sc, | |
int | fc, | |||
int & | nextrt | |||
) | [private] |
void Cube::clear | ( | int | cl = 0 |
) | [private] |
void Cube::putpic | ( | const int | n, | |
const int | r, | |||
const int | p | |||
) | [inline, private] |
void Cube::putorig | ( | const int | n, | |
const int | r, | |||
const int | p | |||
) | [inline, private] |
void Cube::rmvpic | ( | const int | p | ) | [inline, private] |
void Cube::AddPic | ( | const int | p | ) | [private] |
void Cube::RmvPic | ( | const int | p | ) | [private] |
bool Cube::SuperCheck | ( | const int | fc | ) | [private] |
bool Cube::NovaAnotherpic | ( | ShapePlace & | plcfc, | |
int | fc | |||
) | [private] |
bool Cube::NovaAssemble | ( | int | fc | ) | [private] |
EngineConf Cube::lconf [private] |
a local copy of the options
const PicsSet* Cube::pics [private] |
this PicsSet was created on demand in CubeDoc::solveGo() according to the current piece selection.
const Shape* Cube::shape [private] |
a pointer to the instance in CubeDoc
const int Cube::xsz [private] |
const int Cube::ysz [private] |
const int Cube::zsz [private] |
const int Cube::xTysz [private] |
the value of xsz times ysz. keep the sized close by for optimizations.
CubeCell* Cube::cub_ [private] |
main 3d ploting area
ShapePlace* Cube::plc [private] |
places data, size sn, in each a size pn try bool array
UsedPieces Cube::use [private] |
pn sized array. which pieces are in use in this cube.
const int Cube::whichKJ [static, private] |