52 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
53 #define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
64 namespace Subdivider {
110 typedef typename Refs::Point Point;
111 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
112 typedef std::map<state_t, Point> PositionHistory;
115 HalfedgeHandle red_halfedge_;
117 PositionHistory pos_map_;
123 void set_state(
const state_t _s) { state_.state = _s; }
124 void inc_state() { ++state_.state; }
128 void set_final() { state_.final =
true; }
129 void set_not_final() { state_.final =
false; }
132 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
133 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
136 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
137 const Point position(
const int& _i) {
138 if (pos_map_.find(_i) != pos_map_.end())
143 return Point(0.0, 0.0, 0.0);
146 return position(_i - 1);
157 typedef typename Refs::Point Point;
158 typedef std::map<state_t, Point> PositionHistory;
161 PositionHistory pos_map_;
165 typedef typename Refs::Scalar Scalar;
171 void set_state(
const state_t _s) { state_.state = _s; }
172 void inc_state() { ++state_.state; }
176 void set_final() { state_.final =
true; }
177 void set_not_final() { state_.final =
false; }
180 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
182 const Point position(
const int& _i) {
184 if (pos_map_.find(_i) != pos_map_.end())
190 const Point zero_point(0.0, 0.0, 0.0);
194 return position(_i - 1);
205 typedef typename Refs::Point Point;
206 typedef std::map<state_t, Point> PositionHistory;
209 PositionHistory pos_map_;
214 state_t state()
const {
return state_.state; }
215 void set_state(
const state_t _s) { state_.state = _s; }
216 void inc_state() { ++state_.state; }
220 final_t final()
const {
return state_.final; }
221 void set_final() { state_.final =
true; }
222 void set_not_final() { state_.final =
false; }
225 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
226 const Point position(
const int& _i) {
228 if (pos_map_.find(_i) != pos_map_.end())
236 const Point zero_point(0.0, 0.0, 0.0);
240 return position(_i - 1);
257 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH defined