Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CGeoBlock.hpp
Go to the documentation of this file.
1#ifndef LIBS_SHAPES_CGEOBLOCK_HPP_
2#define LIBS_SHAPES_CGEOBLOCK_HPP_
3
4#include "math/structs.hpp"
5#include "ui/shapes/CMesh.hpp"
6
7#include <cstdint>
8#include <string>
9#include <vector>
10
12{
13public:
14 explicit CGeoBlock(std::string nameBlock = "");
15 CGeoBlock(const CGeoBlock &geoBlock);
16 virtual ~CGeoBlock();
17
18 bool operator==(const CGeoBlock &b) const;
19
20 void addClosingPointShape3D(std::vector<std::vector<iv::math::geometry::Point3d>> *frames) const;
21 void addHatch(std::vector<std::shared_ptr<std::vector<iv::math::geometry::Point3d>>> *contours);
22 void addPolyline(std::shared_ptr<std::vector<iv::math::geometry::Point3d>> polyline);
23 void addPolylineAsHatch(const std::shared_ptr<std::vector<iv::math::geometry::Point3d>> &polyline);
24
25 void applyMatrixTransformation(const CMatrix4x4 &matrixTransformation) const;
26
27 void drawContours(IGraphics *graphics) const;
28 void drawFilled(IGraphics *graphics) const;
29 void drawFilledPercentage(double percentage, IGraphics *graphics) const;
30
31 bool getLimits(double *xMinOpt, double *yMinOpt, double *zMinOpt, double *xMaxOpt, double *yMaxOpt,
32 double *zMaxOpt) const;
33 [[nodiscard]] std::string getNameBlock() const;
34 [[nodiscard]] std::vector<std::vector<iv::math::geometry::Point2d>> getPolylines2D() const;
35
36 [[nodiscard]] bool isGeoBlock(const std::string &nameBlock) const;
37 [[nodiscard]] bool isPointInside(double x, double y) const;
38
39private:
41 {
44 };
45
47 {
50 std::shared_ptr<std::vector<iv::math::geometry::Point3d>> polyline, const CMesh &mesh);
52
53 bool operator==(const SPrvEntityGeoBlock &b) const;
54
56
57 std::shared_ptr<std::vector<iv::math::geometry::Point3d>> m_pointsOpt;
59 };
60
61 static void prvCalculateLimitEntity(const SPrvEntityGeoBlock *entity, double &xMinEntity, double &yMinEntity,
62 double &zMinEntity, double &xMaxEntity, double &yMaxEntity, double &zMaxEntity);
63 void prvDrawPolylines(IGraphics *graphics) const;
64
65 std::string m_nameBlock;
66 std::vector<SPrvEntityGeoBlock *> m_entities;
67};
68
69#endif /* LIBS_SHAPES_CGEOBLOCK_HPP_ */
Definition CGeoBlock.hpp:12
EEntityGeoBlockType
Definition CGeoBlock.hpp:41
bool isGeoBlock(const std::string &nameBlock) const
Definition CGeoBlock.cpp:317
void drawFilled(IGraphics *graphics) const
Definition CGeoBlock.cpp:162
std::vector< SPrvEntityGeoBlock * > m_entities
Definition CGeoBlock.hpp:66
bool operator==(const CGeoBlock &b) const
Definition CGeoBlock.cpp:27
void addClosingPointShape3D(std::vector< std::vector< iv::math::geometry::Point3d > > *frames) const
Definition CGeoBlock.cpp:32
bool isPointInside(double x, double y) const
Definition CGeoBlock.cpp:322
static void prvCalculateLimitEntity(const SPrvEntityGeoBlock *entity, double &xMinEntity, double &yMinEntity, double &zMinEntity, double &xMaxEntity, double &yMaxEntity, double &zMaxEntity)
Definition CGeoBlock.cpp:186
std::string m_nameBlock
Definition CGeoBlock.hpp:65
std::vector< std::vector< iv::math::geometry::Point2d > > getPolylines2D() const
Definition CGeoBlock.cpp:300
void prvDrawPolylines(IGraphics *graphics) const
Definition CGeoBlock.cpp:116
CGeoBlock(std::string nameBlock="")
Definition CGeoBlock.cpp:13
virtual ~CGeoBlock()
std::string getNameBlock() const
Definition CGeoBlock.cpp:295
bool getLimits(double *xMinOpt, double *yMinOpt, double *zMinOpt, double *xMaxOpt, double *yMaxOpt, double *zMaxOpt) const
Definition CGeoBlock.cpp:267
void addHatch(std::vector< std::shared_ptr< std::vector< iv::math::geometry::Point3d > > > *contours)
Definition CGeoBlock.cpp:62
void addPolyline(std::shared_ptr< std::vector< iv::math::geometry::Point3d > > polyline)
Definition CGeoBlock.cpp:72
void drawContours(IGraphics *graphics) const
Definition CGeoBlock.cpp:138
void applyMatrixTransformation(const CMatrix4x4 &matrixTransformation) const
Definition CGeoBlock.cpp:93
void drawFilledPercentage(double percentage, IGraphics *graphics) const
Definition CGeoBlock.cpp:219
void addPolylineAsHatch(const std::shared_ptr< std::vector< iv::math::geometry::Point3d > > &polyline)
Definition CGeoBlock.cpp:81
Definition CMatrix4x4.hpp:23
Definition CMesh.hpp:11
Definition IGraphics.hpp:20
Definition CGeoBlock.hpp:47
SPrvEntityGeoBlock()
Definition CGeoBlock.cpp:351
EEntityGeoBlockType m_type
Definition CGeoBlock.hpp:55
std::shared_ptr< std::vector< iv::math::geometry::Point3d > > m_pointsOpt
Definition CGeoBlock.hpp:57
bool operator==(const SPrvEntityGeoBlock &b) const
Definition CGeoBlock.cpp:374
CMesh m_meshOpt
Definition CGeoBlock.hpp:58
~SPrvEntityGeoBlock()
Definition CGeoBlock.cpp:366