#include <Fluid2D.h>


Data Structures | |
| struct | CubeData |
| For each cube, store the vertex indices on each 3 first edges, and the data value. More... | |
| struct | Face |
| struct | Vertex |
Public Types | |
| typedef Grid2D::real | real |
| typedef Grid2D::vec2 | vec2 |
| typedef Vec< 3, real > | vec3 |
Public Member Functions | |
| Fluid2D () | |
| virtual | ~Fluid2D () |
| int | getNx () const |
| void | setNx (int v) |
| int | getNy () const |
| void | setNy (int v) |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | reset () |
| Reset to initial state. | |
| virtual void | updatePosition (double dt) |
| Computation of a new simulation step. | |
| virtual void | drawVisual () |
| Display the VisualModel object. | |
| virtual bool | addBBox (double *minBBox, double *maxBBox) |
| used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects. | |
| virtual void | initVisual () |
| Initialize the textures, or other graphical resources. | |
| virtual void | updateVisual () |
| used to update the model if necessary. | |
Data Fields | |
| sofa::core::objectmodel::DataPtr < int > | f_nx |
| sofa::core::objectmodel::DataPtr < int > | f_ny |
| sofa::core::objectmodel::DataPtr < real > | f_cellwidth |
| sofa::core::objectmodel::Data < real > | f_height |
| sofa::core::objectmodel::Data < vec2 > | f_dir |
| sofa::core::objectmodel::Data < real > | f_tstart |
| sofa::core::objectmodel::Data < real > | f_tstop |
Protected Member Functions | |
| template<int C> | |
| int | addPoint (int x, int y, int z, real v0, real v1, real iso) |
| int | addFace (int p1, int p2, int p3) |
Protected Attributes | |
| int | nx |
| int | ny |
| real | cellwidth |
| Grid2D * | fluid |
| Grid2D * | fnext |
| Grid2D * | ftemp |
| sofa::helper::vector< Vertex > | points |
| sofa::helper::vector< Face > | facets |
| sofa::helper::vector< CubeData > | planes |
Definition at line 47 of file Fluid2D.h.
| sofa::component::behaviormodel::eulerianfluid::Fluid2D::Fluid2D | ( | ) |
Definition at line 52 of file Fluid2D.cpp.
| sofa::component::behaviormodel::eulerianfluid::Fluid2D::~Fluid2D | ( | ) | [virtual] |
| bool sofa::component::behaviormodel::eulerianfluid::Fluid2D::addBBox | ( | double * | , | |
| double * | ||||
| ) | [virtual] |
used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects.
Reimplemented from sofa::core::VisualModel.
Definition at line 406 of file Fluid2D.cpp.
| int sofa::component::behaviormodel::eulerianfluid::Fluid2D::addFace | ( | int | p1, | |
| int | p2, | |||
| int | p3 | |||
| ) | [inline, protected] |
Definition at line 132 of file Fluid2D.h.
References facets, and points.
Referenced by updateVisual().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::drawVisual | ( | ) | [virtual] |
Display the VisualModel object.
Reimplemented from sofa::core::VisualModel.
Definition at line 103 of file Fluid2D.cpp.
References cellwidth, facets, fluid, sofa::component::behaviormodel::eulerianfluid::Grid2D::get(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getDt(), sofa::component::behaviormodel::eulerianfluid::Grid2D::getlevelset(), nx, ny, points, and sofa::helper::rabs().
| int sofa::component::behaviormodel::eulerianfluid::Fluid2D::getNx | ( | ) | const [inline] |
Definition at line 73 of file Fluid2D.h.
References f_nx, and sofa::core::objectmodel::DataPtr< T >::getValue().
| int sofa::component::behaviormodel::eulerianfluid::Fluid2D::getNy | ( | ) | const [inline] |
Definition at line 76 of file Fluid2D.h.
References f_ny, and sofa::core::objectmodel::DataPtr< T >::getValue().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 74 of file Fluid2D.cpp.
References sofa::core::objectmodel::DataPtr< T >::beginEdit(), sofa::component::behaviormodel::eulerianfluid::Grid2D::clear(), f_cellwidth, f_dir, f_height, f_nx, f_ny, f_tstart, f_tstop, fluid, fnext, ftemp, nx, ny, sofa::component::behaviormodel::eulerianfluid::Grid2D::seed(), sofa::component::behaviormodel::eulerianfluid::Grid2D::t, and sofa::component::behaviormodel::eulerianfluid::Grid2D::tend.
Referenced by reset().
| virtual void sofa::component::behaviormodel::eulerianfluid::Fluid2D::initVisual | ( | ) | [inline, virtual] |
Initialize the textures, or other graphical resources.
Called once before the first frame is drawn, and if the graphical context has been recreated.
Reimplemented from sofa::core::VisualModel.
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::reset | ( | void | ) | [virtual] |
Reset to initial state.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 92 of file Fluid2D.cpp.
References init().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::setNx | ( | int | v | ) | [inline] |
Definition at line 74 of file Fluid2D.h.
References f_nx, and sofa::core::objectmodel::DataPtr< T >::setValue().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::setNy | ( | int | v | ) | [inline] |
Definition at line 77 of file Fluid2D.h.
References f_ny, and sofa::core::objectmodel::DataPtr< T >::setValue().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::updatePosition | ( | double | dt | ) | [virtual] |
Computation of a new simulation step.
Implements sofa::core::BehaviorModel.
Definition at line 97 of file Fluid2D.cpp.
References fluid, fnext, ftemp, and sofa::component::behaviormodel::eulerianfluid::Grid2D::step().
| void sofa::component::behaviormodel::eulerianfluid::Fluid2D::updateVisual | ( | ) | [virtual] |
used to update the model if necessary.
Reimplemented from sofa::core::VisualModel.
Definition at line 209 of file Fluid2D.cpp.
References addFace(), cross(), facets, fluid, sofa::component::behaviormodel::eulerianfluid::Grid2D::levelset, sofa::helper::MarchingCubeTriTable, sofa::defaulttype::Vec< N, real >::normalize(), nx, ny, sofa::component::behaviormodel::eulerianfluid::Fluid2D::CubeData::p, planes, and points.
sofa::helper::vector<Face> sofa::component::behaviormodel::eulerianfluid::Fluid2D::facets [protected] |
Definition at line 108 of file Fluid2D.h.
Referenced by addFace(), drawVisual(), and updateVisual().
Definition at line 57 of file Fluid2D.h.
Referenced by drawVisual(), init(), updatePosition(), updateVisual(), and ~Fluid2D().
Definition at line 54 of file Fluid2D.h.
Referenced by addBBox(), drawVisual(), init(), and updateVisual().
Definition at line 54 of file Fluid2D.h.
Referenced by addBBox(), drawVisual(), init(), and updateVisual().
sofa::helper::vector<Vertex> sofa::component::behaviormodel::eulerianfluid::Fluid2D::points [protected] |
Definition at line 107 of file Fluid2D.h.
Referenced by addFace(), addPoint(), drawVisual(), and updateVisual().
1.5.7.1