cpe::spring_mesh Class Reference

square spring mesh More...

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

List of all members.

Public Member Functions

 spring_mesh (const unsigned int &N=0)
 constructor
void compute_force ()
 compute force
void apply_force (const double &dt)
 apply force with stepsize dt
void init ()
 init values
const unsigned int & size () const
 size N (number of vertex per row: total vertices=NxN)
const std::vector< float > & get_vertex () const
 get the vertices
std::vector< float > & get_vertex ()
 get the vertices
const std::vector< float > & get_vertex_storage () const
 get the vertices
std::vector< float > & get_vertex_storage ()
 get the vertices
float & get_K_structural ()
 get structural stiffness
const float & get_K_structural () const
 get structural stiffness
float & get_K_shear ()
 get shear stiffness
const float & get_K_shear () const
 get shear stiffness
float & get_K_bending ()
 get bending stiffness
const float & get_K_bending () const
 get bending stiffness
float & get_damping ()
 get damping coeff
const float & get_damping () const
 get damping coeff
mesh to_mesh () const
 export mesh structure
void store_vertices ()
 send current vertices to storage structure

Private Attributes

unsigned int N
 number of vertices = NxN
std::vector< float > vertices
 vertices position
std::vector< float > vertices_store
 special storage of vertices (for drawing purpose)
std::vector< float > forces
 force container
std::vector< float > speed
 speed container
float K_structural
 structural stiffness
float K_shear
 shear stiffness
float K_bending
 bending stiffness
float damping
 damping coefficient

Detailed Description

square spring mesh


Constructor & Destructor Documentation

cpe::spring_mesh::spring_mesh ( const unsigned int &  N = 0  ) 

constructor

References init(), N, and vertices.

Here is the call graph for this function:


Member Function Documentation

void cpe::spring_mesh::apply_force ( const double &  dt  ) 

apply force with stepsize dt

References N, and speed.

Referenced by draw_scene().

void cpe::spring_mesh::compute_force (  ) 

compute force

References forces, N, and vertices.

Referenced by draw_scene().

const float & cpe::spring_mesh::get_damping (  )  const

get damping coeff

References damping.

float & cpe::spring_mesh::get_damping (  ) 

get damping coeff

References damping.

const float & cpe::spring_mesh::get_K_bending (  )  const

get bending stiffness

References K_bending.

float & cpe::spring_mesh::get_K_bending (  ) 

get bending stiffness

References K_bending.

Referenced by load_model().

const float & cpe::spring_mesh::get_K_shear (  )  const

get shear stiffness

References K_shear.

float & cpe::spring_mesh::get_K_shear (  ) 

get shear stiffness

References K_shear.

Referenced by load_model().

const float & cpe::spring_mesh::get_K_structural (  )  const

get structural stiffness

References K_structural.

float & cpe::spring_mesh::get_K_structural (  ) 

get structural stiffness

References K_structural.

Referenced by load_model().

std::vector< float > & cpe::spring_mesh::get_vertex (  ) 

get the vertices

References vertices.

const std::vector< float > & cpe::spring_mesh::get_vertex (  )  const

get the vertices

References vertices.

std::vector< float > & cpe::spring_mesh::get_vertex_storage (  ) 

get the vertices

References vertices_store.

const std::vector< float > & cpe::spring_mesh::get_vertex_storage (  )  const

get the vertices

References vertices_store.

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

void cpe::spring_mesh::init (  ) 

init values

References N, and vertices.

Referenced by spring_mesh().

const unsigned int & cpe::spring_mesh::size (  )  const

size N (number of vertex per row: total vertices=NxN)

References N.

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

void cpe::spring_mesh::store_vertices (  ) 

send current vertices to storage structure

References vertices, and vertices_store.

Referenced by draw_scene().

mesh cpe::spring_mesh::to_mesh (  )  const

export mesh structure

References cpe::mesh::add_triangle(), cpe::mesh::get_texture(), cpe::mesh::get_vertex(), N, and vertices.

Referenced by draw_scene().

Here is the call graph for this function:


Member Data Documentation

float cpe::spring_mesh::damping [private]

damping coefficient

Referenced by get_damping().

std::vector<float> cpe::spring_mesh::forces [private]

force container

Referenced by compute_force().

float cpe::spring_mesh::K_bending [private]

bending stiffness

Referenced by get_K_bending().

float cpe::spring_mesh::K_shear [private]

shear stiffness

Referenced by get_K_shear().

structural stiffness

Referenced by get_K_structural().

unsigned int cpe::spring_mesh::N [private]

number of vertices = NxN

Referenced by apply_force(), compute_force(), init(), size(), spring_mesh(), and to_mesh().

std::vector<float> cpe::spring_mesh::speed [private]

speed container

Referenced by apply_force().

std::vector<float> cpe::spring_mesh::vertices [private]

vertices position

Referenced by compute_force(), get_vertex(), init(), spring_mesh(), store_vertices(), and to_mesh().

std::vector<float> cpe::spring_mesh::vertices_store [private]

special storage of vertices (for drawing purpose)

Referenced by get_vertex_storage(), and store_vertices().


The documentation for this class was generated from the following files:
Generated on Tue Dec 28 08:43:46 2010 by  doxygen 1.6.3