52 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH
53 #define OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH
59 #include <OpenMesh/Core/Mesh/Types/TriMesh_ArrayKernelT.hh>
64 namespace Subdivider {
103 typedef typename Refs::Point
Point;
105 typedef std::map<state_t, Point> PositionHistory;
108 HalfedgeHandle red_halfedge_;
110 PositionHistory pos_map_;
116 void set_state(
const state_t _s) { state_.state = _s; }
117 void inc_state() { ++state_.state; }
120 final_t
final()
const {
return final_t(state_.final); }
121 void set_final() { state_.final =
true; }
122 void set_not_final() { state_.final =
false; }
125 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
126 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
129 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
130 const Point position(
const int& _i) {
131 if (pos_map_.find(_i) != pos_map_.end())
136 const Point zero_point(0.0, 0.0, 0.0);
140 return position(_i - 1);
151 typedef typename Refs::Point
Point;
152 typedef std::map<state_t, Point> PositionHistory;
155 PositionHistory pos_map_;
159 typedef typename Refs::Scalar Scalar;
165 void set_state(
const state_t _s) { state_.state = _s; }
166 void inc_state() { ++state_.state; }
169 final_t
final()
const {
return final_t(state_.final); }
170 void set_final() { state_.final =
true; }
171 void set_not_final() { state_.final =
false; }
174 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
175 const Point position(
const int& _i) {
177 if (pos_map_.find(_i) != pos_map_.end())
185 const Point zero_point(0.0, 0.0, 0.0);
189 return position(_i - 1);
200 typedef typename Refs::Point
Point;
201 typedef std::map<state_t, Point> PositionHistory;
205 PositionHistory pos_map_;
210 state_t state()
const {
return state_.state; }
211 void set_state(
const state_t _s) { state_.state = _s; }
212 void inc_state() { ++state_.state; }
216 final_t
final()
const {
return state_.final; }
217 void set_final() { state_.final =
true; }
218 void set_not_final() { state_.final =
false; }
221 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
222 const Point position(
const int& _i) {
224 if (pos_map_.find(_i) != pos_map_.end())
232 const Point zero_point(0.0, 0.0, 0.0);
236 return position(_i - 1);
247 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH defined