54 #ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH
55 #define OPENMESH_SUBDIVIDER_ADAPTIVE_TRAITS_HH
61 #include <OpenMesh/Core/Mesh/Types/TriMesh_ArrayKernelT.hh>
66 namespace Subdivider {
105 typedef typename Refs::Point
Point;
106 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
107 typedef std::map<state_t, Point> PositionHistory;
110 HalfedgeHandle red_halfedge_;
112 PositionHistory pos_map_;
118 void set_state(
const state_t _s) { state_.state = _s; }
119 void inc_state() { ++state_.state; }
122 final_t
final()
const {
return final_t(state_.final); }
123 void set_final() { state_.final =
true; }
124 void set_not_final() { state_.final =
false; }
127 const HalfedgeHandle& red_halfedge()
const {
return red_halfedge_; }
128 void set_red_halfedge(
const HalfedgeHandle& _h) { red_halfedge_ = _h; }
131 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
132 const Point position(
const int& _i) {
133 if (pos_map_.find(_i) != pos_map_.end())
138 const Point zero_point(0.0, 0.0, 0.0);
142 return position(_i - 1);
153 typedef typename Refs::Point
Point;
154 typedef std::map<state_t, Point> PositionHistory;
157 PositionHistory pos_map_;
161 typedef typename Refs::Scalar Scalar;
167 void set_state(
const state_t _s) { state_.state = _s; }
168 void inc_state() { ++state_.state; }
171 final_t
final()
const {
return final_t(state_.final); }
172 void set_final() { state_.final =
true; }
173 void set_not_final() { state_.final =
false; }
176 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
177 const Point position(
const int& _i) {
179 if (pos_map_.find(_i) != pos_map_.end())
187 const Point zero_point(0.0, 0.0, 0.0);
191 return position(_i - 1);
202 typedef typename Refs::Point
Point;
203 typedef std::map<state_t, Point> PositionHistory;
207 PositionHistory pos_map_;
212 state_t state()
const {
return state_.state; }
213 void set_state(
const state_t _s) { state_.state = _s; }
214 void inc_state() { ++state_.state; }
218 final_t
final()
const {
return state_.final; }
219 void set_final() { state_.final =
true; }
220 void set_not_final() { state_.final =
false; }
223 void set_position(
const int& _i,
const Point& _p) { pos_map_[_i] = _p; }
224 const Point position(
const int& _i) {
226 if (pos_map_.find(_i) != pos_map_.end())
234 const Point zero_point(0.0, 0.0, 0.0);
238 return position(_i - 1);
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:59
@ Normal
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:82
@ PrevHalfedge
Add storage for previous halfedge (halfedges). The bit is set by default in the DefaultTraits.
Definition: Attributes.hh:84
CompositeTraits::state_t state_t
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:250
Base class for all traits.
Definition: Traits.hh:122
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:124