scene Class Reference

Collaboration diagram for scene:
Collaboration graph
[legend]

List of all members.

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 &center_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_interfacegui_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::v3color_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::v3sphere_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

Constructor & Destructor Documentation

scene::scene (  ) 

Empty constructor for the scene.

References init_gui_visibility().

Here is the call graph for this function:


Member Function Documentation

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 (  ) 
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 (  ) 
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().

Here is the call graph for this function:

void scene::load_model (  ) 
void scene::picking_grid ( const cpe::v3 center_ray,
const cpe::v3 direction_ray 
)

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().

Here is the call graph for this function:

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).


Member Data Documentation

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.

cpe::grid scene::g0 [private]

The control grid for the spline.

Referenced by draw_scene(), and load_model().

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.

storage for picking parameters

Referenced by draw_scene().

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().

The Spline surface.

Referenced by draw_scene(), and load_model().


The documentation for this class was generated from the following files:
Generated on Mon Feb 27 17:40:09 2012 by  doxygen 1.6.3