33 #ifndef __H__UG_NORMAL_CALCULATION_IMPL__
34 #define __H__UG_NORMAL_CALCULATION_IMPL__
42 template <
class TAAPos>
43 inline typename TAAPos::ValueType
46 typename TAAPos::ValueType n;
51 template <
class TAAPos>
52 inline typename TAAPos::ValueType
55 typename TAAPos::ValueType n;
57 aaPos[e->
vertex((sideIndex + 1) % 2)]);
62 template <
class TAAPos>
63 inline typename TAAPos::ValueType
66 typename TAAPos::ValueType c, n;
77 template <
class TAAPos>
78 inline typename TAAPos::ValueType
81 typename TAAPos::ValueType n;
88 template <
class TAAPos>
89 inline typename TAAPos::ValueType
103 UG_THROW(
"Unsupported base object id in CalculateOuterNormal");
A generic specialization of IAttachment.
Definition: attachment_pipe.h:263
Can be used to store information about an edge and to construct an edge.
Definition: grid_base_objects.h:464
Base-class for edges.
Definition: grid_base_objects.h:397
holds the vertices of an Edge or an EdgeDescriptor.
Definition: grid_base_objects.h:362
virtual Vertex * vertex(size_t index) const
Definition: grid_base_objects.h:366
Can be queried for the edges and vertices of a face.
Definition: grid_base_objects.h:684
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
virtual EdgeDescriptor edge_desc(int index) const
returns the i-th edge of the face.
Definition: grid_base_objects.h:537
Definition: grid_base_objects.h:483
the generic attachment-accessor for access to grids attachment pipes.
Definition: grid.h:182
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
virtual int base_object_id() const =0
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
virtual FaceDescriptor face_desc(int index) const
Definition: grid_base_objects.h:784
int CalculateNormal(vector3 &vNormOut, Grid &grid, Edge *e, Grid::AttachmentAccessor< Vertex, APosition > &aaPos, Grid::AttachmentAccessor< Face, ANormal > *paaNormFACE)
Calculates the normal of the given edge.
Definition: edge_util.cpp:314
TAAPos::ValueType CalculateOuterNormal(Vertex *v, int sideIndex, TAAPos aaPos)
Calculates the outer normal of the i-th side of the given grid object.
Definition: normal_calculation_impl.h:44
#define UG_THROW(msg)
Definition: error.h:57
number DropAPerpendicular(vector_t &vOut, const vector_t &v, const vector_t &v0, const vector_t &v1)
finds the projection of v onto the line defined by v0 and v1
Definition: math_util_impl.hpp:123
void CalculateCenter(vector_t ¢erOut, const vector_t *pointSet, size_t numPoints)
calculates the center of a point-set
Definition: math_util_impl.hpp:98
MathVector< 2, number > vector2
a 2d vector
Definition: ugmath_types.h:69
void VecSet(vector_t &vInOut, typename vector_t::value_type s)
Set each vector component to scalar (componentwise)
Definition: math_vector_functions_common_impl.hpp:539
void VecNormalize(vector_t &vOut, const vector_t &v)
scales a vector_t to unit length
Definition: math_vector_functions_common_impl.hpp:501
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
@ VOLUME
Definition: grid_base_objects.h:63
@ VERTEX
Definition: grid_base_objects.h:60
@ EDGE
Definition: grid_base_objects.h:61
@ FACE
Definition: grid_base_objects.h:62