59#ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
60#define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
117 typedef typename Refs::Point Point;
118 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
119 typedef std::map<state_t, Point> PositionHistory;
122 HalfedgeHandle red_halfedge_;
124 PositionHistory pos_map_;
130 void set_state(
const state_t _s) { state_.state = _s; }
131 void inc_state() { ++state_.state; }
135 void set_final() { state_.final =
true; }
136 void set_not_final() { state_.final =
false; }
139 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
140 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
143 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
144 const Point position(
const int& _i) {
145 if (pos_map_.find(_i) != pos_map_.end())
150 return Point(0.0, 0.0, 0.0);
153 return position(_i - 1);
164 typedef typename Refs::Point Point;
165 typedef std::map<state_t, Point> PositionHistory;
168 PositionHistory pos_map_;
172 typedef typename Refs::Scalar Scalar;
178 void set_state(
const state_t _s) { state_.state = _s; }
179 void inc_state() { ++state_.state; }
183 void set_final() { state_.final =
true; }
184 void set_not_final() { state_.final =
false; }
187 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
189 const Point position(
const int& _i) {
191 if (pos_map_.find(_i) != pos_map_.end())
197 const Point zero_point(0.0, 0.0, 0.0);
201 return position(_i - 1);
212 typedef typename Refs::Point Point;
213 typedef std::map<state_t, Point> PositionHistory;
216 PositionHistory pos_map_;
221 state_t state()
const {
return state_.state; }
222 void set_state(
const state_t _s) { state_.state = _s; }
223 void inc_state() { ++state_.state; }
227 final_t final()
const {
return state_.final; }
228 void set_final() { state_.final =
true; }
229 void set_not_final() { state_.final =
false; }
232 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
233 const Point position(
const int& _i) {
235 if (pos_map_.find(_i) != pos_map_.end())
243 const Point zero_point(0.0, 0.0, 0.0);
247 return position(_i - 1);
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition MeshItems.hh:64
@ Normal
Add normals to mesh item (vertices/faces)
Definition Attributes.hh:87
@ PrevHalfedge
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition Attributes.hh:89
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition CompositeTraits.hh:255
Base class for all traits.
Definition Traits.hh:127
Adaptive Composite Subdivision framework.
Definition CompositeTraits.hh:87
int state_t
External representation for intermediate state.
Definition CompositeTraits.hh:88
bool final_t
External representation for final flag.
Definition CompositeTraits.hh:89
Storage type for intermediate states and the final flag of a mesh entity.
Definition CompositeTraits.hh:94
This file defines the default traits and some convenience macros.
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition Traits.hh:84
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition Traits.hh:108
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition Traits.hh:87
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition Traits.hh:93
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition Traits.hh:96
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition Traits.hh:104