QtSculptor  v1.0.0
PutSphere Class Reference

Concrete class PutSphere - Used to display a set of voxels belonging to a spherical volume. More...

#include <PutSphere.h>

Inheritance diagram for PutSphere:
GeometricFigure

Public Member Functions

 PutSphere (int x_center_, int y_center_, int z_center_, int radius_, float r_, float g_, float b_, float a_)
 PutSphere class constructor. More...
 
 ~PutSphere ()
 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 x_center
 
int y_center
 
int z_center
 
int radius
 

Additional Inherited Members

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

Detailed Description

Concrete class PutSphere - Used to display a set of voxels belonging to a spherical volume.

It will inform the system that all voxels, present in a certain spherical 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
x_centerRepresents a coordinate on the x axis belonging to the voxel matrix that denotes the center of the sphere to be created;
y_centerRepresents a coordinate on the y axis belonging to the voxel matrix that denotes the center of the sphere to be created;
z_centerRepresents a coordinate on the z axis belonging to the voxel matrix that denotes the center of the sphere to be created;
radiusRepresents the radius of the sphere to be created, in the three dimensions, x, y and z;

It inherits directly from the GeometricFigure abstract class.

Constructor & Destructor Documentation

◆ PutSphere()

PutSphere::PutSphere ( int  x_center_,
int  y_center_,
int  z_center_,
int  radius_,
float  r_,
float  g_,
float  b_,
float  a_ 
)

PutSphere class constructor.

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

Parameters
x_center_Central coordinate of the sphere on the x axis;
y_center_Central coordinate of the sphere on the y axis;
z_center_Central coordinate of the sphere on the z axis;
radius_Raio da esfera nas três dimensões;
r_Represents a red component of the color the sphere will be painted;
g_Represents a green component of the color the sphere will be painted;
b_Represents a blue component of the color the sphere will be painted;
a_Represents the transparency component of the color that the painted sphere;

◆ ~PutSphere()

PutSphere::~PutSphere ( )
inline

Destructor of the PutBox class.

Acts as the default destructor;

Member Function Documentation

◆ draw()

void PutSphere::draw ( Sculptor sculptor)
virtual

Member function draw.

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

Parameters
sculptorinstância da classe Escultor;

Implements GeometricFigure.

Member Data Documentation

◆ radius

int PutSphere::radius
private

Raio da esfera nas três dimensões.

◆ x_center

int PutSphere::x_center
private

Central coordinate of the sphere on the x axis.

◆ y_center

int PutSphere::y_center
private

Central coordinate of the sphere on the y axis.

◆ z_center

int PutSphere::z_center
private

Central coordinate of the sphere on the z axis.


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