33 #ifndef __H__UG_sphere_projector_new
34 #define __H__UG_sphere_projector_new
98 template <
class TGeomProv
ider>
140 template <
class TElem>
145 typename TElem::ConstVertexArray vrts = parent->vertices();
146 size_t numVrts = parent->num_vertices();
156 for(
size_t i = 0; i < numVrts; ++i){
162 avDist /= (
number)numVrts;
169 if(len >
SMALL * avDist){
187 return clip<number>(1 - (len -
m_radius) / dist, 0, 1);
200 template <
class Archive>
201 void serialize( Archive& ar,
const unsigned int version)
#define UG_EMPTY_BASE_CLASS_SERIALIZATION(clsDerived, clsBase)
Definition: boost_serialization.h:51
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
Adjusts vertex coordinates during refinement.
Definition: refinement_projector.h:55
void set_pos(Vertex *v, const vector3 &p)
Definition: refinement_projector.h:157
vector3 pos(Vertex *v) const
Definition: refinement_projector.h:149
virtual SPIGeometry3d geometry() const
Definition: refinement_projector.h:81
Projects new vertices onto a sphere during refinement.
Definition: sphere_projector.h:49
SphereProjector(const vector3 ¢er)
Definition: sphere_projector.h:57
number perform_projection(Vertex *vrt, TElem *parent)
Definition: sphere_projector.h:141
SphereProjector(SPIGeometry3d geometry, const vector3 ¢er)
Definition: sphere_projector.h:79
virtual number new_vertex(Vertex *vrt, Face *parent)
called when a new vertex was created from an old face.
Definition: sphere_projector.h:127
number m_influenceRadius
Definition: sphere_projector.h:211
virtual number new_vertex(Vertex *vrt, Edge *parent)
called when a new vertex was created from an old edge.
Definition: sphere_projector.h:121
vector3 m_center
Definition: sphere_projector.h:209
void set_radius(number radius)
Definition: sphere_projector.h:114
SphereProjector(const TGeomProvider &geometry, const vector3 ¢er, number radius, number influenceRadius)
Definition: sphere_projector.h:99
const vector3 & center() const
Definition: sphere_projector.h:112
SphereProjector()
Definition: sphere_projector.h:51
SphereProjector(SPIGeometry3d geometry, const vector3 ¢er, number radius)
Definition: sphere_projector.h:88
number radius() const
Definition: sphere_projector.h:115
virtual number new_vertex(Vertex *vrt, Volume *parent)
called when a new vertex was created from an old volume.
Definition: sphere_projector.h:133
void set_center(const vector3 ¢er)
Definition: sphere_projector.h:111
number m_radius
Definition: sphere_projector.h:210
SphereProjector(const vector3 ¢er, number radius, number influenceRadius)
Definition: sphere_projector.h:70
void set_influence_radius(number influenceRadius)
Definition: sphere_projector.h:117
virtual ~SphereProjector()
Definition: sphere_projector.h:109
friend class boost::serialization::access
Definition: sphere_projector.h:198
number influence_radius() const
Definition: sphere_projector.h:118
void serialize(Archive &ar, const unsigned int version)
Definition: sphere_projector.h:201
SphereProjector(const vector3 ¢er, number radius)
Definition: sphere_projector.h:63
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
double number
Definition: types.h:124
vector_t::value_type VecLength(const vector_t &v)
returns the length of v. Slower than VecLengthSq.
Definition: math_vector_functions_common_impl.hpp:341
void VecSubtract(vector_t &vOut, const vector_t &v1, const vector_t &v2)
subtracts v2 from v1 and stores the result in a vOut
Definition: math_vector_functions_common_impl.hpp:226
MathVector< 3, number > vector3
a 3d vector
Definition: ugmath_types.h:72
vector_t::value_type VecDistance(const vector_t &v1, const vector_t &v2)
returns the distance of two vector_ts.
Definition: math_vector_functions_common_impl.hpp:375
void VecScale(vector_t &vOut, const vector_t &v, typename vector_t::value_type s)
scales a MathVector<N>
Definition: math_vector_functions_common_impl.hpp:252
const number SMALL
Definition: math_constants.h:41