52 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH
53 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH
67 namespace Subdivider {
88 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
89 typedef typename Refs::Scalar Scalar;
90 typedef typename Refs::Point
Point;
91 HalfedgeHandle red_halfedge_handle_;
92 unsigned int generation_;
99 const unsigned int& generation() {
return generation_; }
100 void set_generation(
const unsigned int& _g) { generation_ = _g; }
101 void inc_generation() { ++generation_; }
102 void set_red() { red_ = 1; }
103 void set_green() {red_ = 0; }
104 bool is_red() {
return red_; }
105 bool is_green() {
return !red_; }
106 void set_red_halfedge_handle(HalfedgeHandle& _heh)
107 { red_halfedge_handle_ = _heh; }
108 HalfedgeHandle& red_halfedge_handle() {
return red_halfedge_handle_; }
109 void set_quality(Scalar& _q) { quality_ = _q; }
110 Scalar& quality() {
return quality_; }
111 const Point& midpoint()
const {
return midpoint_; }
112 void set_midpoint(
const Point& _p) { midpoint_ = _p; }
113 const Point& position()
const {
return position_; }
114 void set_position(
const Point& _p) { position_ = _p; }
120 typedef typename Refs::Point
Point;
121 typedef typename Refs::Scalar Scalar;
126 const Point& midpoint()
const {
return midpoint_; }
127 void set_midpoint(
const Point& _vh) { midpoint_ = _vh; }
128 const Scalar& length()
const {
return length_; }
129 void set_length(
const Scalar& _s) { length_ = _s; }
130 const Point& position()
const {
return position_; }
131 void set_position(
const Point& _p) { position_ = _p; }
137 typedef typename Refs::Point
Point;
141 unsigned int generation_;
143 const Point& new_pos()
const {
return new_pos_; }
144 void set_new_pos(
const Point& _p) { new_pos_ = _p; }
145 const unsigned int& generation()
const {
return generation_; }
146 void set_generation(
const unsigned int& _i) { generation_ = _i; }
147 const Point& orig_pos()
const {
return orig_pos_; }
148 void set_orig_pos(
const Point& _p) { orig_pos_ = _p; }
149 const Point& position()
const {
return position_; }
150 void set_position(
const Point& _p) { position_ = _p; }
159 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH defined
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:122
#define EdgeTraits
Macro for defining the edge traits. See Specifying your MyMesh.
Definition: Traits.hh:97
Base class for all traits.
Definition: Traits.hh:119
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:101
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:89
Contains all the mesh ingredients like the polygonal mesh, the triangle mesh, different mesh kernels ...
Definition: MeshItems.hh:56
This file provides some macros containing attribute usage.
Uniform Composite Subdivision framework.
Definition: CompositeTraits.hh:77
This file defines the default traits and some convenience macros.
Add normals to mesh item (vertices/faces)
Definition: Attributes.hh:80