#include <RegularGridTopology.h>


Public Member Functions | |
| RegularGridTopology (int nx, int ny, int nz) | |
| RegularGridTopology () | |
| virtual void | reinit () |
| Update method called when variables used in precomputation are modified. | |
| void | parse (core::objectmodel::BaseObjectDescription *arg) |
| Parse the given description to assign values to this object's fields and potentially other parameters. | |
| void | setP0 (const Vector3 &val) |
| void | setDx (const Vector3 &val) |
| void | setDy (const Vector3 &val) |
| void | setDz (const Vector3 &val) |
| void | setPos (SReal xmin, SReal xmax, SReal ymin, SReal ymax, SReal zmin, SReal zmax) |
| const Vector3 & | getP0 () const |
| const Vector3 & | getDx () const |
| const Vector3 & | getDy () const |
| const Vector3 & | getDz () const |
| unsigned | getIndex (int i, int j, int k) const |
| one-dimensional index of a grid point | |
| Vector3 | getPoint (int i) const |
| Vector3 | getPoint (int x, int y, int z) const |
| bool | hasPos () const |
| double | getPX (int i) const |
| double | getPY (int i) const |
| double | getPZ (int i) const |
| unsigned | getCubeIndex (int i, int j, int k) const |
| one-dimensional index of a grid cube | |
| Vector3 | getCubeCoordinate (int i) const |
| from the one-dimensional index of a grid cube, give its three-dimensional indices | |
| Vector3 | getMin () const |
| Vector3 | getMax () const |
| virtual int | findCube (const Vector3 &pos) |
| return the cube containing the given point (or -1 if not found). | |
| int | findHexa (const Vector3 &pos) |
| virtual int | findNearestCube (const Vector3 &pos) |
| return the nearest cube (or -1 if not found). | |
| int | findNearestHexa (const Vector3 &pos) |
| virtual int | findCube (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) |
| return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e. | |
| int | findHexa (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) |
| virtual int | findNearestCube (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) |
| return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e. | |
| int | findNearestHexa (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) |
Protected Attributes | |
| Data< Vector3 > | min |
| Data< Vector3 > | max |
| Data< Vector3 > | p0 |
| Position of point 0. | |
| Vector3 | dx |
| Distance between points in the grid. Must be perpendicular to each other. | |
| Vector3 | dy |
| Vector3 | dz |
| SReal | inv_dx2 |
| SReal | inv_dy2 |
| SReal | inv_dz2 |
Definition at line 43 of file RegularGridTopology.h.
Definition at line 76 of file RegularGridTopology.cpp.
| sofa::component::topology::RegularGridTopology::RegularGridTopology | ( | ) |
Definition at line 84 of file RegularGridTopology.cpp.
| int sofa::component::topology::RegularGridTopology::findCube | ( | const Vector3 & | pos, | |
| SReal & | fx, | |||
| SReal & | fy, | |||
| SReal & | fz | |||
| ) | [virtual] |
return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e.
return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e.
barycentric coordinates).
Definition at line 173 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::cube(), dx, dy, dz, sofa::core::objectmodel::Data< T >::getValue(), inv_dx2, inv_dy2, inv_dz2, sofa::component::topology::GridTopology::n, and p0.
return the cube containing the given point (or -1 if not found).
Definition at line 131 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::cube(), dx, dy, dz, sofa::core::objectmodel::Data< T >::getValue(), inv_dx2, inv_dy2, inv_dz2, sofa::component::topology::GridTopology::n, and p0.
Referenced by findHexa(), and sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::init().
| int sofa::component::topology::RegularGridTopology::findNearestCube | ( | const Vector3 & | pos, | |
| SReal & | fx, | |||
| SReal & | fy, | |||
| SReal & | fz | |||
| ) | [virtual] |
return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e.
return the cube containing the given point (or -1 if not found), as well as deplacements from its first corner in terms of dx, dy, dz (i.e.
barycentric coordinates).
Definition at line 200 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::cube(), dx, dy, dz, sofa::core::objectmodel::Data< T >::getValue(), inv_dx2, inv_dy2, inv_dz2, sofa::component::topology::GridTopology::n, and p0.
| int sofa::component::topology::RegularGridTopology::findNearestCube | ( | const Vector3 & | pos | ) | [virtual] |
return the nearest cube (or -1 if not found).
Definition at line 155 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::cube(), dx, dy, dz, sofa::core::objectmodel::Data< T >::getValue(), inv_dx2, inv_dy2, inv_dz2, sofa::component::topology::GridTopology::n, and p0.
Referenced by findNearestHexa(), and sofa::component::mapping::BarycentricMapperRegularGridTopology< In, Out >::init().
from the one-dimensional index of a grid cube, give its three-dimensional indices
Definition at line 225 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::n.
Referenced by sofa::component::topology::SparseGridTopology::findneighboorCubes().
one-dimensional index of a grid cube
Definition at line 220 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::n.
Referenced by sofa::component::topology::SparseGridTopology::findneighboorCubes().
| const Vector3& sofa::component::topology::RegularGridTopology::getDx | ( | ) | const [inline] |
Definition at line 65 of file RegularGridTopology.h.
References dx.
Referenced by sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addDForce(), sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addForce(), sofa::component::topology::SparseGridTopology::buildFromFiner(), and sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::draw().
| const Vector3& sofa::component::topology::RegularGridTopology::getDy | ( | ) | const [inline] |
Definition at line 66 of file RegularGridTopology.h.
References dy.
Referenced by sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addDForce(), sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addForce(), sofa::component::topology::SparseGridTopology::buildFromFiner(), and sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::draw().
| const Vector3& sofa::component::topology::RegularGridTopology::getDz | ( | ) | const [inline] |
Definition at line 67 of file RegularGridTopology.h.
References dz.
Referenced by sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addDForce(), sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::addForce(), sofa::component::topology::SparseGridTopology::buildFromFiner(), and sofa::component::forcefield::RegularGridSpringForceField< DataTypes >::draw().
one-dimensional index of a grid point
Definition at line 111 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::n.
| Vector3 sofa::component::topology::RegularGridTopology::getMax | ( | ) | const [inline] |
Definition at line 83 of file RegularGridTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), and max.
| Vector3 sofa::component::topology::RegularGridTopology::getMin | ( | ) | const [inline] |
Definition at line 82 of file RegularGridTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), and min.
| const Vector3& sofa::component::topology::RegularGridTopology::getP0 | ( | ) | const [inline] |
Definition at line 64 of file RegularGridTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), and p0.
Referenced by sofa::component::MechanicalObject< DataTypes >::reinit().
Definition at line 125 of file RegularGridTopology.cpp.
References dx, dy, dz, sofa::core::objectmodel::Data< T >::getValue(), and p0.
Definition at line 117 of file RegularGridTopology.cpp.
References sofa::component::topology::GridTopology::n.
Referenced by sofa::component::topology::SparseGridTopology::buildFromFiner(), sofa::component::topology::SparseGridTopology::buildFromRegularGridTypes(), getPX(), getPY(), getPZ(), and sofa::component::topology::SparseGridTopology::voxelizeTriangleMesh().
| double sofa::component::topology::RegularGridTopology::getPX | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 73 of file RegularGridTopology.h.
References getPoint().
| double sofa::component::topology::RegularGridTopology::getPY | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 74 of file RegularGridTopology.h.
References getPoint().
| double sofa::component::topology::RegularGridTopology::getPZ | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 75 of file RegularGridTopology.h.
References getPoint().
| bool sofa::component::topology::RegularGridTopology::hasPos | ( | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 72 of file RegularGridTopology.h.
| void sofa::component::topology::RegularGridTopology::parse | ( | core::objectmodel::BaseObjectDescription * | arg | ) | [virtual] |
Parse the given description to assign values to this object's fields and potentially other parameters.
Reimplemented from sofa::component::topology::GridTopology.
Definition at line 41 of file RegularGridTopology.cpp.
References sofa::core::objectmodel::BaseObjectDescription::getAttribute(), sofa::core::objectmodel::Data< T >::getValue(), max, min, setPos(), and sofa::core::objectmodel::Data< T >::setValue().
| virtual void sofa::component::topology::RegularGridTopology::reinit | ( | ) | [inline, virtual] |
Update method called when variables used in precomputation are modified.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 49 of file RegularGridTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), max, min, and setPos().
| void sofa::component::topology::RegularGridTopology::setDx | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::RegularGridTopology::setDy | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::RegularGridTopology::setDz | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::RegularGridTopology::setP0 | ( | const Vector3 & | val | ) | [inline] |
Definition at line 56 of file RegularGridTopology.h.
References p0.
Referenced by sofa::component::MechanicalObject< DataTypes >::reinit(), and setPos().
| void sofa::component::topology::RegularGridTopology::setPos | ( | SReal | xmin, | |
| SReal | xmax, | |||
| SReal | ymin, | |||
| SReal | ymax, | |||
| SReal | zmin, | |||
| SReal | zmax | |||
| ) |
Definition at line 91 of file RegularGridTopology.cpp.
References sofa::core::objectmodel::BaseData::isSet(), max, min, sofa::component::topology::GridTopology::n, p0, setDx(), setDy(), setDz(), setP0(), and sofa::core::objectmodel::Data< T >::setValue().
Referenced by sofa::component::topology::SparseGridTopology::buildFromFiner(), sofa::component::topology::SparseGridTopology::buildFromRawVoxelFile(), sofa::component::topology::SparseGridTopology::buildFromTriangleMesh(), sofa::component::topology::SparseGridTopology::buildFromVoxelFile(), main(), parse(), and reinit().
Distance between points in the grid. Must be perpendicular to each other.
Definition at line 109 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), getDx(), getPoint(), and setDx().
Definition at line 109 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), getDy(), getPoint(), and setDy().
Definition at line 109 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), getDz(), getPoint(), and setDz().
Definition at line 110 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), and setDx().
Definition at line 110 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), and setDy().
Definition at line 110 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), and setDz().
Data< Vector3 > sofa::component::topology::RegularGridTopology::max [protected] |
Data< Vector3 > sofa::component::topology::RegularGridTopology::min [protected] |
Data< Vector3 > sofa::component::topology::RegularGridTopology::p0 [protected] |
Position of point 0.
Definition at line 107 of file RegularGridTopology.h.
Referenced by findCube(), findNearestCube(), getP0(), getPoint(), setP0(), and setPos().
1.5.7.1