QtSculptor  v1.0.0
Sculptor.h
Go to the documentation of this file.
1 #ifndef SCULPTOR_H
2 #define SCULPTOR_H
3 
4 #include <iostream>
5 #include <fstream>
6 
7 #include "vector"
8 #include "Voxel.h"
12  enum{ XY, YZ, ZX };
13 
17  class Sculptor {
18  protected:
19  Voxel ***v;
21  int nx;
22  int ny;
23  int nz;
25  float r;
26  float g;
27  float b;
28  float a;
30  public:
31 
33 
45  Sculptor(int _nx, int _ny, int _nz);
46 
48 
52  ~Sculptor();
53 
55 
66  void setColor(float r, float g, float b, float alpha);
67 
69 
80  void putVoxel(int x, int y, int z);
81 
83 
93  void cutVoxel(int x, int y, int z);
94 
96 
104  void writeOFF(std::string filename);
106 
113  std::vector<std::vector<Voxel>> readMx(int dimension = 0, int plan = XY);
115 
118  void clearAll();
119  };
120 
121 #endif // SCULPTOR_H
Sculptor::nx
int nx
Definition: Sculptor.h:21
Sculptor::readMx
std::vector< std::vector< Voxel > > readMx(int dimension=0, int plan=XY)
ReadMx member function.
Definition: Sculptor.cpp:137
Sculptor::cutVoxel
void cutVoxel(int x, int y, int z)
CutVoxel member function.
Definition: Sculptor.cpp:60
Sculptor::g
float g
Definition: Sculptor.h:26
Sculptor::writeOFF
void writeOFF(std::string filename)
Write OFF member function.
Definition: Sculptor.cpp:65
Sculptor::ny
int ny
Definition: Sculptor.h:22
Voxel
Struct Voxel (volume element) used to store properties of the elements that will constitute the creat...
Definition: Voxel.h:9
Sculptor::clearAll
void clearAll()
clearAll member function.
Definition: Sculptor.cpp:22
Sculptor::Sculptor
Sculptor(int _nx, int _ny, int _nz)
Class constructor.
Definition: Sculptor.cpp:7
Sculptor::nz
int nz
Definition: Sculptor.h:23
Voxel.h
ZX
@ ZX
Definition: Sculptor.h:12
Sculptor::setColor
void setColor(float r, float g, float b, float alpha)
Member function setColor.
Definition: Sculptor.cpp:42
Sculptor::putVoxel
void putVoxel(int x, int y, int z)
Member function putVoxel.
Definition: Sculptor.cpp:49
Sculptor::v
Voxel *** v
Definition: Sculptor.h:19
Sculptor::b
float b
Definition: Sculptor.h:27
Sculptor::r
float r
Definition: Sculptor.h:25
Sculptor::a
float a
Definition: Sculptor.h:28
Sculptor
Sculptor class for manipulating elements, denoted voxels, in arrays three-dimensional digital.
Definition: Sculptor.h:17
Sculptor::~Sculptor
~Sculptor()
Class Destructor.
Definition: Sculptor.cpp:32
YZ
@ YZ
Definition: Sculptor.h:12
XY
@ XY
Definition: Sculptor.h:12