QtSculptor  v1.0.0
CutBox Class Reference

Concrete class CutBox - Used to delete a block of voxels. More...

#include <CutBox.h>

Inheritance diagram for CutBox:
GeometricFigure

Public Member Functions

 CutBox (int xi_, int xf_, int yi_, int yf_, int zi_, int zf_)
 CutBox class constructor. More...
 
 ~CutBox ()
 CutBox class destructor. More...
 
void draw (Sculptor &sculptor)
 Member function draw. More...
 
- Public Member Functions inherited from GeometricFigure
virtual ~GeometricFigure ()
 GeometricFigure class constructor. More...
 

Private Attributes

int xi
 
int xf
 
int yi
 
int yf
 
int zi
 
int zf
 

Additional Inherited Members

- Protected Attributes inherited from GeometricFigure
float r
 
float g
 
float b
 
float a
 

Detailed Description

Concrete class CutBox - Used to delete a block of voxels.

It will inform the system that all voxels present in a given cubic region and belonging to the space of the three-dimensional array of voxels allocated by an instance of the Sculptor class, must be deleted.

Parameters
xiRepresents a coordinate on the x axis belonging to the voxel matrix that denotes the beginning of the voxel range;
xfRepresents a coordinate on the x axis belonging to the voxel matrix that denotes the end of the voxel range;
yiRepresents a coordinate on the y axis belonging to the voxel matrix that denotes the beginning of the voxel range;
yfRepresents a coordinate on the y axis belonging to the voxel matrix that denotes the end of the voxel range;
ziRepresents a coordinate on the z axis belonging to the voxel matrix that denotes the beginning of the voxel range;
zfRepresents a coordinate on the z axis belonging to the voxel matrix that denotes the end of the voxel range;

It inherits directly from the abstract class GeometricFigure.

Constructor & Destructor Documentation

◆ CutBox()

CutBox::CutBox ( int  xi_,
int  xf_,
int  yi_,
int  yf_,
int  zi_,
int  zf_ 
)

CutBox class constructor.

This constructor will receive as parameters the dimensional coordinates of the voxel box to be deleted and, with that, will construct an instance of the CutBox class.

Parameters
xi_Represents a coordinate on the x axis belonging to the voxel array that denotes the beginning of the voxel range;
xf_Represents a coordinate on the x axis belonging to the voxel array that denotes the end of the voxel range
yi_Represents a coordinate on the y axis belonging to the voxel array that denotes the beginning of the voxel range;
yf_Represents a coordinate on the y axis belonging to the voxel array that denotes the end of the voxel range
zi_Represents a coordinate on the z axis belonging to the voxel array that denotes the beginning of the voxel range;
zf_Represents a coordinate on the z axis belonging to the voxel array that denotes the end of the voxel range

◆ ~CutBox()

CutBox::~CutBox ( )
inline

CutBox class destructor.

Acts as default destructor;

Member Function Documentation

◆ draw()

void CutBox::draw ( Sculptor sculptor)
virtual

Member function draw.

Method that will delete, from an instance of the Sculptor class passed as a parameter, a box present in its array of voxels.

Parameters
sculptorinstance of the Sculptor class;;

Implements GeometricFigure.

Member Data Documentation

◆ xf

int CutBox::xf
private

Final coordinate of the box on the axis x.

◆ xi

int CutBox::xi
private

Initial coordinate of the box on the axis x.

◆ yf

int CutBox::yf
private

Final coordinate of the box on the axis y.

◆ yi

int CutBox::yi
private

Initial coordinate of the box on the axis y.

◆ zf

int CutBox::zf
private

Final coordinate of the box on the axis z.

◆ zi

int CutBox::zi
private

Initial coordinate of the box on the axis z.


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