cpe::grid Class Reference

Collaboration diagram for cpe::grid:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 grid ()
 empty constructor
 grid (const unsigned int &Nu, const unsigned int &Nv)
 direct constructor with size
void resize (const unsigned int &Nu, const unsigned int &Nv)
 resize the grid
const unsigned int size_u () const
 return the size in u direction
const unsigned int size_v () const
 return the size in v direction
const v3operator() (const unsigned int &ku, const unsigned int &kv) const
 Accessor to the value (ku,kv).
v3operator() (const unsigned int &ku, const unsigned int &kv)
 Accessor to the value (ku,kv).
patch4 get_patch (const unsigned int &k_patch_u, const unsigned int &k_patch_v) const
 get a 4x4 patch
void build_meshgrid ()
 build Matlab meshgrid style from 1 to size
void build_sphere ()
 build spherical distribution
gridoperator*= (const double &s)
 scale the grid homogeneously by a scalar
gridoperator+= (const v3 &t)
 translate the grid
gridoperator-= (const v3 &t)
 translate the grid
grid operator- () const
 negation positions of the grid
void add_back_u ()
 add a line of grid in the u direction at the end
void add_front_u ()
 add a line of grid in the u direction at the beginning
void add_back_v ()
 add a line of grid in the v direction at the end
void add_front_v ()
 add a line of grid in the v direction at the beginning
void suppress_back_u ()
 suppress a line of grid in the u direction at the end
void suppress_front_u ()
 suppress a line of grid in the u direction at the beginning
void suppress_back_v ()
 suppress a line of grid in the v direction at the end
void suppress_front_v ()
 suppress a line of grid in the v direction at the beginning
void duplicate_boundary ()
 duplicate positions at the boundaries
void write (const std::string &filename) const
 Write grid into a file.

Static Public Member Functions

static grid read (const std::string &filename)
 Read grid from a file.

Private Member Functions

void assert_size (const unsigned int &ku, const unsigned int &kv) const
 ensure (ku,kv) is coherent with the size of the grid

Private Attributes

unsigned int internal_size_u
 internal size u
unsigned int internal_size_v
 internal size v
std::vector< v3internal_data
 Internal storage under the form: ku+Nu*kv.

Friends

grid operator* (const double &s, const grid &g)
 scale the grid homogeneously by a scalar
grid operator* (const grid &g, const double &s)
 scale the grid homogeneously by a scalar
grid operator+ (const grid &g, const v3 &t)
 translate the grid
grid operator+ (const v3 &t, const grid &g)
 translate the grid
grid operator- (const grid &g, const v3 &t)
 translate the grid
grid operator- (const v3 &t, const grid &g)
 translate the grid

Constructor & Destructor Documentation

cpe::grid::grid (  ) 

empty constructor

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

direct constructor with size

References internal_data.


Member Function Documentation

void cpe::grid::add_back_u (  ) 

add a line of grid in the u direction at the end

References internal_size_u, and internal_size_v.

Referenced by scene::add_u_back_line().

void cpe::grid::add_back_v (  ) 

add a line of grid in the v direction at the end

References internal_size_u, and internal_size_v.

Referenced by scene::add_v_back_line().

void cpe::grid::add_front_u (  ) 

add a line of grid in the u direction at the beginning

References internal_size_u, and internal_size_v.

Referenced by scene::add_u_front_line().

void cpe::grid::add_front_v (  ) 

add a line of grid in the v direction at the beginning

References internal_size_u, and internal_size_v.

Referenced by scene::add_v_front_line().

void cpe::grid::assert_size ( const unsigned int &  ku,
const unsigned int &  kv 
) const [private]

ensure (ku,kv) is coherent with the size of the grid

References internal_size_u, internal_size_v, and cpe::string_converter::to_string().

Referenced by get_patch(), and operator()().

Here is the call graph for this function:

void cpe::grid::build_meshgrid (  ) 

build Matlab meshgrid style from 1 to size

References internal_data, internal_size_u, internal_size_v, cpe::v3::x(), and cpe::v3::y().

