Simox  2.3.50
VirtualRobot::WorkspaceDataArray Class Reference
Inheritance diagram for VirtualRobot::WorkspaceDataArray:
VirtualRobot::WorkspaceData

Public Member Functions

 WorkspaceDataArray (unsigned int size1, unsigned int size2, unsigned int size3, unsigned int size4, unsigned int size5, unsigned int size6, bool adjustOnOverflow)
 
 WorkspaceDataArray (WorkspaceDataArray *other)
 Clone other data structure. More...
 
 WorkspaceDataArray (std::ofstream &file)
 create Workspace out of file More...
 
 ~WorkspaceDataArray ()
 
unsigned int getSizeTr () const
 Return the amount of data in bytes. More...
 
unsigned int getSizeRot () const
 
void setDatum (float x[], unsigned char value, const WorkspaceRepresentation *workspace)
 
void setDatum (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5, unsigned char value)
 
void setDatum (unsigned int x[6], unsigned char value)
 
void setDatumCheckNeighbors (unsigned int x[6], unsigned char value, unsigned int neighborVoxels)
 
void increaseDatum (float x[], const WorkspaceRepresentation *workspace)
 
void increaseDatum (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5)
 
void increaseDatum (unsigned int x[6])
 
void setDataRot (unsigned char *data, unsigned int x, unsigned int y, unsigned int z)
 
const unsigned char * getDataRot (unsigned int x, unsigned int y, unsigned int z)
 
unsigned char get (float x[], const WorkspaceRepresentation *workspace)
 
int getMaxSummedAngleReachablity ()
 
unsigned char get (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5)
 Simulates a multi-dimensional array access. More...
 
unsigned char get (unsigned int x[6])
 Simulates a multi-dimensional array access. More...
 
bool hasEntry (unsigned int x, unsigned int y, unsigned int z)
 
void clear ()
 
void binarize ()
 
void bisectData ()
 
unsigned int getSize (int dim)
 
unsigned char ** getRawData ()
 
WorkspaceDataclone ()
 
bool save (std::ofstream &file)
 
- Public Member Functions inherited from VirtualRobot::WorkspaceData
virtual ~WorkspaceData ()
 
virtual void setVoxelFilledCount (int c)
 
virtual unsigned char getMaxEntry ()
 
virtual void setMaxEntry (unsigned char m)
 
virtual unsigned int getVoxelFilledCount () const
 
virtual void setMinValidValue (unsigned char v)
 Min valid value is 1 by default. In cases some values are needed to indicate special flags (e.g. stability) the minimum valid number can be set here. More...
 

Protected Member Functions

void ensureData (unsigned int x, unsigned int y, unsigned int z)
 
int sumAngleReachabilities (int x0, int x1, int x2)
 
void getPos (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5, unsigned int &storePosTr, unsigned int &storePosRot) const
 
void getPos (unsigned int x[6], unsigned int &storePosTr, unsigned int &storePosRot) const
 

Protected Attributes

unsigned int sizes [6]
 
unsigned int sizeTr0
 
unsigned int sizeTr1
 
unsigned int sizeRot0
 
unsigned int sizeRot1
 
unsigned char ** data
 
- Protected Attributes inherited from VirtualRobot::WorkspaceData
unsigned char minValidValue
 
unsigned char maxEntry
 
unsigned int voxelFilledCount
 
bool adjustOnOverflow
 

Detailed Description

Stores a 6-dimensional array for the vertex data of a workspace representation. Internally unsigned char data types are used (0...255)

Constructor & Destructor Documentation

VirtualRobot::WorkspaceDataArray::WorkspaceDataArray ( unsigned int  size1,
unsigned int  size2,
unsigned int  size3,
unsigned int  size4,
unsigned int  size5,
unsigned int  size6,
bool  adjustOnOverflow 
)

Constructor, fills the data with 0

VirtualRobot::WorkspaceDataArray::WorkspaceDataArray ( WorkspaceDataArray other)

Clone other data structure.

VirtualRobot::WorkspaceDataArray::WorkspaceDataArray ( std::ofstream &  file)

create Workspace out of file

VirtualRobot::WorkspaceDataArray::~WorkspaceDataArray ( )

