ug4
|
Projects new vertices onto a cylinder with an elliptic base. More...
#include <elliptic_cylinder_projector.h>
Public Member Functions | |
const vector3 & | center () const |
const vector3 & | cylinder_axis () const |
const vector3 & | ellipse_axis1 () const |
const vector3 & | ellipse_axis2 () const |
EllipticCylinderProjector () | |
EllipticCylinderProjector (const vector3 ¢er, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2) | |
EllipticCylinderProjector (const vector3 ¢er, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2, number radius) | |
EllipticCylinderProjector (const vector3 ¢er, const vector3 &cylAxis, const vector3 &ellipseAxis1, const vector3 &ellipseAxis2, number radius, number influenceRadius) | |
EllipticCylinderProjector (SPIGeometry3d geometry, const vector3 ¢er, 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 ¢er) |
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 | |
IGeometry3d & | geom () |
const IGeometry3d & | geom () const |
template<class TElem > | |
bool | is_concerned (TElem *e) |
vector3 | pos (Vertex *v) const |
void | set_pos (Vertex *v, const vector3 &p) |
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.
ug::EllipticCylinderProjector::EllipticCylinderProjector | ( | ) |
ug::EllipticCylinderProjector::EllipticCylinderProjector | ( | const vector3 & | center, |
const vector3 & | cylAxis, | ||
const vector3 & | ellipseAxis1, | ||
const vector3 & | ellipseAxis2 | ||
) |
References m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, and ug::VecCross().
ug::EllipticCylinderProjector::EllipticCylinderProjector | ( | const vector3 & | center, |
const vector3 & | cylAxis, | ||
const vector3 & | ellipseAxis1, | ||
const vector3 & | ellipseAxis2, | ||
number | radius | ||
) |
References m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, UG_LOGN, and ug::VecCross().
ug::EllipticCylinderProjector::EllipticCylinderProjector | ( | const vector3 & | center, |
const vector3 & | cylAxis, | ||
const vector3 & | ellipseAxis1, | ||
const vector3 & | ellipseAxis2, | ||
number | radius, | ||
number | influenceRadius | ||
) |
References m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, and ug::VecCross().
ug::EllipticCylinderProjector::EllipticCylinderProjector | ( | SPIGeometry3d | geometry, |
const vector3 & | center, | ||
const vector3 & | cylAxis, | ||
const vector3 & | ellipseAxis1, | ||
const vector3 & | ellipseAxis2, | ||
number | radius, | ||
number | influenceRadius | ||
) |
References m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, and ug::VecCross().
|
virtual |
const vector3 & ug::EllipticCylinderProjector::center | ( | ) | const |
References m_center.
Referenced by set_center().
const vector3 & ug::EllipticCylinderProjector::cylinder_axis | ( | ) | const |
References m_cylinder_axis.
const vector3 & ug::EllipticCylinderProjector::ellipse_axis1 | ( | ) | const |
References m_ellipse_axis1.
const vector3 & ug::EllipticCylinderProjector::ellipse_axis2 | ( | ) | const |
References m_ellipse_axis2.
number ug::EllipticCylinderProjector::influence_radius | ( | ) | const |
References m_influenceRadius.
called when a new vertex was created from an old edge
Reimplemented from ug::RefinementProjector.
References perform_projection().
called when a new vertex was created from an old face
Reimplemented from ug::RefinementProjector.
References perform_projection().
called when a new vertex was created from an old volume
Reimplemented from ug::RefinementProjector.
References perform_projection().
|
private |
References m_influenceRadius, m_radius, p, ug::RefinementProjector::pos(), radial_ellipse_coord(), scale_point_to_radius(), ug::RefinementProjector::set_pos(), and ug::VecScale().
Referenced by new_vertex().
References m_a, m_b, m_center, m_cylinder_axis, m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, ug::RayPlaneIntersection(), and ug::VecDot().
Referenced by perform_projection().
number ug::EllipticCylinderProjector::radius | ( | ) | const |
References m_radius.
Referenced by set_radius().
References m_a, m_b, m_center, m_cylinder_axis, m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, ug::RayPlaneIntersection(), ug::SMALL, ug::VecAdd(), ug::VecDot(), ug::VecScaleAdd(), and ug::VecSubtract().
Referenced by perform_projection().
|
inlineprivate |
void ug::EllipticCylinderProjector::set_center | ( | const vector3 & | center | ) |
void ug::EllipticCylinderProjector::set_cylinder_axis | ( | const vector3 & | axis | ) |
References m_cylinder_axis.
void ug::EllipticCylinderProjector::set_ellipse_axis1 | ( | const vector3 & | axis | ) |
References m_a, m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, ug::VecCross(), and ug::VecLength().
void ug::EllipticCylinderProjector::set_ellipse_axis2 | ( | const vector3 & | axis | ) |
References m_b, m_ellipse_axis1, m_ellipse_axis2, m_ellipseNormal, ug::VecCross(), and ug::VecLength().
void ug::EllipticCylinderProjector::set_influence_radius | ( | number | influenceRadius | ) |
References m_influenceRadius.
|
friend |
|
private |
Referenced by radial_ellipse_coord(), scale_point_to_radius(), serialize(), and set_ellipse_axis1().
|
private |
Referenced by radial_ellipse_coord(), scale_point_to_radius(), serialize(), and set_ellipse_axis2().
|
private |
Referenced by center(), radial_ellipse_coord(), scale_point_to_radius(), serialize(), and set_center().
|
private |
Referenced by cylinder_axis(), radial_ellipse_coord(), scale_point_to_radius(), serialize(), and set_cylinder_axis().
|
private |
|
private |
|
private |
|
private |
Referenced by influence_radius(), perform_projection(), serialize(), and set_influence_radius().
|
private |
Referenced by perform_projection(), radius(), serialize(), and set_radius().