54 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH 55 #define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH 66 namespace Subdivider {
112 typedef typename Refs::Point
Point;
113 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
114 typedef std::map<state_t, Point> PositionHistory;
117 HalfedgeHandle red_halfedge_;
119 PositionHistory pos_map_;
124 state_t state()
const {
return state_t(state_.state); }
125 void set_state(
const state_t _s) { state_.state = _s; }
126 void inc_state() { ++state_.state; }
129 final_t
final()
const {
return final_t(state_.final); }
130 void set_final() { state_.final =
true; }
131 void set_not_final() { state_.final =
false; }
134 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
135 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
138 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
139 const Point position(
const int& _i) {
140 if (pos_map_.find(_i) != pos_map_.end())
145 return Point(0.0, 0.0, 0.0);
148 return position(_i - 1);
159 typedef typename Refs::Point
Point;
160 typedef std::map<state_t, Point> PositionHistory;
163 PositionHistory pos_map_;
167 typedef typename Refs::Scalar Scalar;
172 state_t state()
const {
return state_t(state_.state); }
173 void set_state(
const state_t _s) { state_.state = _s; }
174 void inc_state() { ++state_.state; }
177 final_t
final()
const {
return final_t(state_.final); }
178 void set_final() { state_.final =
true; }
179 void set_not_final() { state_.final =
false; }
182 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
184 const Point position(
const int& _i) {
186 if (pos_map_.find(_i) != pos_map_.end())
192 const Point zero_point(0.0, 0.0, 0.0);
196 return position(_i - 1);
207 typedef typename Refs::Point
Point;
208 typedef std::map<state_t, Point> PositionHistory;
211 PositionHistory pos_map_;
216 state_t state()
const {
return state_.state; }
217 void set_state(
const state_t _s) { state_.state = _s; }
218 void inc_state() { ++state_.state; }
222 final_t
final()
const {
return state_.final; }
223 void set_final() { state_.final =
true; }
224 void set_not_final() { state_.final =
false; }
227 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
228 const Point position(
const int& _i) {
230 if (pos_map_.find(_i) != pos_map_.end())
238 const Point zero_point(0.0, 0.0, 0.0);
242 return position(_i - 1);
259 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH defined Storage type for intermediate states and the final flag of a mesh entity.
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Add normals to mesh item (vertices/faces)
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
bool final_t
External representation for final flag.
int state_t
External representation for intermediate state.
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.