ug4
ug::CylinderProjector Class Reference

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

#include <cylinder_projector.h>

+ Inheritance diagram for ug::CylinderProjector:

Public Member Functions

const vector3axis () const
 
const vector3center () const
 
 CylinderProjector ()
 
 CylinderProjector (const vector3 &center, const vector3 &axis)
 
 CylinderProjector (const vector3 &center, const vector3 &axis, number radius)
 
 CylinderProjector (const vector3 &center, const vector3 &axis, number radius, number influenceRadius)
 
 CylinderProjector (SPIGeometry3d geometry, const vector3 &center, const vector3 &axis, number radius, number influenceRadius)
 
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_axis (const vector3 &axis)
 
void set_center (const vector3 &center)
 
void set_influence_radius (number influenceRadius)
 
void set_radius (number radius)
 
virtual ~CylinderProjector ()
 
- 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_axis
 
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

◆ CylinderProjector() [1/5]

ug::CylinderProjector::CylinderProjector ( )
inline

◆ CylinderProjector() [2/5]

ug::CylinderProjector::CylinderProjector ( const vector3 center,
const vector3 axis 
)
inline

◆ CylinderProjector() [3/5]

ug::CylinderProjector::CylinderProjector ( const vector3 center,
const vector3 axis,
number  radius 
)
inline

◆ CylinderProjector() [4/5]

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

◆ CylinderProjector() [5/5]

ug::CylinderProjector::CylinderProjector ( SPIGeometry3d  geometry,
const vector3 center,
const vector3 axis,
number  radius,
number  influenceRadius 
)
inline

◆ ~CylinderProjector()

virtual ug::CylinderProjector::~CylinderProjector ( )
inlinevirtual

Member Function Documentation

◆ axis()

const vector3& ug::CylinderProjector::axis ( ) const
inline

References m_axis.

Referenced by set_axis().

◆ center()

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

References m_center.

Referenced by set_center().

◆ influence_radius()

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

References m_influenceRadius.

◆ new_vertex() [1/3]

virtual number ug::CylinderProjector::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::CylinderProjector::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::CylinderProjector::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::CylinderProjector::perform_projection ( Vertex vrt,
TElem *  parent 
)
inlineprivate

◆ radius()

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

References m_radius.

Referenced by set_radius().

◆ serialize()

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

◆ set_axis()

void ug::CylinderProjector::set_axis ( const vector3 axis)
inline

References axis(), and m_axis.

◆ set_center()

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

References center(), and m_center.

◆ set_influence_radius()

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

References m_influenceRadius.

◆ set_radius()

void ug::CylinderProjector::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_axis

vector3 ug::CylinderProjector::m_axis
private

◆ m_center

vector3 ug::CylinderProjector::m_center
private

◆ m_influenceRadius

number ug::CylinderProjector::m_influenceRadius
private

◆ m_radius

number ug::CylinderProjector::m_radius
private

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