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.
Definition: CompositeTraits.hh:88
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition: Traits.hh:79
Base class for all traits.
Definition: Traits.hh:121
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:91
int state_t
External representation for intermediate state.
Definition: CompositeTraits.hh:83
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition: Traits.hh:88
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:84
This file defines the default traits and some convenience macros.
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:82
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:99
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:81
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
bool final_t
External representation for final flag.
Definition: CompositeTraits.hh:84
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition: Traits.hh:82
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:124
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:103