Euclid
Geometry Processing and Shape Analysis in C++
Euclid::ViewSphere< Mesh > Class Template Reference

View sphere around a mesh. More...

#include <ViewSphere.h>

Public Types

using Point_3 = Point_3_t< Mesh >
 
using FT = FT_t< Mesh >
 

Static Public Member Functions

static ViewSphere< Mesh > make_subdiv (const Mesh &mesh, FT scale=3.0, int subdiv=4)
 Build a view sphere using subdivision. More...
 
static ViewSphere< Mesh > make_random (const Mesh &mesh, FT scale=3.0, int samples=1000)
 Build a view sphere using uniform distributed random points. More...
 

Public Attributes

Mesh mesh
 The mesh data structure of the sphere.
 
Point_3 center
 The center of the sphere.
 
FT radius
 Radius of the sphere.
 
FT scale
 The scale of the view sphere's radius relative to the minimum bounding sphere of the target mesh.
 

Detailed Description

template<typename Mesh>
class Euclid::ViewSphere< Mesh >

Within this package, the center of the view sphere is located at the center of the bounding box of the mesh, and the radius of the view sphere is equal to the length of diagonal length of the bounding box.

Member Function Documentation

template<typename Mesh >
ViewSphere< Mesh > Euclid::ViewSphere< Mesh >::make_random ( const Mesh &  mesh,
FT  scale = 3.0,
int  samples = 1000 
)
static

Randomly generating points uniformly on a sphere. A user can set the desired number of sample points, but the triangulated sphere is not as regular as a subdivision sphere.

Parameters
meshThe target mesh object.
scaleThe scale of the view sphere's radius, by 1.0 the sphere equals to the minimum bounding sphere of the mesh.
samplesThe number of random sample points.
template<typename Mesh >
ViewSphere< Mesh > Euclid::ViewSphere< Mesh >::make_subdiv ( const Mesh &  mesh,
FT  scale = 3.0,
int  subdiv = 4 
)
static

The subdivision sphere is pretty regular, but you can't set a specific number of samples, but rather use the number of iterations of subdivision to control the coarseness of the sphere.

Parameters
meshThe target mesh object.
scaleThe scale of the view sphere's radius, by 1.0 the sphere equals to the minimum bounding sphere of the mesh.
subdivThe iterations of subdivision.

The documentation for this class was generated from the following files: