
Public Member Functions | |
| scene () | |
| Empty constructor for the scene. | |
| void | load_model () |
| Method called only once at the beginning (load files ...). | |
| void | draw_scene () |
| Method called at every frame. | |
| void | build_spline_surface (const unsigned int &N_samples) |
| Build a full spline surface of with a given sample rate. | |
| void | fill_patch (const unsigned int &index_surface, const cpe::patch4 &p, const unsigned int &N_samples) |
| Fill a 4x4 patch by the surface. | |
| void | compute_curve_spline () |
| Compute the curves at the boundary of each patch. | |
| void | update_high_res () |
| Update the surface given with the high sampling ratio. | |
| void | update_low_res () |
| Update the surface given with the low sampling ratio (for interactive edition). | |
| void | picking_grid (const cpe::v3 ¢er_ray, const cpe::v3 &direction_ray) |
| Helper function for picking position of the grid. | |
| void | translate_picking (const cpe::v3 t) |
| Translate the selected position of the grid. | |
| void | add_u_back_line () |
| add a u line at the end of the grid | |
| void | add_v_back_line () |
| add a v line at the end of the grid | |
| void | add_u_front_line () |
| add a u line at the front of the grid | |
| void | add_v_front_line () |
| add a v line at the front of the grid | |
| void | erase_u_back_line () |
| suppress a u line at the end of the grid | |
| void | erase_v_back_line () |
| suppress a v line at the end of the grid | |
| void | erase_u_front_line () |
| suppress a u line at the beginning of the grid | |
| void | erase_v_front_line () |
| suppress a v line at the beginning of the grid | |
| void | duplicate_boundary () |
| duplicate each position of the grid at the boundary | |
| void | set_glwidget (glwidget *p_widget) |
| Set the GLWidget pointer. | |
| cpe::gui_interface & | gui_visible_interface () |
| get the gui helper class | |
Private Member Functions | |
| void | preload_sphere () |
| Init the sphere loading. | |
| void | init_gui_visibility () |
| Init the visibility gui parameters. | |
| void | init_color_table () |
| Init the colortable for the patches. | |
Private Attributes | |
| cpe::grid | g0 |
| The control grid for the spline. | |
| cpe::surface_param_drawable | surf |
| The Spline surface. | |
| std::vector< cpe::v3 > | color_table |
| the color_table of the patches | |
| std::vector< std::vector < cpe::v3 > > | curve_spline |
| The curve of the boundaries. | |
| cpe::mesh | sphere |
| storage for the sphere (to draw the grid position) | |
| std::vector< cpe::v3 > | sphere_normal |
| storage for the sphere normal (to draw the grid position) | |
| cpe::picking_data | pick |
| storage for picking parameters | |
| unsigned int | N_sample_high_res |
| The sampling for the high resolution surface. | |
| unsigned int | N_sample_low_res |
| The sampling for the low resolution surface. | |
| cpe::gui_interface | gui_visible |
| Storage class for visibility modified in the gui. | |
| unsigned int | counter_update |
| counter to update the surface at some time | |
| scene::scene | ( | ) |
Empty constructor for the scene.
References init_gui_visibility().

