33 #ifndef __H__UG_raster_layers_projector
34 #define __H__UG_raster_layers_projector
76 template <
class TElem>
79 typename TElem::ConstVertexArray vrts = e->vertices();
80 const size_t numVrts = e->num_vertices();
85 for(
size_t i = 0; i < numVrts; ++i){
89 return relZ / (
number)numVrts;
115 template <
class TParent>
128 static const std::string attName(
"RasterLayersProjector_ARelZ");
130 GlobalAttachments::declare_attachment<rel_z_attachment_t>(attName);
133 m_aRelZ = GlobalAttachments::attachment<rel_z_attachment_t>(attName);
153 template <
class Archive>
154 void serialize( Archive& ar,
const unsigned int version)
#define UG_EMPTY_BASE_CLASS_SERIALIZATION(clsDerived, clsBase)
Definition: boost_serialization.h:51
bool invalid() const
returns true if the pointer is invalid, false if not.
Definition: smart_pointer.h:212
void invalidate()
Definition: attachment_pipe.h:556
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
static bool is_declared(const std::string &name)
Definition: global_attachments.h:111
bool access(Grid &grid, TAttachment &a)
Definition: grid.h:189
bool has_attachment(IAttachment &attachment)
Definition: grid.h:796
void detach_from_vertices(IAttachment &attachment)
Definition: grid.h:787
bool has_vertex_attachment(IAttachment &attachment)
Definition: grid.h:798
void attach_to_vertices(IAttachment &attachment, bool passOnValues)
Definition: grid.h:728
provides a grid and access to the coordinates of the vertices
Definition: geometry.h:63
Grid & grid() const
Definition: geometry.h:76
virtual vector_t element_center(Vertex *e) const =0
Definition: raster_layer_util.h:59
Definition: raster_layers_projector.h:42
SPRasterLayers m_layers
Definition: raster_layers_projector.h:168
rel_z_attachment_t m_aRelZ
Definition: raster_layers_projector.h:169
void set_layers(SPRasterLayers layers)
Definition: raster_layers_projector.h:68
RasterLayersProjector(SPIGeometry3d geometry, SPRasterLayers layers)
Definition: raster_layers_projector.h:53
void set_geometry(SPIGeometry3d g)
Definition: raster_layers_projector.h:58
virtual number new_vertex(Vertex *vrt, Volume *parent)
called when a new vertex was created from an old volume.
Definition: raster_layers_projector.h:109
rel_z_attachment_accessor_t m_aaRelZ
Definition: raster_layers_projector.h:170
RasterLayersProjector()
Definition: raster_layers_projector.h:47
ANumber rel_z_attachment_t
Definition: raster_layers_projector.h:44
number average_rel_z(Vertex *e) const
Definition: raster_layers_projector.h:74
void remove_attachments()
Definition: raster_layers_projector.h:142
rel_z_attachment_t rel_z_attachment() const
Definition: raster_layers_projector.h:71
number new_vertex_impl(Vertex *vrt, TParent *parent)
Definition: raster_layers_projector.h:116
virtual number new_vertex(Vertex *vrt, Edge *parent)
called when a new vertex was created from an old edge.
Definition: raster_layers_projector.h:99
void add_attachments()
Definition: raster_layers_projector.h:126
virtual number new_vertex(Vertex *vrt, Vertex *parent)
called when a new vertex was created from an old vertex.
Definition: raster_layers_projector.h:92
void serialize(Archive &ar, const unsigned int version)
Definition: raster_layers_projector.h:154
virtual number new_vertex(Vertex *vrt, Face *parent)
called when a new vertex was created from an old face.
Definition: raster_layers_projector.h:104
RasterLayersProjector(SPIGeometry3d geometry)
Definition: raster_layers_projector.h:49
friend class boost::serialization::access
Definition: raster_layers_projector.h:151
Grid::VertexAttachmentAccessor< ANumber > rel_z_attachment_accessor_t
Definition: raster_layers_projector.h:45
rel_z_attachment_accessor_t rel_z_attachment_accessor() const
Definition: raster_layers_projector.h:72
number average_rel_z(TElem *e) const
Definition: raster_layers_projector.h:77
Adjusts vertex coordinates during refinement.
Definition: refinement_projector.h:55
void set_pos(Vertex *v, const vector3 &p)
Definition: refinement_projector.h:157
IGeometry3d & geom()
Definition: refinement_projector.h:165
virtual void set_geometry(SPIGeometry3d geometry)
Definition: refinement_projector.h:76
vector3 pos(Vertex *v) const
Definition: refinement_projector.h:149
virtual SPIGeometry3d geometry() const
Definition: refinement_projector.h:81
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
MathVector< 2, number > vector2
a 2d vector
Definition: ugmath_types.h:69
@ AT_GUI
Definition: boost_serialization.h:66
@ AT_DATA
Definition: boost_serialization.h:65
SmartPtr< RasterLayersProjector > SPRasterLayersProjector
Definition: raster_layers_projector.h:173
SmartPtr< T, FreePolicy > make_sp(T *inst)
returns a SmartPtr for the passed raw pointer
Definition: smart_pointer.h:836
Provides custom information for different archives.
Definition: boost_serialization.h:71