59 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH 60 #define OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH 66 #include <OpenMesh/Core/Mesh/Types/TriMesh_ArrayKernelT.hh> 71 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_;
122 state_t state()
const {
return state_t(state_.state); }
123 void set_state(
const state_t _s) { state_.state = _s; }
124 void inc_state() { ++state_.state; }
127 final_t
final()
const {
return final_t(state_.final); }
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 const Point zero_point(0.0, 0.0, 0.0);
147 return position(_i - 1);
158 typedef typename Refs::Point
Point;
159 typedef std::map<state_t, Point> PositionHistory;
162 PositionHistory pos_map_;
166 typedef typename Refs::Scalar Scalar;
171 state_t state()
const {
return state_t(state_.state); }
172 void set_state(
const state_t _s) { state_.state = _s; }
173 void inc_state() { ++state_.state; }
176 final_t
final()
const {
return final_t(state_.final); }
177 void set_final() { state_.final =
true; }
178 void set_not_final() { state_.final =
false; }
181 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())
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;
212 PositionHistory pos_map_;
217 state_t state()
const {
return state_.state; }
218 void set_state(
const state_t _s) { state_.state = _s; }
219 void inc_state() { ++state_.state; }
223 final_t
final()
const {
return state_.final; }
224 void set_final() { state_.final =
true; }
225 void set_not_final() { state_.final =
false; }
228 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
229 const Point position(
const int& _i) {
231 if (pos_map_.find(_i) != pos_map_.end())
239 const Point zero_point(0.0, 0.0, 0.0);
243 return position(_i - 1);
254 #endif // OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH defined #define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:96
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:89
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:108
#define HalfedgeAttributes(_i)
Macro for defining the halfedge attributes. See Specifying your MyMesh.
Definition: Traits.hh:87
Base class for all traits.
Definition: Traits.hh:126
#define VertexAttributes(_i)
Macro for defining the vertex attributes. See Specifying your MyMesh.
Definition: Traits.hh:84
#define FaceAttributes(_i)
Macro for defining the face attributes. See Specifying your MyMesh.
Definition: Traits.hh:93
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:255
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:87
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:64
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:104