49 #ifndef OPENMESH_VDPROGMESH_VDPMSYNTHESIZERVIEWERWIDGET_HH
50 #define OPENMESH_VDPROGMESH_VDPMSYNTHESIZERVIEWERWIDGET_HH
58 #include <OpenMesh/Core/IO/MeshIO.hh>
59 #include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
60 #include <OpenMesh/Apps/QtViewer/MeshViewerWidgetT.hh>
62 #include <OpenMesh/Tools/VDPM/MeshTraits.hh>
63 #include <OpenMesh/Tools/VDPM/StreamingDef.hh>
64 #include <OpenMesh/Tools/VDPM/ViewingParameters.hh>
65 #include <OpenMesh/Tools/VDPM/VHierarchy.hh>
66 #include <OpenMesh/Tools/VDPM/VFront.hh>
89 typedef TriMesh_ArrayKernelT<VDPM::MeshTraits> VDPMMesh;
97 using VDPM::VHierarchy;
98 using VDPM::VHierarchyNode;
99 using VDPM::VHierarchyNodeIndex;
100 using VDPM::VHierarchyNodeHandle;
102 using VDPM::ViewingParameters;
127 VHierarchy vhierarchy_;
129 ViewingParameters viewing_parameters_;
133 unsigned int n_base_vertices_;
134 unsigned int n_base_edges_;
135 unsigned int n_base_faces_;
136 unsigned int n_details_;
141 bool outside_view_frustum(
const OpenMesh::Vec3f &pos,
float radius);
143 bool oriented_away(
float sin_square,
144 float distance_square,
145 float product_value);
147 bool screen_space_error(
float mue_square,
149 float distance_square,
150 float product_value);
152 void update_viewing_parameters();
154 virtual void keyPressEvent(QKeyEvent* _event);
159 virtual void draw_scene(
const std::string& _draw_mode);
163 void adaptive_refinement();
165 bool qrefine(VHierarchyNodeHandle _node_handle);
167 void force_vsplit(VHierarchyNodeHandle _node_handle);
169 bool ecol_legal(VHierarchyNodeHandle _parent_handle,
170 VDPMMesh::HalfedgeHandle& v0v1);
172 void get_active_cuts(VHierarchyNodeHandle _node_handle,
175 void vsplit(VHierarchyNodeHandle _node_handle,
178 void ecol(VHierarchyNodeHandle _parent_handle,
179 const VDPMMesh::HalfedgeHandle& v0v1);
189 #endif // OPENMESHAPPS_VDPMSYNTHESIZERVIEWERWIDGET_HH defined