1 #ifndef PMPL_GMS_POLYHEDRON_H_
2 #define PMPL_GMS_POLYHEDRON_H_
8 #include "Transformation.h"
11 #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
12 #include <CGAL/Polyhedron_3.h>
13 #include <CGAL/convex_hull_3.h>
28 class triangulated_model;
49 typedef CGAL::Exact_predicates_exact_constructions_kernel
CGALKernel;
101 void Scale(
double _scalingFactor);
118 Vector3d
Read(
const std::string& _fileName,
COMAdjust _comAdjust);
125 Vector3d LoadFromIModel(IModel* _imodel,
COMAdjust _comAdjust);
129 void WriteBYU(std::ostream& _os)
const;
133 void WriteObj(std::ostream& _os)
const;
139 std::vector<Vector3d>& GetVertexList() noexcept;
140 std::vector<
GMSPolygon>& GetPolygonList() noexcept;
142 const std::vector<Vector3d>& GetVertexList() const noexcept;
143 const std::vector<
GMSPolygon>& GetPolygonList() const noexcept;
146 const Vector3d& GetCentroid() const;
149 double GetSurfaceArea() const noexcept;
152 double GetMaxRadius() const noexcept;
155 double GetMinRadius() const noexcept;
162 Point3d GetRandPtOnSurface() const;
176 void UpdateCGALPoints();
184 RAPID_model* GetRapidModel() const noexcept;
188 PQP_Model* GetPQPModel() const noexcept;
192 const Vector3d& GetInsidePoint() const noexcept;
213 const
Range<
double>& _y, const
Range<
double>& _z);
223 void ComputeCentroid() const;
229 void ComputeSurfaceArea();
236 void ComputeInsidePoint();
242 std::vector<Vector3d> m_vertexList;
247 double m_maxRadius{0};
248 double m_minRadius{0};
251 mutable bool m_centroidCached{
false};
256 mutable std::unique_ptr<RAPID_model> m_rapidModel;
257 mutable std::unique_ptr<PQP_Model> m_pqpModel;
259 Vector3d m_insidePoint;
GMSPolyhedron operator*(const Transformation &_t, const GMSPolyhedron &_poly)
Definition: GMSPolyhedron.cpp:232
void Read(GenericStateGraph *_g, const std::string &_filename)
Definition: GenericStateGraph.h:1337
Definition: GMSPolygon.h:21
Definition: GMSPolyhedron.h:42
COMAdjust
Definition: GMSPolyhedron.h:65
CGAL::Exact_predicates_exact_constructions_kernel CGALKernel
Definition: GMSPolyhedron.h:49
CGALKernel::Point_3 CGALPoint
Definition: GMSPolyhedron.h:50
CGAL::Polyhedron_3< CGALKernel > CGALPolyhedron
Definition: GMSPolyhedron.h:51
A two or three dimensional bounding box in workspace.
Definition: WorkspaceBoundingBox.h:10
Definition: GMSPolyhedron.h:27
A range of numeric values.
Definition: Range.h:17