QtSculptor
v1.0.0
|
Concrete class PutVoxel - Used to display a single voxel. More...
#include <PutVoxel.h>
Public Member Functions | |
PutVoxel (int x_, int y_, int z_, float r_, float g_, float b_, float a_) | |
PutVoxel class constructor. More... | |
~PutVoxel () | |
Destructor of the PutVoxel 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 | x |
int | y |
int | z |
Additional Inherited Members | |
Protected Attributes inherited from GeometricFigure | |
float | r |
float | g |
float | b |
float | a |
Concrete class PutVoxel - Used to display a single voxel.
It will inform the system that the voxel, present in a certain coordinate and belonging to the space of the three-dimensional array of voxels allocated by an instance of the Sculptor class, should be displayed.
x | Represents the coordinate on the x axis of the voxel; |
y | Represents the coordinate on the y axis of the voxel; |
z | Represents the coordinate on the z axis of the voxel; |
It inherits directly from the GeometricFigure abstract class.
PutVoxel::PutVoxel | ( | int | x_, |
int | y_, | ||
int | z_, | ||
float | r_, | ||
float | g_, | ||
float | b_, | ||
float | a_ | ||
) |
PutVoxel class constructor.
This constructor will receive as parameters the coordinates of the voxel box to be created, as well as its color and transparency. Therefore, will construct an instance of the PutVoxel class.
x_ | Represents the coordinate on the x axis of the voxel; |
y_ | Represents the coordinate on the y axis of the voxel; |
z_ | Represents the coordinate on the z axis of the voxel; |
r_ | Represents the red component of the color that the voxel will be painted; |
g_ | Represents the green component of the color that the voxel will be painted; |
b_ | Represents the blue component of the color that the voxel will be painted; |
a_ | Represents the transparency component of the color that the voxel will be painted on; |
|
inline |
Destructor of the PutVoxel 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 voxel in its array of voxels.
sculptor | instance of the Sculptor class; |
Implements GeometricFigure.
|
private |
x axis voxel coordinate.
|
private |
y axis voxel coordinate.
|
private |
z axis voxel coordinate.