QtSculptor  v1.0.0
PutVoxel Class Reference

Concrete class PutVoxel - Used to display a single voxel. More...

#include <PutVoxel.h>

Inheritance diagram for PutVoxel:
GeometricFigure

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
 

Detailed Description

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.

Parameters
xRepresents the coordinate on the x axis of the voxel;
yRepresents the coordinate on the y axis of the voxel;
zRepresents the coordinate on the z axis of the voxel;

It inherits directly from the GeometricFigure abstract class.

Constructor & Destructor Documentation

◆ PutVoxel()

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.

Parameters
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;

◆ ~PutVoxel()

PutVoxel::~PutVoxel ( )
inline

Destructor of the PutVoxel class.

Acts as the default destructor;

Member Function Documentation

◆ draw()

void PutVoxel::draw ( Sculptor sculptor)
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.

Parameters
sculptorinstance of the Sculptor class;

Implements GeometricFigure.

Member Data Documentation

◆ x

int PutVoxel::x
private

x axis voxel coordinate.

◆ y

int PutVoxel::y
private

y axis voxel coordinate.

◆ z

int PutVoxel::z
private

z axis voxel coordinate.


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