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
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:122
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:97
Base class for all traits.
Definition: Traits.hh:119
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:101
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:89
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:82
bool final_t
External representation for final flag.
Definition: CompositeTraits.hh:82
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:248
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:79
This file defines the default traits and some convenience macros.
int state_t
External representation for intermediate state.
Definition: CompositeTraits.hh:81
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:80
Storage type for intermediate states and the final flag of a mesh entity.
Definition: CompositeTraits.hh:86