QtSculptor  v1.0.0
PutBox Class Reference

Concrete class PutBox - Used to display a block of voxels. More...

#include <PutBox.h>

Inheritance diagram for PutBox:
GeometricFigure

Public Member Functions

 PutBox (int xi_, int xf_, int yi_, int yf_, int zi_, int zf_, float r_, float g_, float b_, float a_)
 PutBox class constructor. More...
 
 ~PutBox ()
 Destructor of the PutBox class. 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 PutBox - Used to display 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, it should be displayed.

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

◆ PutBox()

PutBox::PutBox ( int  xi_,
int  xf_,
int  yi_,
int  yf_,
int  zi_,
int  zf_,
float  r_,
float  g_,
float  b_,
float  a_ 
)

PutBox class constructor.

This constructor will receive as parameters the dimensional coordinates of the voxel box to be created, as well as its color and transparency. Therefore, will construct an instance of the PutBox class.

Parameters
xi_Represents a coordinate on the x axis belonging to the voxel matrix that denotes the beginning of the voxel range;
xf_Represents a coordinate on the x axis belonging to the voxel matrix that denotes the end of the voxel range;
yi_Represents a coordinate on the y axis belonging to the voxel matrix that denotes the beginning of the voxel range;
yf_Represents a coordinate on the y axis belonging to the voxel matrix that denotes the end of the voxel range;
zi_Represents a coordinate on the z axis belonging to the voxel matrix that denotes the beginning of the voxel range;
zf_Represents a coordinate on the z axis belonging to the voxel matrix that denotes the end of the voxel range;
r_Represents the red component of the color that the box will be painted;
g_Represents the green component of the color that the box will be painted
b_Represents the blue component of the color that the box will be painted
a_Represents the transparency component of the color that the box will be painted;

◆ ~PutBox()

PutBox::~PutBox ( )
inline

Destructor of the PutBox class.

Acts as the default destructor;

Member Function Documentation

◆ draw()

void PutBox::draw ( Sculptor sculptor)
virtual

Member function draw.

Method that will create, 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 PutBox::xf
private

Final box coordinate on the x axis.

◆ xi

int PutBox::xi
private

Initial coordinate of the box on the x axis.

◆ yf

int PutBox::yf
private

Final box coordinate on the y axis.

◆ yi

int PutBox::yi
private

Initial coordinate of the box on the y axis.

◆ zf

int PutBox::zf
private

Final box coordinate on the z axis.

◆ zi

int PutBox::zi
private

Initial coordinate of the box on the z axis.


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