Wrapper class to help drawing a surface_param class. More...
Public Member Functions | |
surface_param_drawable () | |
empty constructor More... | |
surface_param_drawable (unsigned int Nu, unsigned int Nv) | |
direct constructor with size More... | |
void | update_connectivity () |
update connectivity of needed More... | |
void | set_normal (unsigned int ku, unsigned int kv, const cpe::vec3 &n) |
set a specific normal More... | |
const unsigned int * | pointer_draw_connectivity () const |
get pointer on connectivity More... | |
const float * | pointer_draw_normal () const |
get pointer on normal More... | |
const float * | pointer_draw_vertices () const |
get pointer on vertices More... | |
![]() | |
surface_param () | |
empty constructor More... | |
surface_param (unsigned int Nu, unsigned int Nv) | |
direct constructor More... | |
void | resize (unsigned int Nu, unsigned int Nv) |
resize the grid More... | |
unsigned int | size_u () const |
return the size in u direction More... | |
unsigned int | size_v () const |
return the size in v direction More... | |
const vec3 & | operator() (unsigned int ku, unsigned int kv) const |
Accessor to the value (ku,kv) More... | |
vec3 & | operator() (unsigned int ku, unsigned int kv) |
Accessor to the value (ku,kv) More... | |
const vec3 * | pointer () const |
export internal pointer More... | |
vec3 * | pointer_unprotected () |
export internal pointer unprotected, use with care More... | |
Private Member Functions | |
void | build_connectivity () |
force to build connectivity More... | |
Private Attributes | |
std::vector< quad_index > | internal_connectivity |
internal connectivity More... | |
std::vector< vec3 > | internal_normal |
internal normal More... | |
unsigned int | internal_old_size_u |
storage for size u stored since the previous update More... | |
unsigned int | internal_old_size_v |
storage for size u stored since the previous update More... | |
Additional Inherited Members | |
![]() | |
const vec3 & | get (unsigned int ku, unsigned int kv) const |
getter fast but unprotected for heritage More... | |
void | assert_size (unsigned int ku, unsigned int kv) const |
ensure (ku,kv) is coherent with the size of the grid More... | |
Wrapper class to help drawing a surface_param class.
cpe::surface_param_drawable::surface_param_drawable | ( | ) |
empty constructor
cpe::surface_param_drawable::surface_param_drawable | ( | unsigned int | Nu, |
unsigned int | Nv | ||
) |
direct constructor with size
References build_connectivity().
|
private |
force to build connectivity
References internal_connectivity, internal_old_size_u, internal_old_size_v, cpe::surface_param::size_u(), and cpe::surface_param::size_v().
Referenced by surface_param_drawable(), and update_connectivity().
const unsigned int * cpe::surface_param_drawable::pointer_draw_connectivity | ( | ) | const |
get pointer on connectivity
References internal_connectivity.
Referenced by cpe::opengl_drawer::draw().
const float * cpe::surface_param_drawable::pointer_draw_normal | ( | ) | const |
const float * cpe::surface_param_drawable::pointer_draw_vertices | ( | ) | const |
get pointer on vertices
References cpe::surface_param::pointer(), and cpe::vec3::pointer().
Referenced by cpe::opengl_drawer::draw().
void cpe::surface_param_drawable::set_normal | ( | unsigned int | ku, |
unsigned int | kv, | ||
const cpe::vec3 & | n | ||
) |
set a specific normal
References cpe::surface_param::assert_size(), internal_normal, cpe::surface_param::size_u(), and cpe::surface_param::size_v().
void cpe::surface_param_drawable::update_connectivity | ( | ) |
update connectivity of needed
References build_connectivity(), internal_old_size_u, internal_old_size_v, cpe::surface_param::size_u(), and cpe::surface_param::size_v().
|
private |
internal connectivity
Referenced by build_connectivity(), and pointer_draw_connectivity().
|
private |
internal normal
Referenced by pointer_draw_normal(), and set_normal().
|
private |
storage for size u stored since the previous update
Referenced by build_connectivity(), and update_connectivity().
|
private |
storage for size u stored since the previous update
Referenced by build_connectivity(), and update_connectivity().