59 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
60 #define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
71 namespace Subdivider {
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_;
129 state_t state()
const {
return state_t(state_.state); }
130 void set_state(
const state_t _s) { state_.state = _s; }
131 void inc_state() { ++state_.state; }
134 final_t
final()
const {
return final_t(state_.final); }
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;
177 state_t state()
const {
return state_t(state_.state); }
178 void set_state(
const state_t _s) { state_.state = _s; }
179 void inc_state() { ++state_.state; }
182 final_t
final()
const {
return final_t(state_.final); }
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);
264 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH defined
bool final_t
External representation for final flag.
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Add normals to mesh item (vertices/faces)
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
int state_t
External representation for intermediate state.
CompositeTraits::state_t state_t
Storage type for intermediate states and the final flag of a mesh entity.