54#ifndef OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
55#define OPENMESH_SUBDIVIDER_ADAPTIVE_COMPOSITETRAITS_HH
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_;
125 void set_state(
const state_t _s) { state_.state = _s; }
126 void inc_state() { ++state_.state; }
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;
173 void set_state(
const state_t _s) { state_.state = _s; }
174 void inc_state() { ++state_.state; }
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);
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
Adaptive Composite Subdivision framework.
Definition: CompositeTraits.hh:82
int state_t
External representation for intermediate state.
Definition: CompositeTraits.hh:83
bool final_t
External representation for final flag.
Definition: CompositeTraits.hh:84
Storage type for intermediate states and the final flag of a mesh entity.
Definition: CompositeTraits.hh:89
This file defines the default traits and some convenience macros.
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:103
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:91
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:99