square spring mesh More...
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 |
square spring mesh
cpe::spring_mesh::spring_mesh | ( | const unsigned int & | N = 0 |
) |
void cpe::spring_mesh::apply_force | ( | const double & | dt | ) |
void cpe::spring_mesh::compute_force | ( | ) |
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 | ( | ) |
const float & cpe::spring_mesh::get_K_shear | ( | ) | const |
get shear stiffness
References K_shear.
float & cpe::spring_mesh::get_K_shear | ( | ) |
const float & cpe::spring_mesh::get_K_structural | ( | ) | const |
get structural stiffness
References K_structural.
float & cpe::spring_mesh::get_K_structural | ( | ) |
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 |
void cpe::spring_mesh::init | ( | ) |
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().
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().
float cpe::spring_mesh::K_structural [private] |
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().