ug4
ug::SphereProjector Class Reference

Projects new vertices onto a sphere during refinement. More...

#include <sphere_projector.h>

+ Inheritance diagram for ug::SphereProjector:

Public Member Functions

const vector3center () const
 
number influence_radius () const
 
virtual number new_vertex (Vertex *vrt, Edge *parent)
 called when a new vertex was created from an old edge. More...
 
virtual number new_vertex (Vertex *vrt, Face *parent)
 called when a new vertex was created from an old face. More...
 
virtual number new_vertex (Vertex *vrt, Volume *parent)
 called when a new vertex was created from an old volume. More...
 
number radius () const
 
void set_center (const vector3 &center)
 
void set_influence_radius (number influenceRadius)
 
void set_radius (number radius)
 
 SphereProjector ()
 
template<class TGeomProvider >
 SphereProjector (const TGeomProvider &geometry, const vector3 &center, number radius, number influenceRadius)
 
 SphereProjector (const vector3 &center)
 
 SphereProjector (const vector3 &center, number radius)
 
 SphereProjector (const vector3 &center, number radius, number influenceRadius)
 
 SphereProjector (SPIGeometry3d geometry, const vector3 &center)
 
 SphereProjector (SPIGeometry3d geometry, const vector3 &center, number radius)
 
virtual ~SphereProjector ()
 
- Public Member Functions inherited from ug::RefinementProjector
virtual SPIGeometry3d geometry () const
 
virtual number new_vertex (Vertex *vrt, Vertex *parent)
 called when a new vertex was created from an old vertex. More...
 
virtual void refinement_begins (const ISubGrid *sg)
 called before refinement begins More...
 
virtual bool refinement_begins_requires_subgrid () const
 
virtual void refinement_ends ()
 called when refinement is done More...
 
 RefinementProjector ()
 
 RefinementProjector (SPElementCallback cb)
 
 RefinementProjector (SPIGeometry3d geometry)
 
 RefinementProjector (SPIGeometry3d geometry, SPElementCallback concernedElems)
 
virtual void set_concerned_elements (SPElementCallback cb)
 
virtual void set_geometry (SPIGeometry3d geometry)
 
virtual ~RefinementProjector ()
 

Private Member Functions

template<class TElem >
number perform_projection (Vertex *vrt, TElem *parent)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

vector3 m_center
 
number m_influenceRadius
 
number m_radius
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Member Functions inherited from ug::RefinementProjector
IGeometry3dgeom ()
 
const IGeometry3dgeom () const
 
template<class TElem >
bool is_concerned (TElem *e)
 
vector3 pos (Vertex *v) const
 
void set_pos (Vertex *v, const vector3 &p)
 

Detailed Description

Projects new vertices onto a sphere during refinement.

For projection during refinement the radius property is ignored. Instead the distance to the center of a newly inserted vertex is calculated as the average distance of the vertices of the parent element to the center. The radius property thus defaults to -1.

You may still specify a radius. This radius can be used for auto-fitting of the center and for reprojecting a set of vertices onto the sphere.

Constructor & Destructor Documentation

◆ SphereProjector() [1/7]

ug::SphereProjector::SphereProjector ( )
inline

◆ SphereProjector() [2/7]

ug::SphereProjector::SphereProjector ( const vector3 center)
inline

◆ SphereProjector() [3/7]

ug::SphereProjector::SphereProjector ( const vector3 center,
number  radius 
)
inline

◆ SphereProjector() [4/7]

ug::SphereProjector::SphereProjector ( const vector3 center,
number  radius,
number  influenceRadius 
)
inline

◆ SphereProjector() [5/7]

ug::SphereProjector::SphereProjector ( SPIGeometry3d  geometry,
const vector3 center 
)
inline

◆ SphereProjector() [6/7]

ug::SphereProjector::SphereProjector ( SPIGeometry3d  geometry,
const vector3 center,
number  radius 
)
inline

◆ SphereProjector() [7/7]

template<class TGeomProvider >
ug::SphereProjector::SphereProjector ( const TGeomProvider &  geometry,
const vector3 center,
number  radius,
number  influenceRadius 
)
inline

◆ ~SphereProjector()

virtual ug::SphereProjector::~SphereProjector ( )
inlinevirtual

Member Function Documentation

◆ center()

const vector3& ug::SphereProjector::center ( ) const
inline

References m_center.

Referenced by set_center().

◆ influence_radius()

number ug::SphereProjector::influence_radius ( ) const
inline

References m_influenceRadius.

◆ new_vertex() [1/3]

virtual number ug::SphereProjector::new_vertex ( Vertex vrt,
Edge parent 
)
inlinevirtual

called when a new vertex was created from an old edge.

Reimplemented from ug::RefinementProjector.

References perform_projection().

◆ new_vertex() [2/3]

virtual number ug::SphereProjector::new_vertex ( Vertex vrt,
Face parent 
)
inlinevirtual

called when a new vertex was created from an old face.

Reimplemented from ug::RefinementProjector.

References perform_projection().

◆ new_vertex() [3/3]

virtual number ug::SphereProjector::new_vertex ( Vertex vrt,
Volume parent 
)
inlinevirtual

called when a new vertex was created from an old volume.

Reimplemented from ug::RefinementProjector.

References perform_projection().

◆ perform_projection()

template<class TElem >
number ug::SphereProjector::perform_projection ( Vertex vrt,
TElem *  parent 
)
inlineprivate

◆ radius()

number ug::SphereProjector::radius ( ) const
inline

References m_radius.

Referenced by set_radius().

◆ serialize()

template<class Archive >
void ug::SphereProjector::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

◆ set_center()

void ug::SphereProjector::set_center ( const vector3 center)
inline

References center(), and m_center.

◆ set_influence_radius()

void ug::SphereProjector::set_influence_radius ( number  influenceRadius)
inline

References m_influenceRadius.

◆ set_radius()

void ug::SphereProjector::set_radius ( number  radius)
inline

References m_radius, and radius().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ m_center

vector3 ug::SphereProjector::m_center
private

◆ m_influenceRadius

number ug::SphereProjector::m_influenceRadius
private

◆ m_radius

number ug::SphereProjector::m_radius
private

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