Raytrix Light Field SDK  5.0
Rx::CRxOctree Class Reference

Detailed Description

The mapping 3D. Uses a 3D volume to map a 3d Point to another 3d Point.

                                    Dimension X
    Min Position *_________________
                            /|                                /
                       / |                           /|
                      /__|______________/ |Dimension Y
                      |      |                              | |
                      |      |______________|_|
                      |  /                          | /

Dimension Z | / |/ |/________________* MaxPosition.

Public Member Functions

 CRxOctree ()
 Default constructor. Creates an invalid mapping without using any memory. More...
 
 CRxOctree (const CRxOctree &xOctree)
 Copy constructor. Creates a copy of the given image. More...
 
 CRxOctree (CRxOctree &&xOctree)
 Move constructor. More...
 
virtual ~CRxOctree ()
 Destructor. All used memory is freed. More...
 
bool Contains (float fPointX, float fPointY, float fPointZ)
 Query if this object contains the given fPointX. More...
 
void Create (const CRxOctree &xOctree)
 Creates a copy of the given mapping. Only (re)allocates memory if required. More...
 
void Create (CRxOctree &&xOctree)
 Creates this mapping by moving the data of the given mapping into this mapping. More...
 
bool Create (float fMinPositionX, float fMinPositionY, float fMinPositionZ, float fMaxPositionX, float fMaxPositionY, float fMaxPositionZ, int iDimensionX, int iDimensionY, int iDimensionZ, const float *pfData)
 Create a mapping of given size and reserve the appropriate amount of memory. More...
 
virtual bool Destroy ()
 Destroys this mapping volume if one has been created. Resets all internal variables. More...
 
virtual unsigned GetByteCount () const
 Gets the number of bytes of the mapping volume. More...
 
virtual float * GetDataPtr ()
 Return the pointer to the mapping data. More...
 
virtual const float * GetDataPtr () const
 Return the constant pointer to the mapping data. More...
 
virtual bool IsValid () const
 Query if this mapping volume is valid. More...
 
float & operator() (float fPointX, float fPointY, float fPointZ)
 Function call operator. More...
 
CRxOctreeoperator= (const CRxOctree &xOctree)
 Assignment operator. Copies the contents of the given mapping. More...
 
CRxOctreeoperator= (CRxOctree &&xOctree)
 Move assignment operator. More...
 
bool Set (const float *pfData)
 Copies the content of the given mapping data into this mapping. More...
 
void SetZero ()
 Sets the mapping to zero zero. More...
 

Public Attributes

float m_fCellSizeX
 The cell size in x direction. More...
 
float m_fCellSizeY
 The cell size in y direction. More...
 
float m_fCellSizeZ
 The cell size in z direction. More...
 
float m_fMaxPositionX
 The max position x component. More...
 
float m_fMaxPositionY
 The max position y component. More...
 
float m_fMaxPositionZ
 The max position z component. More...
 
float m_fMinPositionX
 The min position x component. More...
 
float m_fMinPositionY
 The min position y component. More...
 
float m_fMinPositionZ
 The min position z component. More...
 
int m_iDimensionX
 The dimension x component. More...
 
int m_iDimensionY
 The dimension y component. More...
 
int m_iDimensionZ
 The dimension z component. More...
 
float * m_pfData
 The depth correction volume data. More...
 

Constructor & Destructor Documentation

◆ CRxOctree() [1/3]

Rx::CRxOctree::CRxOctree ( )

Default constructor. Creates an invalid mapping without using any memory.

◆ CRxOctree() [2/3]

Rx::CRxOctree::CRxOctree ( const CRxOctree xOctree)

Copy constructor. Creates a copy of the given image.

Parameters
xMappingThe mapping to copy.

◆ CRxOctree() [3/3]

Rx::CRxOctree::CRxOctree ( CRxOctree &&  xOctree)

Move constructor.

Parameters
xMapping[in] The mapping to move. This is invalid after the call.

◆ ~CRxOctree()

virtual Rx::CRxOctree::~CRxOctree ( )
virtual

Destructor. All used memory is freed.

Member Function Documentation

◆ Contains()

bool Rx::CRxOctree::Contains ( float  fPointX,
float  fPointY,
float  fPointZ 
)

Query if this object contains the given fPointX.

Parameters
fPointXThe point x coordinate.
fPointYThe point y coordinate.
fPointZThe point z coordinate.
Returns
True if the object is in this collection, false if not.

◆ Create() [1/3]

void Rx::CRxOctree::Create ( const CRxOctree xOctree)

Creates a copy of the given mapping. Only (re)allocates memory if required.

Parameters
xMappingThe mapping to copy.

◆ Create() [2/3]

