54 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH 55 #define OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH 61 #include <OpenMesh/Core/Mesh/Types/TriMesh_ArrayKernelT.hh> 66 namespace Subdivider {
105 typedef typename Refs::Point Point;
106 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
107 typedef std::map<state_t, Point> PositionHistory;
110 HalfedgeHandle red_halfedge_;
112 PositionHistory pos_map_;
117 state_t state()
const {
return state_t(state_.state); }
118 void set_state(
const state_t _s) { state_.state = _s; }
119 void inc_state() { ++state_.state; }
122 final_t
final()
const {
return final_t(state_.final); }
123 void set_final() { state_.final =
true; }
124 void set_not_final() { state_.final =
false; }
127 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
128 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
131 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
132 const Point position(
const int& _i) {
133 if (pos_map_.find(_i) != pos_map_.end())
138 const Point zero_point(0.0, 0.0, 0.0);
142 return position(_i - 1);
153 typedef typename Refs::Point Point;
154 typedef std::map<state_t, Point> PositionHistory;
157 PositionHistory pos_map_;
161 typedef typename Refs::Scalar Scalar;
166 state_t state()
const {
return state_t(state_.state); }
167 void set_state(
const state_t _s) { state_.state = _s; }
168 void inc_state() { ++state_.state; }
171 final_t
final()
const {
return final_t(state_.final); }
172 void set_final() { state_.final =
true; }
173 void set_not_final() { state_.final =
false; }
176 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
177 const Point position(
const int& _i) {
179 if (pos_map_.find(_i) != pos_map_.end())
187 const Point zero_point(0.0, 0.0, 0.0);
191 return position(_i - 1);
202 typedef typename Refs::Point Point;
203 typedef std::map<state_t, Point> PositionHistory;
207 PositionHistory pos_map_;
212 state_t state()
const {
return state_.state; }
213 void set_state(
const state_t _s) { state_.state = _s; }
214 void inc_state() { ++state_.state; }
218 final_t
final()
const {
return state_.final; }
219 void set_final() { state_.final =
true; }
220 void set_not_final() { state_.final =
false; }
223 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
224 const Point position(
const int& _i) {
226 if (pos_map_.find(_i) != pos_map_.end())
234 const Point zero_point(0.0, 0.0, 0.0);
238 return position(_i - 1);
249 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH defined CompositeTraits::state_t state_t
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Add normals to mesh item (vertices/faces)
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.