| void scene::add_u_back_line | ( | ) |
add a u line at the end of the grid
| void scene::add_u_front_line | ( | ) |
add a u line at the front of the grid
| void scene::add_v_back_line | ( | ) |
add a v line at the end of the grid
| void scene::add_v_front_line | ( | ) |
add a v line at the front of the grid
| void scene::build_spline_surface | ( | const unsigned int & | N_samples | ) |
Build a full spline surface of with a given sample rate.
| void scene::compute_curve_spline | ( | ) |
Compute the curves at the boundary of each patch.
| void scene::draw_scene | ( | ) |
Method called at every frame.
References g0, cpe::gui_interface::get_grid_visible(), cpe::gui_interface::get_gridposition_visible(), cpe::picking_data::get_is_picked(), cpe::picking_data::get_picked_index(), cpe::gui_interface::get_surface_visible(), gui_visible, pick, cpe::grid::size_u(), cpe::grid::size_v(), sphere, sphere_normal, surf, cpe::v3::x(), cpe::v3::y(), and cpe::v3::z().
Referenced by glwidget::paintGL().
| void scene::duplicate_boundary | ( | ) |
duplicate each position of the grid at the boundary
| void scene::erase_u_back_line | ( | ) |
suppress a u line at the end of the grid
| void scene::erase_u_front_line | ( | ) |
suppress a u line at the beginning of the grid
| void scene::erase_v_back_line | ( | ) |
suppress a v line at the end of the grid
| void scene::erase_v_front_line | ( | ) |
suppress a v line at the beginning of the grid
| void scene::fill_patch | ( | const unsigned int & | index_surface, | |
| const cpe::patch4 & | p, | |||
| const unsigned int & | N_samples | |||
| ) |
Fill a 4x4 patch by the surface.
| gui_interface & scene::gui_visible_interface | ( | ) |
get the gui helper class
References gui_visible.
Referenced by Window::grid_checkbox_clicked(), Window::gridposition_checkbox_clicked(), and Window::surface_checkbox_clicked().
| void scene::init_color_table | ( | ) | [private] |
Init the colortable for the patches.
| void scene::init_gui_visibility | ( | ) | [private] |
Init the visibility gui parameters.
References gui_visible, cpe::gui_interface::set_grid_visible(), cpe::gui_interface::set_gridposition_visible(), and cpe::gui_interface::set_surface_visible().
Referenced by scene().

| void scene::load_model | ( | ) |
Method called only once at the beginning (load files ...).
References cpe::v3::cross(), cpe::evaluator_spline::diff_u(), cpe::evaluator_spline::diff_v(), g0, preload_sphere(), cpe::grid::resize(), cpe::surface_param::resize(), cpe::surface_param_drawable::set_normal(), surf, and cpe::surface_param_drawable::update_connectivity().
Referenced by glwidget::initializeGL().

Helper function for picking position of the grid.
| void scene::preload_sphere | ( | ) | [private] |
Init the sphere loading.
References cpe::mesh::load_off_file(), cpe::mesh::normal_vertex(), cpe::mesh::scale(), sphere, and sphere_normal.
Referenced by load_model().

| void scene::set_glwidget | ( | glwidget * | p_widget | ) |
Set the GLWidget pointer.
| void scene::translate_picking | ( | const cpe::v3 | t | ) |
Translate the selected position of the grid.
| void scene::update_high_res | ( | ) |
Update the surface given with the high sampling ratio.
| void scene::update_low_res | ( | ) |
Update the surface given with the low sampling ratio (for interactive edition).
std::vector<cpe::v3> scene::color_table [private] |
the color_table of the patches
unsigned int scene::counter_update [private] |
counter to update the surface at some time
std::vector<std::vector<cpe::v3> > scene::curve_spline [private] |
The curve of the boundaries.
The control grid for the spline.
Referenced by draw_scene(), and load_model().
cpe::gui_interface scene::gui_visible [private] |
Storage class for visibility modified in the gui.
Referenced by draw_scene(), gui_visible_interface(), and init_gui_visibility().
unsigned int scene::N_sample_high_res [private] |
The sampling for the high resolution surface.
unsigned int scene::N_sample_low_res [private] |
The sampling for the low resolution surface.
cpe::picking_data scene::pick [private] |
storage for picking parameters
Referenced by draw_scene().
cpe::mesh scene::sphere [private] |
storage for the sphere (to draw the grid position)
Referenced by draw_scene(), and preload_sphere().
std::vector<cpe::v3> scene::sphere_normal [private] |
storage for the sphere normal (to draw the grid position)
Referenced by draw_scene(), and preload_sphere().
cpe::surface_param_drawable scene::surf [private] |
The Spline surface.
Referenced by draw_scene(), and load_model().
1.6.3