59 #ifndef OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH 60 #define OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH 74 namespace Subdivider {
95 typedef typename Refs::HalfedgeHandle HalfedgeHandle;
96 typedef typename Refs::Scalar Scalar;
97 typedef typename Refs::Point
Point;
98 HalfedgeHandle red_halfedge_handle_;
99 unsigned int generation_;
106 const unsigned int& generation() {
return generation_; }
107 void set_generation(
const unsigned int& _g) { generation_ = _g; }
108 void inc_generation() { ++generation_; }
109 void set_red() { red_ = 1; }
110 void set_green() {red_ = 0; }
111 bool is_red() {
return red_; }
112 bool is_green() {
return !red_; }
113 void set_red_halfedge_handle(HalfedgeHandle& _heh)
114 { red_halfedge_handle_ = _heh; }
115 HalfedgeHandle& red_halfedge_handle() {
return red_halfedge_handle_; }
116 void set_quality(Scalar& _q) { quality_ = _q; }
117 Scalar& quality() {
return quality_; }
118 const Point& midpoint()
const {
return midpoint_; }
119 void set_midpoint(
const Point& _p) { midpoint_ = _p; }
120 const Point& position()
const {
return position_; }
121 void set_position(
const Point& _p) { position_ = _p; }
127 typedef typename Refs::Point
Point;
128 typedef typename Refs::Scalar Scalar;
133 const Point& midpoint()
const {
return midpoint_; }
134 void set_midpoint(
const Point& _vh) { midpoint_ = _vh; }
135 const Scalar& length()
const {
return length_; }
136 void set_length(
const Scalar& _s) { length_ = _s; }
137 const Point& position()
const {
return position_; }
138 void set_position(
const Point& _p) { position_ = _p; }
144 typedef typename Refs::Point
Point;
148 unsigned int generation_;
150 const Point& new_pos()
const {
return new_pos_; }
151 void set_new_pos(
const Point& _p) { new_pos_ = _p; }
152 const unsigned int& generation()
const {
return generation_; }
153 void set_generation(
const unsigned int& _i) { generation_ = _i; }
154 const Point& orig_pos()
const {
return orig_pos_; }
155 void set_orig_pos(
const Point& _p) { orig_pos_ = _p; }
156 const Point& position()
const {
return position_; }
157 void set_position(
const Point& _p) { position_ = _p; }
166 #endif // OPENMESH_SUBDIVIDER_UNIFORM_COMPOSITETRAITS_HH defined This file provides some macros containing attribute usage.
#define VertexTraits
Macro for defining the vertex traits. See Specifying your MyMesh.
Definition: Traits.hh:96
#define FaceTraits
Macro for defining the face traits. See Specifying your MyMesh.
Definition: Traits.hh:108
Base class for all traits.
Definition: Traits.hh:126
Uniform Composite Subdivision framework.
Definition: CompositeTraits.hh:84
This file defines the default traits and some convenience macros.
Vec3f Point
The default coordinate type is OpenMesh::Vec3f.
Definition: Traits.hh:129
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