cpe::surface_param_drawable Class Reference

Wrapper class to help drawing a surface_param class. More...

+ Inheritance diagram for cpe::surface_param_drawable:
+ Collaboration diagram for cpe::surface_param_drawable:

Public Member Functions

 surface_param_drawable ()
 empty constructor More...
 
 surface_param_drawable (const unsigned int &Nu, const unsigned int &Nv)
 direct constructor with size More...
 
void update_connectivity ()
 update connectivity of needed More...
 
void set_normal (const unsigned int ku, const 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...
 
- Public Member Functions inherited from cpe::surface_param
 surface_param ()
 empty constructor More...
 
 surface_param (const unsigned int &Nu, const unsigned int &Nv)
 direct constructor More...
 
void resize (const unsigned int &Nu, const unsigned int &Nv)
 resize the grid More...
 
const unsigned int & size_u () const
 return the size in u direction More...
 
const unsigned int & size_v () const
 return the size in v direction More...
 
const vec3operator() (const unsigned int &ku, const unsigned int &kv) const
 Accessor to the value (ku,kv) More...
 
vec3operator() (const unsigned int &ku, const unsigned int &kv)
 Accessor to the value (ku,kv) More...
 
const vec3pointer () const
 export internal pointer More...
 
vec3pointer_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_indexinternal_connectivity
 internal connectivity More...
 
std::vector< vec3internal_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

- Protected Member Functions inherited from cpe::surface_param
const vec3get (const unsigned int &ku, const unsigned int &kv) const
 getter fast but unprotected for heritage More...
 
void assert_size (const unsigned int &ku, const unsigned int &kv) const
 ensure (ku,kv) is coherent with the size of the grid More...
 

Detailed Description

Wrapper class to help drawing a surface_param class.

Constructor & Destructor Documentation

cpe::surface_param_drawable::surface_param_drawable ( )

empty constructor

cpe::surface_param_drawable::surface_param_drawable ( const unsigned int &  Nu,
const unsigned int &  Nv 
)

direct constructor with size

References build_connectivity().

+ Here is the call graph for this function:

Member Function Documentation

void cpe::surface_param_drawable::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().

+ Here is the call graph for this function:

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

get pointer on normal

References internal_normal.

Referenced by cpe::opengl_drawer::draw().

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

+ Here is the call graph for this function:

void cpe::surface_param_drawable::set_normal ( const unsigned int  ku,
const 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().

+ Here is the call graph for this function:

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

+ Here is the call graph for this function:

Member Data Documentation

std::vector<quad_index> cpe::surface_param_drawable::internal_connectivity
private

internal connectivity

Referenced by build_connectivity(), and pointer_draw_connectivity().

std::vector<vec3> cpe::surface_param_drawable::internal_normal
private

internal normal

Referenced by pointer_draw_normal(), and set_normal().

unsigned int cpe::surface_param_drawable::internal_old_size_u
private

storage for size u stored since the previous update

Referenced by build_connectivity(), and update_connectivity().

unsigned int cpe::surface_param_drawable::internal_old_size_v
private

storage for size u stored since the previous update

Referenced by build_connectivity(), and update_connectivity().


The documentation for this class was generated from the following files: