QtSculptor  v1.0.0
CutSphere Class Reference

Concrete class CutSphere - Used to erase a set of voxels belonging to a spherical volume. More...

#include <CutSphere.h>

Inheritance diagram for CutSphere:
GeometricFigure

Public Member Functions

 CutSphere (int x_center_, int y_center_, int z_center_, int radius_)
 CutSphere class constructor. More...
 
 ~CutSphere ()
 Destructor of the CutSphere 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 CutSphere - Used to erase 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, must be deleted.

Parameters
x_centerRepresents a coordinate on the x axis belonging to the voxel matrix that denotes the center of the sphere to be deleted;
y_centerRepresents a coordinate on the y axis belonging to the voxel matrix that denotes the center of the sphere to be deleted;
z_centerRepresents a coordinate on the z axis belonging to the voxel matrix that denotes the center of the sphere to be deleted;
radiusRepresents the radius of the sphere to be deleted in three dimensions: x, y and z.

It inherits directly from the GeometricFigure abstract class.

Constructor & Destructor Documentation

◆ CutSphere()

CutSphere::CutSphere ( int  x_center_,
int  y_center_,
int  z_center_,
int  radius_ 
)

CutSphere class constructor.

This constructor will receive as parameters the dimensional coordinates of the voxel sphere to be deleted, thus, will construct an instance of the CutSphere class.

Parameters
x_center_Central coordinate of the sphere on the axis**x**;
y_center_Central coordinate of the sphere on the axis**y**;
z_center_Central coordinate of the sphere on the axis**z**;
radius_Sphere radius in three dimensions;

◆ ~CutSphere()

CutSphere::~CutSphere ( )
inline

Destructor of the CutSphere class.

Acts as the default destructor;

Member Function Documentation

◆ draw()

void CutSphere::draw ( Sculptor sculptor)
virtual

Member function draw.

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

Parameters
sculptorinstance of the Sculptor class;

Implements GeometricFigure.

Member Data Documentation

◆ radius

int CutSphere::radius
private

Sphere radius in three dimensions.

◆ x_center

int CutSphere::x_center
private

Central coordinate of the sphere on the axis**x**.

◆ y_center

int CutSphere::y_center
private

Central coordinate of the sphere on the axis**y**.

◆ z_center

int CutSphere::z_center
private

Central coordinate of the sphere on the axis**z**.


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