59 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH 60 #define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH 71 namespace Subdivider {
117 typedef typename Refs::Point
Point;
118 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
119 typedef std::map<state_t, Point> PositionHistory;
122 HalfedgeHandle red_halfedge_;
124 PositionHistory pos_map_;
129 state_t state()
const {
return state_t(state_.state); }
130 void set_state(
const state_t _s) { state_.state = _s; }
131 void inc_state() { ++state_.state; }
134 final_t
final()
const {
return final_t(state_.final); }
135 void set_final() { state_.final =
true; }
136 void set_not_final() { state_.final =
false; }
139 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
140 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
143 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
144 const Point position(
const int& _i) {
145 if (pos_map_.find(_i) != pos_map_.end())
150 return Point(0.0, 0.0, 0.0);
153 return position(_i - 1);
164 typedef typename Refs::Point
Point;
165 typedef std::map<state_t, Point> PositionHistory;
168 PositionHistory pos_map_;
172 typedef typename Refs::Scalar Scalar;
177 state_t state()
const {
return state_t(state_.state); }
178 void set_state(
const state_t _s) { state_.state = _s; }
179 void inc_state() { ++state_.state; }
182 final_t
final()
const {
return final_t(state_.final); }
183 void set_final() { state_.final =
true; }
184 void set_not_final() { state_.final =
false; }
187 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
189 const Point position(
const int& _i) {
191 if (pos_map_.find(_i) != pos_map_.end())
197 const Point zero_point(0.0, 0.0, 0.0);
201 return position(_i - 1);
212 typedef typename Refs::Point
Point;
213 typedef std::map<state_t, Point> PositionHistory;
216 PositionHistory pos_map_;
221 state_t state()
const {
return state_.state; }
222 void set_state(
const state_t _s) { state_.state = _s; }
223 void inc_state() { ++state_.state; }
227 final_t
final()
const {
return state_.final; }
228 void set_final() { state_.final =
true; }
229 void set_not_final() { state_.final =
false; }
232 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
233 const Point position(
const int& _i) {
235 if (pos_map_.find(_i) != pos_map_.end())
243 const Point zero_point(0.0, 0.0, 0.0);
247 return position(_i - 1);
264 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH defined #define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition: Traits.hh:87
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:96
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:104
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:108
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition: Traits.hh:84
bool final_t
External representation for final flag.
Definition: CompositeTraits.hh:89
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:87
Storage type for intermediate states and the final flag of a mesh entity.
Definition: CompositeTraits.hh:93
Base class for all traits.
Definition: Traits.hh:126
This file defines the default traits and some convenience macros.
int state_t
External representation for intermediate state.
Definition: CompositeTraits.hh:88
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:89
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:86
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:129
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition: Traits.hh:93