Euclid
Geometry Processing and Shape Analysis in C++
ViewSphere.h
1 #pragma once
2 
3 #include <vector>
4 #include <Euclid/MeshUtil/MeshDefs.h>
5 
6 namespace Euclid
7 {
16 template<typename Mesh>
18 {
19 public:
20  using Point_3 = Point_3_t<Mesh>;
21  using FT = FT_t<Mesh>;
22 
23 public:
35  static ViewSphere<Mesh> make_subdiv(const Mesh& mesh,
36  FT scale = 3.0,
37  int subdiv = 4);
38 
50  static ViewSphere<Mesh> make_random(const Mesh& mesh,
51  FT scale = 3.0,
52  int samples = 1000);
53 
54 public:
58  Mesh mesh;
59 
63  Point_3 center;
64 
68  FT radius;
69 
74  FT scale;
75 
76 private:
77  using Kernel = Kernel_t<Mesh>;
78 };
79 
81 } // namespace Euclid
82 
83 #include "src/ViewSphere.cpp"
FT radius
Radius of the sphere.
Definition: ViewSphere.h:68
Point_3 center
The center of the sphere.
Definition: ViewSphere.h:63
static ViewSphere< Mesh > make_random(const Mesh &mesh, FT scale=3.0, int samples=1000)
Build a view sphere using uniform distributed random points.
Definition: ViewSphere.cpp:41
View sphere around a mesh.
Definition: ViewSphere.h:17
FT scale
The scale of the view sphere&#39;s radius relative to the minimum bounding sphere of the target mesh...
Definition: ViewSphere.h:74
Definition: AABB.h:6
static ViewSphere< Mesh > make_subdiv(const Mesh &mesh, FT scale=3.0, int subdiv=4)
Build a view sphere using subdivision.
Definition: ViewSphere.cpp:13
Mesh mesh
The mesh data structure of the sphere.
Definition: ViewSphere.h:58