Simox  2.3.74.0
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 () override
 
unsigned int getSizeTr () const override
 Return the amount of data in bytes. More...
 
unsigned int getSizeRot () const override
 
void setDatum (float x[], unsigned char value, const WorkspaceRepresentation *workspace) override
 
void setDatum (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5, unsigned char value) override
 
void setDatum (unsigned int x[6], unsigned char value) override
 
void setDatumCheckNeighbors (unsigned int x[6], unsigned char value, unsigned int neighborVoxels) override
 
void increaseDatum (float x[], const WorkspaceRepresentation *workspace) override
 
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) override
 
const unsigned char * getDataRot (unsigned int x, unsigned int y, unsigned int z) override
 
unsigned char get (float x[], const WorkspaceRepresentation *workspace) override
 
int getMaxSummedAngleReachablity ()
 
unsigned char get (unsigned int x0, unsigned int x1, unsigned int x2, unsigned int x3, unsigned int x4, unsigned int x5) override
 Simulates a multi-dimensional array access. More...
 
unsigned char get (unsigned int x[6]) override
 Simulates a multi-dimensional array access. More...
 
bool hasEntry (unsigned int x, unsigned int y, unsigned int z) override
 
void clear () override
 
void binarize () override
 
void bisectData () override
 
unsigned int getSize (int dim) override
 
unsigned char ** getRawData () override
 
WorkspaceDataclone () override
 
bool save (std::ofstream &file) override
 
void reset (int x, int y, int z) override
 
- 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

◆ WorkspaceDataArray() [1/3]

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

◆ WorkspaceDataArray() [2/3]

VirtualRobot::WorkspaceDataArray::WorkspaceDataArray ( WorkspaceDataArray other)

Clone other data structure.

◆ WorkspaceDataArray() [3/3]

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

create Workspace out of file

◆ ~WorkspaceDataArray()

VirtualRobot::WorkspaceDataArray::~WorkspaceDataArray ( )
override

Member Function Documentation

◆ binarize()

void VirtualRobot::WorkspaceDataArray::binarize ( )
overridevirtual

◆ bisectData()

void VirtualRobot::WorkspaceDataArray::bisectData ( )
overridevirtual

◆ clear()

void VirtualRobot::WorkspaceDataArray::clear ( )
overridevirtual

◆ clone()

WorkspaceData * VirtualRobot::WorkspaceDataArray::clone ( )
overridevirtual

◆ ensureData()

void VirtualRobot::WorkspaceDataArray::ensureData ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)
protected

◆ get() [1/3]

unsigned char VirtualRobot::WorkspaceDataArray::get ( float  x[],
const WorkspaceRepresentation workspace 
)
overridevirtual

◆ get() [2/3]

unsigned char VirtualRobot::WorkspaceDataArray::get ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5 
)
inlineoverridevirtual

Simulates a multi-dimensional array access.

Implements VirtualRobot::WorkspaceData.

◆ get() [3/3]

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

Simulates a multi-dimensional array access.

Implements VirtualRobot::WorkspaceData.

◆ getDataRot()

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

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

Implements VirtualRobot::WorkspaceData.

◆ getMaxSummedAngleReachablity()

int VirtualRobot::WorkspaceDataArray::getMaxSummedAngleReachablity ( )

◆ getPos() [1/2]

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

◆ getPos() [2/2]

void VirtualRobot::WorkspaceDataArray::getPos ( unsigned int  x[6],
unsigned int &  storePosTr,
unsigned int &  storePosRot 
) const
inlineprotected

◆ getRawData()

unsigned char** VirtualRobot::WorkspaceDataArray::getRawData ( )
inlineoverridevirtual

◆ getSize()

unsigned int VirtualRobot::WorkspaceDataArray::getSize ( int  dim)
inlineoverridevirtual

◆ getSizeRot()

unsigned int VirtualRobot::WorkspaceDataArray::getSizeRot ( ) const
overridevirtual

◆ getSizeTr()

unsigned int VirtualRobot::WorkspaceDataArray::getSizeTr ( ) const
overridevirtual

Return the amount of data in bytes.

Implements VirtualRobot::WorkspaceData.

◆ hasEntry()

bool VirtualRobot::WorkspaceDataArray::hasEntry ( unsigned int  x,
unsigned int  y,
unsigned int  z 
)
overridevirtual

◆ increaseDatum() [1/3]

void VirtualRobot::WorkspaceDataArray::increaseDatum ( float  x[],
const WorkspaceRepresentation workspace 
)
overridevirtual

◆ increaseDatum() [2/3]

void VirtualRobot::WorkspaceDataArray::increaseDatum ( unsigned int  x0,
unsigned int  x1,
unsigned int  x2,
unsigned int  x3,
unsigned int  x4,
unsigned int  x5 
)
inline

◆ increaseDatum() [3/3]

void VirtualRobot::WorkspaceDataArray::increaseDatum ( unsigned int  x[6])
inline

◆ reset()

void VirtualRobot::WorkspaceDataArray::reset ( int  x,
int  y,
int  z 
)
overridevirtual

◆ save()

bool VirtualRobot::WorkspaceDataArray::save ( std::ofstream &  file)
overridevirtual

◆ setDataRot()

void VirtualRobot::WorkspaceDataArray::setDataRot ( unsigned char *  data,
unsigned int  x,
unsigned int  y,
unsigned int  z 
)
overridevirtual

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

Implements VirtualRobot::WorkspaceData.

◆ setDatum() [1/3]

void VirtualRobot::WorkspaceDataArray::setDatum ( float  x[],
unsigned char  value,
const WorkspaceRepresentation workspace 
)
overridevirtual

◆ setDatum() [2/3]

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

◆ setDatum() [3/3]

void VirtualRobot::WorkspaceDataArray::setDatum ( unsigned int  x[6],
unsigned char  value 
)
inlineoverridevirtual

◆ setDatumCheckNeighbors()

void VirtualRobot::WorkspaceDataArray::setDatumCheckNeighbors ( unsigned int  x[6],
unsigned char  value,
unsigned int  neighborVoxels 
)
overridevirtual

◆ sumAngleReachabilities()

int VirtualRobot::WorkspaceDataArray::sumAngleReachabilities ( int  x0,
int  x1,
int  x2 
)
protected

Field Documentation

◆ data

unsigned char** VirtualRobot::WorkspaceDataArray::data
protected

◆ sizeRot0

unsigned int VirtualRobot::WorkspaceDataArray::sizeRot0
protected

◆ sizeRot1

unsigned int VirtualRobot::WorkspaceDataArray::sizeRot1
protected

◆ sizes

unsigned int VirtualRobot::WorkspaceDataArray::sizes[6]
protected

◆ sizeTr0

unsigned int VirtualRobot::WorkspaceDataArray::sizeTr0
protected

◆ sizeTr1

unsigned int VirtualRobot::WorkspaceDataArray::sizeTr1
protected