#include <CubeTopology.h>


Public Types | |
| enum | Plane { PLANE_UNKNOWN = 0, PLANE_X0, PLANE_X1, PLANE_Y0, PLANE_Y1, PLANE_Z0, PLANE_Z1 } |
Public Member Functions | |
| CubeTopology (int nx, int ny, int nz) | |
| CubeTopology () | |
| void | setSize (int nx, int ny, int nz) |
| void | parse (core::objectmodel::BaseObjectDescription *arg) |
| Parse the given description to assign values to this object's fields and potentially other parameters. | |
| int | getNx () const |
| int | getNy () const |
| int | getNz () const |
| void | setNx (int n) |
| void | setNy (int n) |
| void | setNz (int n) |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | reinit () |
| Update method called when variables used in precomputation are modified. | |
| int | point (int x, int y, int z, Plane p=PLANE_UNKNOWN) const |
| 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 |
| Vector3 | getMin () const |
| Vector3 | getMax () const |
| 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 |
| void | setSplitNormals (bool b) |
Protected Member Functions | |
| virtual void | setSize () |
| void | updateEdges () |
| void | updateQuads () |
Protected Attributes | |
| Data< int > | nx |
| Data< int > | ny |
| Data< int > | nz |
| Data< bool > | internalPoints |
| Data< bool > | splitNormals |
| Data< Vector3 > | min |
| Data< Vector3 > | max |
| 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 42 of file CubeTopology.h.
Definition at line 68 of file CubeTopology.h.
Definition at line 74 of file CubeTopology.cpp.
| sofa::component::topology::CubeTopology::CubeTopology | ( | ) |
Definition at line 84 of file CubeTopology.cpp.
| const Vector3& sofa::component::topology::CubeTopology::getDx | ( | ) | const [inline] |
| const Vector3& sofa::component::topology::CubeTopology::getDy | ( | ) | const [inline] |
| const Vector3& sofa::component::topology::CubeTopology::getDz | ( | ) | const [inline] |
| Vector3 sofa::component::topology::CubeTopology::getMax | ( | ) | const [inline] |
Definition at line 91 of file CubeTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), and max.
| Vector3 sofa::component::topology::CubeTopology::getMin | ( | ) | const [inline] |
Definition at line 90 of file CubeTopology.h.
References sofa::core::objectmodel::Data< T >::getValue(), and min.
| int sofa::component::topology::CubeTopology::getNx | ( | ) | const [inline] |
Definition at line 53 of file CubeTopology.h.
| int sofa::component::topology::CubeTopology::getNy | ( | ) | const [inline] |
Definition at line 54 of file CubeTopology.h.
| int sofa::component::topology::CubeTopology::getNz | ( | ) | const [inline] |
Definition at line 55 of file CubeTopology.h.
| const Vector3& sofa::component::topology::CubeTopology::getP0 | ( | ) | const [inline] |
Definition at line 263 of file CubeTopology.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), internalPoints, nx, ny, nz, and splitNormals.
| double sofa::component::topology::CubeTopology::getPX | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 96 of file CubeTopology.h.
References getPoint().
| double sofa::component::topology::CubeTopology::getPY | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 97 of file CubeTopology.h.
References getPoint().
| double sofa::component::topology::CubeTopology::getPZ | ( | int | i | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 98 of file CubeTopology.h.
References getPoint().
| bool sofa::component::topology::CubeTopology::hasPos | ( | ) | const [inline, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 95 of file CubeTopology.h.
| void sofa::component::topology::CubeTopology::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 103 of file CubeTopology.cpp.
References setSize().
| void sofa::component::topology::CubeTopology::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::core::componentmodel::topology::BaseMeshTopology.
Definition at line 41 of file CubeTopology.cpp.
References sofa::core::objectmodel::BaseObjectDescription::getAttribute(), sofa::core::objectmodel::Data< T >::getValue(), max, min, setPos(), setSize(), and sofa::core::objectmodel::Data< T >::setValue().
| int sofa::component::topology::CubeTopology::point | ( | int | x, | |
| int | y, | |||
| int | z, | |||
| Plane | p = PLANE_UNKNOWN | |||
| ) | const |
Definition at line 131 of file CubeTopology.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), internalPoints, nx, ny, nz, PLANE_UNKNOWN, PLANE_X0, PLANE_X1, PLANE_Y0, PLANE_Y1, PLANE_Z0, PLANE_Z1, and splitNormals.
Referenced by updateEdges(), and updateQuads().
| void sofa::component::topology::CubeTopology::reinit | ( | ) | [virtual] |
Update method called when variables used in precomputation are modified.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 109 of file CubeTopology.cpp.
References setSize().
| void sofa::component::topology::CubeTopology::setDx | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::CubeTopology::setDy | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::CubeTopology::setDz | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::CubeTopology::setNx | ( | int | n | ) | [inline] |
| void sofa::component::topology::CubeTopology::setNy | ( | int | n | ) | [inline] |
| void sofa::component::topology::CubeTopology::setNz | ( | int | n | ) | [inline] |
| void sofa::component::topology::CubeTopology::setP0 | ( | const Vector3 & | val | ) | [inline] |
| void sofa::component::topology::CubeTopology::setSize | ( | ) | [protected, virtual] |
Definition at line 116 of file CubeTopology.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), internalPoints, sofa::component::topology::MeshTopology::invalidate(), sofa::component::topology::MeshTopology::nbPoints, nx, ny, nz, and splitNormals.
Referenced by init(), parse(), reinit(), setNx(), setNy(), setNz(), and setSize().
| void sofa::component::topology::CubeTopology::setSplitNormals | ( | bool | b | ) | [inline] |
Definition at line 100 of file CubeTopology.h.
References sofa::core::objectmodel::Data< T >::setValue(), and splitNormals.
| void sofa::component::topology::CubeTopology::updateEdges | ( | ) | [protected, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 183 of file CubeTopology.cpp.
References nx, ny, nz, point(), and sofa::component::topology::MeshTopology::seqEdges.
| void sofa::component::topology::CubeTopology::updateQuads | ( | ) | [protected, virtual] |
Reimplemented from sofa::component::topology::MeshTopology.
Definition at line 208 of file CubeTopology.cpp.
References nx, ny, nz, PLANE_X0, PLANE_X1, PLANE_Y0, PLANE_Y1, PLANE_Z0, PLANE_Z1, point(), and sofa::component::topology::MeshTopology::seqQuads.
Vector3 sofa::component::topology::CubeTopology::dx [protected] |
Distance between points in the grid. Must be perpendicular to each other.
Definition at line 113 of file CubeTopology.h.
Referenced by getDx(), getPoint(), and setDx().
Vector3 sofa::component::topology::CubeTopology::dy [protected] |
Vector3 sofa::component::topology::CubeTopology::dz [protected] |
Data< Vector3 > sofa::component::topology::CubeTopology::max [protected] |
Data< Vector3 > sofa::component::topology::CubeTopology::min [protected] |
Data<int> sofa::component::topology::CubeTopology::nx [protected] |
Definition at line 103 of file CubeTopology.h.
Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().
Data<int> sofa::component::topology::CubeTopology::ny [protected] |
Definition at line 104 of file CubeTopology.h.
Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().
Data<int> sofa::component::topology::CubeTopology::nz [protected] |
Definition at line 105 of file CubeTopology.h.
Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().
Vector3 sofa::component::topology::CubeTopology::p0 [protected] |
Position of point 0.
Definition at line 111 of file CubeTopology.h.
Referenced by getP0(), getPoint(), and setP0().
Definition at line 107 of file CubeTopology.h.
Referenced by getPoint(), point(), setSize(), and setSplitNormals().
1.5.7.1