BuildWorld Class Reference

BuildWorld holds the raw data from the design editor. More...

#include <BuildWorld.h>

Collaboration diagram for BuildWorld:

Collaboration graph
List of all members.

Public Types


Public Member Functions

 BuildWorld ()
bool set (int dim, int page, int x, int y, int set)
bool set (const CoordBuild &c, int set)
int get (int dim, int page, int x, int y) const
int get (const CoordBuild &c) const
int tilesCount () const
void initializeNew (bool boxed)
void doTransparent ()
 this is a fragment left from the days of tile editing.
void reClacLimits ()
bool loadFrom (MyFile *rdfl)
bool saveTo (MyFile *wrfl)
bool search (int face, int changeTo=-1, bool onlyShow=false, bool doret=true)
void justChanged ()
void justGen ()
void justSave ()
bool getChangedFromGen () const
bool getChangedFromSave () const
EGenResult testShape ()
EGenResult getTestResult ()
const ShapegetTestShape ()
int getTestShapeFcInd (CoordBuild s) const
void unGenerate (const Shape *shp)
 Do the opposite action to generate().
void clean (ECleanMethod meth)

Static Public Member Functions

static void get3dCoords (CoordBuild s, Coord3d &g1, Coord3d &g2)
static void getBuildCoords (Coord3d g, CoordBuild b[6])

Public Attributes

Coord3d size
BoundedBlockSpace3D m_space
int nFaces
bool fClosed
WorldLimits m_limits
SqrLimits m_gen_bounds
 the bounds of the last generate called with this BuildWorld page plays the z axis

Private Member Functions

void bootstrapSpace ()
 create m_space
void justInvalidatedTest ()

Private Attributes

BuildDimension dm [3]
bool fChangedFromGen
bool fChangedFromSave
Shape m_testShape
 this shape is used to test if the build is legal.
EGenResult m_testResult
 valid only when m_bTested == true
bool m_bTested


struct  TransSqr
 TransSqr is the datum of the transp internal lookup table used doTransparent(). More...
struct  WorldLimits
 WorldLimits contains the actual limits of BuildWorld in its 3 dimentions. More...

Detailed Description

BuildWorld holds the raw data from the design editor.

The data is represented in its rawest and most direct form. Every polygon the user sees in the design view Translateds to datum in this class. From this data the Shape is later generated for the solution engine to work on. The data is organized in three BuildDimension structures, each for every axis. every such BuildDimension contains the tiles which are prependicular to that axis. an instance of this class is contained by CubeDoc as the current state of the design editor.

See also:
BuildDimension CubeDoc

Member Enumeration Documentation

CLEAN_CLEAR  wipe it all
CLEAN_TRANS  clean only the transperant tiles, maitain show status
CLEAN_TRANS_SHOW  clean transperant and show status

Constructor & Destructor Documentation

BuildWorld::BuildWorld (  )  [inline]

Member Function Documentation

bool BuildWorld::set ( int  dim,
int  page,
int  x,
int  y,
int  set 

bool BuildWorld::set ( const CoordBuild c,
int  set 

int BuildWorld::get ( int  dim,
int  page,
int  x,
int  y 
) const [inline]

int BuildWorld::get ( const CoordBuild c  )  const [inline]

int BuildWorld::tilesCount (  )  const [inline]

void BuildWorld::initializeNew ( bool  boxed  ) 

void BuildWorld::doTransparent (  ) 

this is a fragment left from the days of tile editing.

it serves the purpose of finding which tiles are legal to be new tiles. nowa days all it does effectivly is calculate m_limits properly. this code should be refactored into a different method.

void BuildWorld::reClacLimits (  ) 

bool BuildWorld::loadFrom ( MyFile rdfl  ) 

bool BuildWorld::saveTo ( MyFile wrfl  ) 

bool BuildWorld::search ( int  face,
int  changeTo = -1,
bool  onlyShow = false,
bool  doret = true 

void BuildWorld::justChanged (  )  [inline]

void BuildWorld::justGen (  )  [inline]

void BuildWorld::justSave (  )  [inline]

bool BuildWorld::getChangedFromGen (  )  const [inline]

bool BuildWorld::getChangedFromSave (  )  const [inline]

EGenResult BuildWorld::testShape (  ) 

EGenResult BuildWorld::getTestResult (  )  [inline]

const Shape& BuildWorld::getTestShape (  )  [inline]

void BuildWorld::get3dCoords ( CoordBuild  s,
Coord3d g1,
Coord3d g2 
) [static]

void BuildWorld::getBuildCoords ( Coord3d  g,
CoordBuild  b[6] 
) [static]

int BuildWorld::getTestShapeFcInd ( CoordBuild  s  )  const

void BuildWorld::unGenerate ( const Shape shp  ) 

Do the opposite action to generate().

take the shape and make a build from it. currently not in use.

See also:

void BuildWorld::clean ( ECleanMethod  meth  ) 

void BuildWorld::bootstrapSpace (  )  [private]

create m_space

void BuildWorld::justInvalidatedTest (  )  [inline, private]

Member Data Documentation

the bounds of the last generate called with this BuildWorld page plays the z axis

this shape is used to test if the build is legal.

valid only when m_bTested == true

bool BuildWorld::m_bTested [private]

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