#include <CudaDistanceGridCollisionModel.h>
| Classes | |
| struct | CudaDistanceGridParams | 
| Public Attributes | |
| CudaVector< Coord > | meshPts | 
| sofa::core::topology::BaseMeshTopology::SeqTriangles | meshTriangles | 
| sofa::core::topology::BaseMeshTopology::SeqQuads | meshQuads | 
| Protected Attributes | |
| int | nbRef | 
| VecReal | dists | 
| const int | nx | 
| const int | ny | 
| const int | nz | 
| const int | nxny | 
| const int | nxnynz | 
| const Coord | pmin | 
| const Coord | pmax | 
| const Coord | cellWidth | 
| const Coord | invCellWidth | 
| Coord | bbmin | 
| Coord | bbmax | 
| bounding box of the object, smaller than the grid  More... | |
| Real | cubeDim | 
| Cube dimension (!=0 if this is actually a cube.  More... | |
| Public Member Functions | |
| CudaDistanceGrid (int nx, int ny, int nz, Coord pmin, Coord pmax) | |
| CudaDistanceGrid * | addRef () | 
| Add one reference to this grid. Note that loadShared already does this.  More... | |
| bool | release () | 
| Release one reference, deleting this grid if this is the last.  More... | |
| bool | save (const std::string &filename) | 
| Save current grid.  More... | |
| void | calcDistance () | 
| Compute distance field from stored mesh.  More... | |
| void | calcCubeDistance (Real dim=1, int np=5) | 
| void | sampleSurface (double sampling=-1.0) | 
| Sample the surface with points approximately separated by the given sampling distance (expressed in voxels if the value is negative)  More... | |
| void | computeBBox () | 
| Update bbox.  More... | |
| int | getNx () const | 
| int | getNy () const | 
| int | getNz () const | 
| const Coord & | getCellWidth () const | 
| const Coord & | getInvCellWidth () const | 
| const VecReal & | getDists () const | 
| VecReal & | getDists () | 
| int | size () const | 
| const Coord & | getBBMin () const | 
| const Coord & | getBBMax () const | 
| void | setBBMin (const Coord &val) | 
| void | setBBMax (const Coord &val) | 
| Coord | getBBCorner (int i) const | 
| bool | inBBox (const Coord &p, Real margin=0.0f) const | 
| const Coord & | getPMin () const | 
| const Coord & | getPMax () const | 
| Coord | getCorner (int i) const | 
| bool | isCube () const | 
| Real | getCubeDim () const | 
| bool | inGrid (const Coord &p) const | 
| Coord | clamp (Coord p) const | 
| Index | ix (const Coord &p) const | 
| Index | iy (const Coord &p) const | 
| Index | iz (const Coord &p) const | 
| Index | index (const Coord &p, Coord &coefs) const | 
| Index | index (const Coord &p) const | 
| Index | index (int x, int y, int z) | 
| Coord | coord (int x, int y, int z) | 
| Real | operator[] (Index index) const | 
| Real & | operator[] (Index index) | 
| Real | interp (Index index, const Coord &coefs) const | 
| Real | interp (const Coord &p) const | 
| Coord | grad (Index index, const Coord &coefs) const | 
| Coord | grad (const Coord &p) const | 
| Real | eval (const Coord &x) const | 
| Real | quickeval (const Coord &x) const | 
| Real | eval2 (const Coord &x) const | 
| Real | quickeval2 (const Coord &x) const | 
| Static Public Member Functions | |
| static Real | maxDist () | 
| static CudaDistanceGrid * | load (const std::string &filename, double scale=1.0, double sampling=0.0, int nx=64, int ny=64, int nz=64, Coord pmin=Coord(), Coord pmax=Coord()) | 
| Load a distance grid.  More... | |
| static CudaDistanceGrid * | loadShared (const std::string &filename, double scale=1.0, double sampling=0.0, int nx=64, int ny=64, int nz=64, Coord pmin=Coord(), Coord pmax=Coord()) | 
| Load or reuse a distance grid.  More... | |
| static Real | interp (Real coef, Real a, Real b) | 
| Protected Member Functions | |
| ~CudaDistanceGrid () | |
| Static Protected Member Functions | |
| static std::map< CudaDistanceGridParams, CudaDistanceGrid * > & | getShared () | 
| 
 | protected | 
bounding box of the object, smaller than the grid
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
Cube dimension (!=0 if this is actually a cube.
| 
 | protected | 
| 
 | protected | 
| CudaVector<Coord> sofa::gpu::cuda::CudaDistanceGrid::meshPts | 
| sofa::core::topology::BaseMeshTopology::SeqQuads sofa::gpu::cuda::CudaDistanceGrid::meshQuads | 
| sofa::core::topology::BaseMeshTopology::SeqTriangles sofa::gpu::cuda::CudaDistanceGrid::meshTriangles | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| sofa::gpu::cuda::CudaDistanceGrid::CudaDistanceGrid | ( | int | nx, | 
| int | ny, | ||
| int | nz, | ||
| Coord | pmin, | ||
| Coord | pmax | ||
| ) | 
| 
 | protected | 
| CudaDistanceGrid * sofa::gpu::cuda::CudaDistanceGrid::addRef | ( | ) | 
Add one reference to this grid. Note that loadShared already does this.
| void sofa::gpu::cuda::CudaDistanceGrid::calcCubeDistance | ( | Real | dim = 1, | 
| int | np = 5 | ||
| ) | 
Compute distance field for a cube of the given half-size. Also create a mesh of points using np points per axis
| void sofa::gpu::cuda::CudaDistanceGrid::calcDistance | ( | ) | 
Compute distance field from stored mesh.
Compute distance field from given mesh.
| void sofa::gpu::cuda::CudaDistanceGrid::computeBBox | ( | ) | 
Update bbox.
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | staticprotected | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | static | 
Load a distance grid.
| 
 | static | 
Load or reuse a distance grid.
| 
 | inlinestatic | 
| 
 | inline | 
| 
 | inline | 
| bool sofa::gpu::cuda::CudaDistanceGrid::release | ( | ) | 
Release one reference, deleting this grid if this is the last.
| void sofa::gpu::cuda::CudaDistanceGrid::sampleSurface | ( | double | sampling = -1.0 | ) | 
Sample the surface with points approximately separated by the given sampling distance (expressed in voxels if the value is negative)
| bool sofa::gpu::cuda::CudaDistanceGrid::save | ( | const std::string & | filename | ) | 
Save current grid.
| 
 | inline | 
| 
 | inline | 
| 
 | inline |