54 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH 55 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH 69 namespace Subdivider {
91 typedef typename Refs::Scalar Scalar;
92 typedef typename Refs::Point
Point;
93 HalfedgeHandle red_halfedge_handle_;
94 unsigned int generation_;
101 const unsigned int& generation() {
return generation_; }
102 void set_generation(
const unsigned int& _g) { generation_ = _g; }
103 void inc_generation() { ++generation_; }
104 void set_red() { red_ = 1; }
105 void set_green() {red_ = 0; }
106 bool is_red() {
return red_; }
107 bool is_green() {
return !red_; }
108 void set_red_halfedge_handle(HalfedgeHandle& _heh)
109 { red_halfedge_handle_ = _heh; }
110 HalfedgeHandle& red_halfedge_handle() {
return red_halfedge_handle_; }
111 void set_quality(Scalar& _q) { quality_ = _q; }
112 Scalar& quality() {
return quality_; }
113 const Point& midpoint()
const {
return midpoint_; }
114 void set_midpoint(
const Point& _p) { midpoint_ = _p; }
115 const Point& position()
const {
return position_; }
116 void set_position(
const Point& _p) { position_ = _p; }
122 typedef typename Refs::Point
Point;
123 typedef typename Refs::Scalar Scalar;
128 const Point& midpoint()
const {
return midpoint_; }
129 void set_midpoint(
const Point& _vh) { midpoint_ = _vh; }
130 const Scalar& length()
const {
return length_; }
131 void set_length(
const Scalar& _s) { length_ = _s; }
132 const Point& position()
const {
return position_; }
133 void set_position(
const Point& _p) { position_ = _p; }
139 typedef typename Refs::Point
Point;
143 unsigned int generation_;
145 const Point& new_pos()
const {
return new_pos_; }
146 void set_new_pos(
const Point& _p) { new_pos_ = _p; }
147 const unsigned int& generation()
const {
return generation_; }
148 void set_generation(
const unsigned int& _i) { generation_ = _i; }
149 const Point& orig_pos()
const {
return orig_pos_; }
150 void set_orig_pos(
const Point& _p) { orig_pos_ = _p; }
151 const Point& position()
const {
return position_; }
152 void set_position(
const Point& _p) { position_ = _p; }
161 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH defined
Handle for a halfedge entity.
Add normals to mesh item (vertices/faces)