ShapePlace Class Reference

ShapePlace represents a single tile in the Shape to be built. More...

#include <CubeAcc.h>

Collaboration diagram for ShapePlace:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ShapePlace (int useSize=0)
void realloc (int newsize)
void clear ()

Public Attributes

int sc
 which part is now in this place
int rt
 what is it's rotation, index in rotation array
UsedPieces tryd
 which pieces were already tried in this place in the current iteration.

Detailed Description

ShapePlace represents a single tile in the Shape to be built.

it is used solely in the processes of the solution engine. At all times the solution engine in Cube maintains an array of ShapePlace objects, one for every tile in the design. The order of this array is the exact order of the tiles in the generated Shape. This array is essentially the current state of the solution engine. it holds the information about which piece goes where and in what orientation. In addition to that, every ShapePlace object holds the data about what pieces were tried and failed in this place when this information is relevant. This simple structure is the heart of the solution engine. When a solution is found, a copy of the current ShapePlace array is made into an array of SlvCube::SlvPiece objects which resides in SlvCube.

See also:
Cube


Constructor & Destructor Documentation

ShapePlace::ShapePlace ( int  useSize = 0  )  [inline]


Member Function Documentation

void ShapePlace::realloc ( int  newsize  )  [inline]

void ShapePlace::clear (  )  [inline]


Member Data Documentation

which part is now in this place

what is it's rotation, index in rotation array

which pieces were already tried in this place in the current iteration.


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