ug4
ug::EllipticCylinderProjector Class Reference

Projects new vertices onto a cylinder with an elliptic base. More...

#include <elliptic_cylinder_projector.h>

+ Inheritance diagram for ug::EllipticCylinderProjector:

Public Member Functions

const vector3center () const
 
const vector3cylinder_axis () const
 
const vector3ellipse_axis1 () const
 
const vector3ellipse_axis2 () const
 
 EllipticCylinderProjector ()
 
 EllipticCylinderProjector (const vector3 &center, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2)
 
 EllipticCylinderProjector (const vector3 &center, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2, number radius)
 
 EllipticCylinderProjector (const vector3 &center, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2, number radius, number influenceRadius)
 
 EllipticCylinderProjector (SPIGeometry3d geometry, const vector3 &center, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2, 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_center (const vector3 &center)
 
void set_cylinder_axis (const vector3 &axis)
 
void set_ellipse_axis1 (const vector3 &axis)
 
void set_ellipse_axis2 (const vector3 &axis)
 
void set_influence_radius (number influenceRadius)
 
void set_radius (number radius)
 
virtual ~EllipticCylinderProjector ()
 
- 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)
 
number radial_ellipse_coord (const vector3 &v)
 
number scale_point_to_radius (vector3 &vIO, number r)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

number m_a
 
number m_b
 
vector3 m_center
 
vector3 m_cylinder_axis
 
vector3 m_ellipse_axis1
 
vector3 m_ellipse_axis2
 
vector3 m_ellipseNormal
 
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 cylinder with an elliptic base.

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

◆ EllipticCylinderProjector() [1/5]

ug::EllipticCylinderProjector::EllipticCylinderProjector ( )

◆ EllipticCylinderProjector() [2/5]

ug::EllipticCylinderProjector::EllipticCylinderProjector ( const vector3 center,
const vector3 cylAxis,
const vector3 ellipseAxis1,
const vector3 ellipseAxis2 
)

◆ EllipticCylinderProjector() [3/5]

ug::EllipticCylinderProjector::EllipticCylinderProjector ( const vector3 center,
const vector3 cylAxis,
const vector3 ellipseAxis1,
const vector3 ellipseAxis2,
number  radius 
)

◆ EllipticCylinderProjector() [4/5]

ug::EllipticCylinderProjector::EllipticCylinderProjector ( const vector3 center,
const vector3 cylAxis,
const vector3 ellipseAxis1,
const vector3 ellipseAxis2,
number  radius,
number  influenceRadius 
)

◆ EllipticCylinderProjector() [5/5]

ug::EllipticCylinderProjector::EllipticCylinderProjector ( SPIGeometry3d  geometry,
const vector3 center,
const vector3 cylAxis,
const vector3 ellipseAxis1,
const vector3 ellipseAxis2,
number  radius,
number  influenceRadius 
)

◆ ~EllipticCylinderProjector()

ug::EllipticCylinderProjector::~EllipticCylinderProjector ( )
virtual

Member Function Documentation

◆ center()

const vector3 & ug::EllipticCylinderProjector::center ( ) const

References m_center.

Referenced by set_center().

◆ cylinder_axis()

const vector3 & ug::EllipticCylinderProjector::cylinder_axis ( ) const

References m_cylinder_axis.

◆ ellipse_axis1()

const vector3 & ug::EllipticCylinderProjector::ellipse_axis1 ( ) const

References m_ellipse_axis1.

◆ ellipse_axis2()

const vector3 & ug::EllipticCylinderProjector::ellipse_axis2 ( ) const

References m_ellipse_axis2.

◆ influence_radius()

number ug::EllipticCylinderProjector::influence_radius ( ) const

References m_influenceRadius.

◆ new_vertex() [1/3]

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

called when a new vertex was created from an old edge

Reimplemented from ug::RefinementProjector.

References perform_projection().

◆ new_vertex() [2/3]

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

called when a new vertex was created from an old face

Reimplemented from ug::RefinementProjector.

References perform_projection().

◆ new_vertex() [3/3]

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

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::EllipticCylinderProjector::perform_projection ( Vertex vrt,
TElem *  parent 
)
private

◆ radial_ellipse_coord()

number ug::EllipticCylinderProjector::radial_ellipse_coord ( const vector3 v)
private

◆ radius()

number ug::EllipticCylinderProjector::radius ( ) const

References m_radius.

Referenced by set_radius().

◆ scale_point_to_radius()

number ug::EllipticCylinderProjector::scale_point_to_radius ( vector3 vIO,
number  r 
)
private

◆ serialize()

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

◆ set_center()

void ug::EllipticCylinderProjector::set_center ( const vector3 center)

References center(), and m_center.

◆ set_cylinder_axis()

void ug::EllipticCylinderProjector::set_cylinder_axis ( const vector3 axis)

References m_cylinder_axis.

◆ set_ellipse_axis1()

void ug::EllipticCylinderProjector::set_ellipse_axis1 ( const vector3 axis)

◆ set_ellipse_axis2()

void ug::EllipticCylinderProjector::set_ellipse_axis2 ( const vector3 axis)

◆ set_influence_radius()

void ug::EllipticCylinderProjector::set_influence_radius ( number  influenceRadius)

References m_influenceRadius.

◆ set_radius()

void ug::EllipticCylinderProjector::set_radius ( number  radius)

References m_radius, and radius().

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ m_a

number ug::EllipticCylinderProjector::m_a
private

◆ m_b

number ug::EllipticCylinderProjector::m_b
private

◆ m_center

vector3 ug::EllipticCylinderProjector::m_center
private

◆ m_cylinder_axis

vector3 ug::EllipticCylinderProjector::m_cylinder_axis
private

◆ m_ellipse_axis1

◆ m_ellipse_axis2

◆ m_ellipseNormal

vector3 ug::EllipticCylinderProjector::m_ellipseNormal
private

◆ m_influenceRadius

number ug::EllipticCylinderProjector::m_influenceRadius
private

◆ m_radius

number ug::EllipticCylinderProjector::m_radius
private

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