Member Function Documentation

void VirtualRobot::WorkspaceDataArray::binarize ( )
virtual
void VirtualRobot::WorkspaceDataArray::bisectData ( )
virtual
void VirtualRobot::WorkspaceDataArray::clear ( )
virtual
WorkspaceData * VirtualRobot::WorkspaceDataArray::clone ( )
virtual
void VirtualRobot::WorkspaceDataArray::ensureData ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)
protected
unsigned char VirtualRobot::WorkspaceDataArray::get ( float  x[],
const WorkspaceRepresentation workspace 
)
virtual
unsigned char VirtualRobot::WorkspaceDataArray::get ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5 
)
inlinevirtual

Simulates a multi-dimensional array access.

Implements VirtualRobot::WorkspaceData.

unsigned char VirtualRobot::WorkspaceDataArray::get ( unsigned int  x[6])
inlinevirtual

Simulates a multi-dimensional array access.

Implements VirtualRobot::WorkspaceData.

const unsigned char * VirtualRobot::WorkspaceDataArray::getDataRot ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)
virtual

Get rotation data for given x,y,z position.

Implements VirtualRobot::WorkspaceData.

int VirtualRobot::WorkspaceDataArray::getMaxSummedAngleReachablity ( )
void VirtualRobot::WorkspaceDataArray::getPos ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5,
unsigned int &  storePosTr,
unsigned int &  storePosRot 
) const
inlineprotected
void VirtualRobot::WorkspaceDataArray::getPos ( unsigned int  x[6],
unsigned int &  storePosTr,
unsigned int &  storePosRot 
) const
inlineprotected
unsigned char** VirtualRobot::WorkspaceDataArray::getRawData ( )
inlinevirtual
unsigned int VirtualRobot::WorkspaceDataArray::getSize ( int  dim)
inlinevirtual
unsigned int VirtualRobot::WorkspaceDataArray::getSizeRot ( ) const
virtual
unsigned int VirtualRobot::WorkspaceDataArray::getSizeTr ( ) const
virtual

Return the amount of data in bytes.

Implements VirtualRobot::WorkspaceData.

bool VirtualRobot::WorkspaceDataArray::hasEntry ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)
virtual
void VirtualRobot::WorkspaceDataArray::increaseDatum ( float  x[],
const WorkspaceRepresentation workspace 
)
virtual
void VirtualRobot::WorkspaceDataArray::increaseDatum ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5 
)
inline
void VirtualRobot::WorkspaceDataArray::increaseDatum ( unsigned int  x[6])
inline
bool VirtualRobot::WorkspaceDataArray::save ( std::ofstream &  file)
virtual
void VirtualRobot::WorkspaceDataArray::setDataRot ( unsigned char *  data,
unsigned int  x,
unsigned int  y,
unsigned int  z 
)
virtual

Set rotation data for given x,y,z position.

Implements VirtualRobot::WorkspaceData.

void VirtualRobot::WorkspaceDataArray::setDatum ( float  x[],
unsigned char  value,
const WorkspaceRepresentation workspace 
)
virtual
void VirtualRobot::WorkspaceDataArray::setDatum ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5,
unsigned char  value 
)
inlinevirtual
void VirtualRobot::WorkspaceDataArray::setDatum ( unsigned int  x[6],
unsigned char  value 
)
inlinevirtual
void VirtualRobot::WorkspaceDataArray::setDatumCheckNeighbors ( unsigned int  x[6],
unsigned char  value,
unsigned int  neighborVoxels 
)
virtual
int VirtualRobot::WorkspaceDataArray::sumAngleReachabilities ( int  x0,
int  x1,
int  x2 
)
protected

Field Documentation

unsigned char** VirtualRobot::WorkspaceDataArray::data
protected
unsigned int VirtualRobot::WorkspaceDataArray::sizeRot0
protected
unsigned int VirtualRobot::WorkspaceDataArray::sizeRot1
protected
unsigned int VirtualRobot::WorkspaceDataArray::sizes[6]
protected
unsigned int VirtualRobot::WorkspaceDataArray::sizeTr0
protected
unsigned int VirtualRobot::WorkspaceDataArray::sizeTr1
protected