45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#ifndef COIL_SEGMENT_HPP
|
|
#define COIL_SEGMENT_HPP
|
|
|
|
#include <cstdint>
|
|
|
|
// x, y, z, r, g, b
|
|
#define FIELDS_IN_POINT 6
|
|
|
|
class Coil;
|
|
|
|
class CoilSegment {
|
|
Coil *coil;
|
|
uint16_t year;
|
|
uint16_t height;
|
|
// Number of a segments, counting from the central (which is 0)
|
|
int shift;
|
|
uint32_t sliceDetailization;
|
|
uint32_t slicePointsAmount;
|
|
bool leap;
|
|
float *vertices;
|
|
uint64_t verticesLength;
|
|
|
|
void init();
|
|
float* calculateSlice();
|
|
void constructSegment(float *slice);
|
|
|
|
public:
|
|
CoilSegment(Coil* coil, uint16_t year, uint16_t height, int shift, uint32_t sliceDetalization);
|
|
void calculate();
|
|
void printVertices();
|
|
float *getVertices();
|
|
uint64_t getVerticesLength();
|
|
uint64_t getVerticesAmount();
|
|
void printSlice(float *slice);
|
|
void exportSliceToCSV(float *slice);
|
|
void exportSegmentToCsv();
|
|
uint16_t getYear();
|
|
|
|
uint16_t getDaysAmount();
|
|
bool const isLeap();
|
|
uint32_t getSliceDetailization();
|
|
uint32_t getSlicePointsAmount();
|
|
};
|
|
|
|
#endif // COIL_SEGMENT_HPP
|