void Rx::CRxOctree::Create ( CRxOctree &&  xOctree)

Creates this mapping by moving the data of the given mapping into this mapping.

Parameters
xMapping[in,out] The mapping to move. Is invalid after this call.

◆ Create() [3/3]

bool Rx::CRxOctree::Create ( float  fMinPositionX,
float  fMinPositionY,
float  fMinPositionZ,
float  fMaxPositionX,
float  fMaxPositionY,
float  fMaxPositionZ,
int  iDimensionX,
int  iDimensionY,
int  iDimensionZ,
const float *  pfData 
)

Create a mapping of given size and reserve the appropriate amount of memory.

Parameters
fMinPositionXThe min position X.
fMinPositionYThe min position Y.
fMinPositionZThe min position Z.
fMaxPositionXThe max position X.
fMaxPositionYThe max position Y.
fMaxPositionZThe max position Z.
iDimensionXThe X dimension.
iDimensionYThe Y dimension.
iDimensionZThe Z dimension.
pfDataInformation describing the mapping volume.
Returns
True if it succeeds, false if it fails.

◆ Destroy()

virtual bool Rx::CRxOctree::Destroy ( )
virtual

Destroys this mapping volume if one has been created. Resets all internal variables.

Returns
True if it succeeds, false if it fails.

◆ GetByteCount()

virtual unsigned Rx::CRxOctree::GetByteCount ( ) const
inlinevirtual

Gets the number of bytes of the mapping volume.

Returns
The byte count.

◆ GetDataPtr() [1/2]

virtual float* Rx::CRxOctree::GetDataPtr ( )
inlinevirtual

Return the pointer to the mapping data.

Returns
Null if it fails, else the data pointer.

◆ GetDataPtr() [2/2]

virtual const float* Rx::CRxOctree::GetDataPtr ( ) const
inlinevirtual

Return the constant pointer to the mapping data.

Returns
Null if it fails, else the data pointer.

◆ IsValid()

virtual bool Rx::CRxOctree::IsValid ( ) const
inlinevirtual

Query if this mapping volume is valid.

Returns
True if valid, false if not.

◆ operator()()

float& Rx::CRxOctree::operator() ( float  fPointX,
float  fPointY,
float  fPointZ 
)
inline

Function call operator.

Parameters
fPointXThe position of the x cell.
fPointYThe position of the y cell.
fPointZThe position of the z cell.
Returns
The result of the operation.

◆ operator=() [1/2]

CRxOctree& Rx::CRxOctree::operator= ( const CRxOctree xOctree)

Assignment operator. Copies the contents of the given mapping.

Parameters
xMappingThe mapping.
Returns
A shallow copy of this object.

◆ operator=() [2/2]

CRxOctree& Rx::CRxOctree::operator= ( CRxOctree &&  xOctree)

Move assignment operator.

Parameters
xMapping[in] The mapping to move. This is invalid after the call.
Returns
A shallow copy of this object.

◆ Set()

bool Rx::CRxOctree::Set ( const float *  pfData)

Copies the content of the given mapping data into this mapping.

Parameters
pfDataThe mapping volume data to copy.
Returns
True if it succeeds, false if it fails.

◆ SetZero()

void Rx::CRxOctree::SetZero ( )

Sets the mapping to zero zero.

Member Data Documentation

◆ m_fCellSizeX

float Rx::CRxOctree::m_fCellSizeX

The cell size in x direction.

◆ m_fCellSizeY

float Rx::CRxOctree::m_fCellSizeY

The cell size in y direction.

◆ m_fCellSizeZ

float Rx::CRxOctree::m_fCellSizeZ

The cell size in z direction.

◆ m_fMaxPositionX

float Rx::CRxOctree::m_fMaxPositionX

The max position x component.

◆ m_fMaxPositionY

float Rx::CRxOctree::m_fMaxPositionY

The max position y component.

◆ m_fMaxPositionZ

float Rx::CRxOctree::m_fMaxPositionZ

The max position z component.

◆ m_fMinPositionX

float Rx::CRxOctree::m_fMinPositionX

The min position x component.

◆ m_fMinPositionY

float Rx::CRxOctree::m_fMinPositionY

The min position y component.

◆ m_fMinPositionZ

float Rx::CRxOctree::m_fMinPositionZ

The min position z component.

◆ m_iDimensionX

int Rx::CRxOctree::m_iDimensionX

The dimension x component.

◆ m_iDimensionY

int Rx::CRxOctree::m_iDimensionY

The dimension y component.

◆ m_iDimensionZ

int Rx::CRxOctree::m_iDimensionZ

The dimension z component.

◆ m_pfData

float* Rx::CRxOctree::m_pfData

The depth correction volume data.