QtSculptor
v1.0.0
|
Concrete class PutBox - Used to display a block of voxels. More...
#include <PutBox.h>
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 |
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.
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; |
It inherits directly from the abstract class GeometricFigure.
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.
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; |
|
inline |
Destructor of the PutBox class.
Acts as the default destructor;
|
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.
sculptor | instance of the Sculptor class; |
Implements GeometricFigure.
|
private |
Final box coordinate on the x axis.
|
private |
Initial coordinate of the box on the x axis.
|
private |
Final box coordinate on the y axis.
|
private |
Initial coordinate of the box on the y axis.
|
private |
Final box coordinate on the z axis.
|
private |
Initial coordinate of the box on the z axis.