Referenced by scene::load_model().

Here is the call graph for this function:

void cpe::grid::build_sphere (  ) 

build spherical distribution

References internal_size_u, and internal_size_v.

void cpe::grid::duplicate_boundary (  ) 

duplicate positions at the boundaries

References internal_size_u, and internal_size_v.

Referenced by scene::duplicate_boundary().

patch4 cpe::grid::get_patch ( const unsigned int &  k_patch_u,
const unsigned int &  k_patch_v 
) const

get a 4x4 patch

References assert_size(), internal_data, and internal_size_u.

Referenced by scene::build_spline_surface(), and scene::compute_curve_spline().

Here is the call graph for this function:

v3 & cpe::grid::operator() ( const unsigned int &  ku,
const unsigned int &  kv 
)

Accessor to the value (ku,kv).

References assert_size(), internal_data, and internal_size_u.

Here is the call graph for this function:

const v3 & cpe::grid::operator() ( const unsigned int &  ku,
const unsigned int &  kv 
) const

Accessor to the value (ku,kv).

References assert_size(), internal_data, and internal_size_u.

Here is the call graph for this function:

grid & cpe::grid::operator*= ( const double &  s  ) 

scale the grid homogeneously by a scalar

References internal_data.

grid & cpe::grid::operator+= ( const v3 t  ) 

translate the grid

References internal_data.

grid cpe::grid::operator- (  )  const

negation positions of the grid

grid & cpe::grid::operator-= ( const v3 t  ) 

translate the grid

References internal_data.

grid cpe::grid::read ( const std::string &  filename  )  [static]

Read grid from a file.

void cpe::grid::resize ( const unsigned int &  Nu,
const unsigned int &  Nv 
)

resize the grid

References internal_data, internal_size_u, and internal_size_v.

Referenced by scene::load_model().

const unsigned int cpe::grid::size_u (  )  const
const unsigned int cpe::grid::size_v (  )  const
void cpe::grid::suppress_back_u (  ) 

suppress a line of grid in the u direction at the end

References internal_size_u, and internal_size_v.

Referenced by scene::erase_u_back_line().

void cpe::grid::suppress_back_v (  ) 

suppress a line of grid in the v direction at the end

References internal_size_u, and internal_size_v.

Referenced by scene::erase_v_back_line().

void cpe::grid::suppress_front_u (  ) 

suppress a line of grid in the u direction at the beginning

References internal_size_u, and internal_size_v.

Referenced by scene::erase_u_front_line().

void cpe::grid::suppress_front_v (  ) 

suppress a line of grid in the v direction at the beginning

References internal_size_u, and internal_size_v.

Referenced by scene::erase_v_front_line().

void cpe::grid::write ( const std::string &  filename  )  const

Write grid into a file.

References internal_data, internal_size_u, internal_size_v, cpe::v3::x(), cpe::v3::y(), and cpe::v3::z().

Referenced by scene::save_grid().

Here is the call graph for this function:


Friends And Related Function Documentation

grid operator* ( const grid g,
const double &  s 
) [friend]

scale the grid homogeneously by a scalar

grid operator* ( const double &  s,
const grid g 
) [friend]

scale the grid homogeneously by a scalar

grid operator+ ( const v3 t,
const grid g 
) [friend]

translate the grid

grid operator+ ( const grid g,
const v3 t 
) [friend]

translate the grid

grid operator- ( const v3 t,
const grid g 
) [friend]

translate the grid

grid operator- ( const grid g,
const v3 t 
) [friend]

translate the grid


Member Data Documentation

std::vector<v3> cpe::grid::internal_data [private]

Internal storage under the form: ku+Nu*kv.

Referenced by build_meshgrid(), get_patch(), grid(), operator()(), operator*=(), operator+=(), operator-=(), resize(), and write().

unsigned int cpe::grid::internal_size_u [private]
unsigned int cpe::grid::internal_size_v [private]

The documentation for this class was generated from the following files:
Generated on Mon Feb 27 18:30:16 2012 by  doxygen 1.6.3