sofa::component::topology::SparseGridTopology Class Reference

A sparse grid topology. More...

#include <SparseGridTopology.h>

Inheritance diagram for sofa::component::topology::SparseGridTopology:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::topology::SparseGridTopology:

Collaboration graph
[legend]

Public Types

enum  Type { OUTSIDE, INSIDE, BOUNDARY }
enum  {
  UP, DOWN, RIGHT, LEFT,
  BEFORE, BEHIND, NUM_CONNECTED_NODES
}
typedef fixed_array< Vector3, 8 > CubeCorners
typedef Vec< 3, int > Vec3i
typedef std::map< Vector3, int > MapBetweenCornerPositionAndIndice
 a vertex indice for a given vertex position in space
typedef std::vector
< fixed_array< int, 8 > > 
HierarchicalCubeMap
 connexion between several coarsened levels
typedef helper::vector< int > InverseHierarchicalCubeMap
 a fine cube indice -> corresponding coarser cube indice
typedef std::map< int, float > AHierarchicalPointMap
typedef helper::vector
< AHierarchicalPointMap > 
HierarchicalPointMap
 a point indice -> corresponding 27 child indices on the potential _finerSparseGrid with corresponding weight
typedef helper::vector
< AHierarchicalPointMap > 
InverseHierarchicalPointMap
 a fine point indice -> corresponding some parent points for interpolation
typedef helper::vector< int > PointMap
typedef helper::vector
< helper::fixed_array< int,
NUM_CONNECTED_NODES > > 
NodeAdjacency
 a node -> its 6 neighboors
typedef helper::vector
< helper::vector< int > > 
NodeCubesAdjacency
 a node -> its 8 neighboor cells
typedef helper::vector
< helper::vector< int > > 
NodeCornersAdjacency
 a node -> its 8 corners of neighboor cells

Public Member Functions

 SparseGridTopology (bool _isVirtual=false)
bool load (const char *filename)
 Load the topology from a file.
virtual void init ()
 Initialization method called at graph modification, during bottom-up traversal.
void buildAsFinest ()
 building from a mesh file
void buildFromFiner ()
 building by condensating a finer sparse grid (used if setFinerSparseGrid has initializated _finerSparseGrid before calling init() )
void buildVirtualFinerLevels ()
 building eventual virtual finer levels (cf _nbVirtualFinerLevels)
Vec< 3, int > getN () const
int getNx () const
int getNy () const
int getNz () const
void setN (Vec3i _n)
void setNx (int _n)
void setNy (int _n)
void setNz (int _n)
int getNbVirtualFinerLevels () const
void setNbVirtualFinerLevels (int n)
void setMin (Vector3 val)
void setXmin (SReal val)
void setYmin (SReal val)
void setZmin (SReal val)
void setMax (Vector3 val)
void setXmax (SReal val)
void setYmax (SReal val)
void setZmax (SReal val)
Vector3 getMin ()
SReal getXmin ()
SReal getYmin ()
SReal getZmin ()
Vector3 getMax ()
SReal getXmax ()
SReal getYmax ()
SReal getZmax ()
bool hasPos () const
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.
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.
virtual helper::fixed_array
< int, 6 > 
findneighboorCubes (int indice)
 return indices of 6 neighboor cubes
virtual Type getType (int i)
 return the type of the i-th cube
SparseGridTopology * getFinerSparseGrid () const
void setFinerSparseGrid (SparseGridTopology *fsp)
SparseGridTopology * getCoarserSparseGrid () const
void setCoarserSparseGrid (SparseGridTopology *csp)
void updateMesh ()
Vector3 getPointPos (int i)
void getMesh (sofa::helper::io::Mesh &m)
void setDimVoxels (int a, int b, int c)
void setSizeVoxel (float a, float b, float c)
bool getVoxel (unsigned int x, unsigned int y, unsigned int z)
bool getVoxel (unsigned int index) const
virtual const SeqCubes & getHexas ()
virtual int getNbPoints () const
virtual int getNbHexas ()

Data Fields

HierarchicalCubeMap _hierarchicalCubeMap
InverseHierarchicalCubeMap _inverseHierarchicalCubeMap
HierarchicalPointMap _hierarchicalPointMap
InverseHierarchicalPointMap _inverseHierarchicalPointMap
PointMap _pointMap
 a coarse point indice -> corresponding point in finer level
PointMap _inversePointMap
 a fine point indice -> corresponding point in coarser level
NodeAdjacency _nodeAdjacency
NodeCubesAdjacency _nodeCubesAdjacency
NodeCornersAdjacency _nodeCornersAdjacency
helper::vector
< SparseGridTopology * > 
_virtualFinerLevels
 saving the virtual levels (cf _nbVirtualFinerLevels)
RegularGridTopology _regularGrid
 based on a corresponding RegularGrid
vector< int > _indicesOfRegularCubeInSparseGrid
 to redirect an indice of a cube in the regular grid to its indice in the sparse grid
vector< int > _indicesOfCubeinRegularGrid
 to redirect an indice of a cube in the sparse grid to its indice in the regular grid

Static Public Attributes

static const float WEIGHT27 [8][27]
static const int cornerIndicesFromFineToCoarse [8][8]

Protected Member Functions

virtual void updateEdges ()
virtual void updateQuads ()
virtual void updateHexas ()
void propagateFrom (const int i, const int j, const int k, RegularGridTopology &regularGrid, vector< Type > &regularGridTypes, vector< bool > &alreadyTested) const
 start from a seed cell (i,j,k) the OUTSIDE filling is propagated to neighboor cells until meet a BOUNDARY cell (this function is called from all border cells of the RegularGrid)
void computeBoundingBox (const helper::vector< Vector3 > &vertices, SReal &xmin, SReal &xmax, SReal &ymin, SReal &ymax, SReal &zmin, SReal &zmax) const
void voxelizeTriangleMesh (helper::io::Mesh *mesh, RegularGridTopology &regularGrid, vector< Type > &regularGridTypes) const
void buildFromTriangleMesh (const std::string &filename)
void buildFromRegularGridTypes (RegularGridTopology &regularGrid, const vector< Type > &regularGridTypes)
void buildFromVoxelFile (const std::string &filename)
 Create a sparse grid from a .voxel file .voxel file format (ascii): 512 // num voxels x 512 // num voxels y 246 // num voxels z 0.7 // voxels size x [mm] 0.7 // voxels size y [mm] 2 // voxels size z [mm] 0 0 255 0 0 .
void buildFromRawVoxelFile (const std::string &filename)
template<class T >
void constructCollisionModels (const sofa::helper::vector< sofa::core::componentmodel::topology::BaseMeshTopology * > &list_mesh, const sofa::helper::vector< sofa::helper::vector< Vec< 3, T > > * > &list_X) const
void setVoxel (int index, unsigned char value)

Protected Attributes

bool isVirtual
Data< Vec< 3, int > > n
 cutting number in all directions
Data< Vector3 > _min
Data< Vector3 > _max
Data< int > _nbVirtualFinerLevels
 create virtual (not in the animation tree) finer sparse grids in order to dispose of finest information (usefull to compute better mechanical properties for example)
Data< Vec3i > dataResolution
Data< Vector3 > voxelSize
Data< unsigned int > marchingCubeStep
Data< unsigned int > convolutionSize
MarchingCubeUtility marchingCubes
Data< vector< unsigned char > > dataVoxels
bool _usingMC
sofa::helper::vector< Type > _types
 BOUNDARY or FULL filled cells.
SparseGridTopology * _finerSparseGrid
 an eventual finer sparse grid that can be used to built this coarser sparse grid
SparseGridTopology * _coarserSparseGrid
 an eventual coarser sparse grid
bool _alreadyInit

Detailed Description

A sparse grid topology.

Like a sparse FFD building from the bounding box of the object. Starting from a RegularGrid, only valid cells containing matter (ie intersecting the original surface mesh or totally inside the object) are considered. Valid cells are tagged by a Type BOUNDARY or INSIDE WARNING: the corresponding node in the XML file has to be placed BEFORE the MechanicalObject node, in order to excute its init() before the MechanicalObject one in order to be able to give dofs

Definition at line 53 of file SparseGridTopology.h.


Member Typedef Documentation

Definition at line 84 of file SparseGridTopology.h.

Definition at line 57 of file SparseGridTopology.h.

connexion between several coarsened levels

a cube indice -> corresponding 8 child indices on the potential _finerSparseGrid

Definition at line 79 of file SparseGridTopology.h.

a point indice -> corresponding 27 child indices on the potential _finerSparseGrid with corresponding weight

Definition at line 86 of file SparseGridTopology.h.

a fine cube indice -> corresponding coarser cube indice

Definition at line 81 of file SparseGridTopology.h.

a fine point indice -> corresponding some parent points for interpolation

Definition at line 88 of file SparseGridTopology.h.

a vertex indice for a given vertex position in space

Definition at line 76 of file SparseGridTopology.h.

a node -> its 6 neighboors

Definition at line 96 of file SparseGridTopology.h.

a node -> its 8 corners of neighboor cells

Definition at line 100 of file SparseGridTopology.h.

a node -> its 8 neighboor cells

Definition at line 98 of file SparseGridTopology.h.

Definition at line 90 of file SparseGridTopology.h.

Definition at line 60 of file SparseGridTopology.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
UP 
DOWN 
RIGHT 
LEFT 
BEFORE 
BEHIND 
NUM_CONNECTED_NODES 

Definition at line 95 of file SparseGridTopology.h.

Enumerator:
OUTSIDE 
INSIDE 
BOUNDARY 

Definition at line 58 of file SparseGridTopology.h.


Constructor & Destructor Documentation

sofa::component::topology::SparseGridTopology::SparseGridTopology ( bool  _isVirtual = false  ) 


Member Function Documentation

void sofa::component::topology::SparseGridTopology::buildAsFinest (  ) 

void sofa::component::topology::SparseGridTopology::buildFromFiner (  ) 

building by condensating a finer sparse grid (used if setFinerSparseGrid has initializated _finerSparseGrid before calling init() )

Definition at line 756 of file SparseGridTopology.cpp.

References _coarserSparseGrid, _finerSparseGrid, _hierarchicalCubeMap, _hierarchicalPointMap, _indicesOfCubeinRegularGrid, _indicesOfRegularCubeInSparseGrid, _inverseHierarchicalCubeMap, _inverseHierarchicalPointMap, _inversePointMap, _pointMap, _regularGrid, _types, sofa::core::objectmodel::Data< T >::beginEdit(), BOUNDARY, cornerIndicesFromFineToCoarse, sofa::component::topology::GridTopology::cube(), sofa::core::objectmodel::Data< T >::endEdit(), sofa::helper::vector< T, Alloc >::fill(), sofa::component::topology::RegularGridTopology::getDx(), sofa::component::topology::RegularGridTopology::getDy(), sofa::component::topology::RegularGridTopology::getDz(), sofa::component::topology::MeshTopology::getHexa(), sofa::component::topology::GridTopology::getHexaCopy(), getMin(), sofa::component::topology::GridTopology::getNbHexas(), getNx(), getNy(), getNz(), sofa::component::topology::RegularGridTopology::getPoint(), getType(), sofa::core::objectmodel::Data< T >::getValue(), getXmax(), getXmin(), getYmax(), getYmin(), getZmax(), getZmin(), INSIDE, sofa::component::topology::MeshTopology::nbPoints, sofa::component::topology::MeshTopology::seqHexas, sofa::component::topology::MeshTopology::seqPoints, setMin(), setNx(), setNy(), setNz(), sofa::component::topology::RegularGridTopology::setPos(), sofa::component::topology::GridTopology::setSize(), setXmax(), setYmax(), setZmax(), and WEIGHT27.

Referenced by init().

void sofa::component::topology::SparseGridTopology::buildFromRawVoxelFile ( const std::string &  filename  )  [protected]

void sofa::component::topology::SparseGridTopology::buildFromRegularGridTypes ( RegularGridTopology &  regularGrid,
const vector< Type > &  regularGridTypes 
) [protected]

void sofa::component::topology::SparseGridTopology::buildFromTriangleMesh ( const std::string &  filename  )  [protected]

void sofa::component::topology::SparseGridTopology::buildFromVoxelFile ( const std::string &  filename  )  [protected]

void sofa::component::topology::SparseGridTopology::buildVirtualFinerLevels (  ) 

void sofa::component::topology::SparseGridTopology::computeBoundingBox ( const helper::vector< Vector3 > &  vertices,
SReal &  xmin,
SReal &  xmax,
SReal &  ymin,
SReal &  ymax,
SReal &  zmin,
SReal &  zmax 
) const [protected]

Referenced by buildFromTriangleMesh().

template<class T >
void sofa::component::topology::SparseGridTopology::constructCollisionModels ( const sofa::helper::vector< sofa::core::componentmodel::topology::BaseMeshTopology * > &  list_mesh,
const sofa::helper::vector< sofa::helper::vector< Vec< 3, T > > * > &  list_X 
) const [inline, protected]

virtual int sofa::component::topology::SparseGridTopology::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.

barycentric coordinates).

Referenced by sofa::component::mapping::BarycentricMapperSparseGridTopology< In, Out >::init().

virtual int sofa::component::topology::SparseGridTopology::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.

barycentric coordinates).

Referenced by sofa::component::mapping::BarycentricMapperSparseGridTopology< In, Out >::init().

helper::fixed_array< int, 6 > sofa::component::topology::SparseGridTopology::findneighboorCubes ( int  indice  )  [virtual]

SparseGridTopology* sofa::component::topology::SparseGridTopology::getCoarserSparseGrid (  )  const [inline]

Definition at line 161 of file SparseGridTopology.h.

References _coarserSparseGrid.

SparseGridTopology* sofa::component::topology::SparseGridTopology::getFinerSparseGrid (  )  const [inline]

Definition at line 159 of file SparseGridTopology.h.

References _finerSparseGrid.

virtual const SeqCubes& sofa::component::topology::SparseGridTopology::getHexas (  )  [inline, virtual]

Reimplemented from sofa::component::topology::MeshTopology.

Definition at line 319 of file SparseGridTopology.h.

References _alreadyInit, and init().

Referenced by getNbHexas().

Vector3 sofa::component::topology::SparseGridTopology::getMax (  )  [inline]

Definition at line 137 of file SparseGridTopology.h.

References _max, and sofa::core::objectmodel::Data< T >::getValue().

void sofa::component::topology::SparseGridTopology::getMesh ( sofa::helper::io::Mesh &  m  ) 

Vector3 sofa::component::topology::SparseGridTopology::getMin (  )  [inline]

Definition at line 132 of file SparseGridTopology.h.

References _min, and sofa::core::objectmodel::Data< T >::getValue().

Referenced by buildFromFiner().

Vec<3, int> sofa::component::topology::SparseGridTopology::getN (  )  const [inline]

Definition at line 107 of file SparseGridTopology.h.

References n.

virtual int sofa::component::topology::SparseGridTopology::getNbHexas (  )  [inline, virtual]

Reimplemented from sofa::component::topology::MeshTopology.

Definition at line 331 of file SparseGridTopology.h.

References getHexas().

virtual int sofa::component::topology::SparseGridTopology::getNbPoints (  )  const [inline, virtual]

Reimplemented from sofa::component::topology::MeshTopology.

Definition at line 325 of file SparseGridTopology.h.

References _alreadyInit, and init().

int sofa::component::topology::SparseGridTopology::getNbVirtualFinerLevels (  )  const [inline]

int sofa::component::topology::SparseGridTopology::getNx (  )  const [inline]

int sofa::component::topology::SparseGridTopology::getNy (  )  const [inline]

int sofa::component::topology::SparseGridTopology::getNz (  )  const [inline]

Vector3 sofa::component::topology::SparseGridTopology::getPointPos ( int  i  )  [inline]

SparseGridTopology::Type sofa::component::topology::SparseGridTopology::getType ( int  i  )  [virtual]

bool sofa::component::topology::SparseGridTopology::getVoxel ( unsigned int  index  )  const [inline]

bool sofa::component::topology::SparseGridTopology::getVoxel ( unsigned int  x,
unsigned int  y,
unsigned int  z 
) [inline]

Definition at line 178 of file SparseGridTopology.h.

References dataResolution.

SReal sofa::component::topology::SparseGridTopology::getXmax (  )  [inline]

SReal sofa::component::topology::SparseGridTopology::getXmin (  )  [inline]

SReal sofa::component::topology::SparseGridTopology::getYmax (  )  [inline]

SReal sofa::component::topology::SparseGridTopology::getYmin (  )  [inline]

SReal sofa::component::topology::SparseGridTopology::getZmax (  )  [inline]

SReal sofa::component::topology::SparseGridTopology::getZmin (  )  [inline]

bool sofa::component::topology::SparseGridTopology::hasPos (  )  const [inline, virtual]

Reimplemented from sofa::component::topology::MeshTopology.

Definition at line 142 of file SparseGridTopology.h.

void sofa::component::topology::SparseGridTopology::init ( void   )  [virtual]

bool sofa::component::topology::SparseGridTopology::load ( const char *  filename  )  [virtual]

Load the topology from a file.

The default implementation supports the following formats: obj, gmsh, mesh (custom simple text file), xs3 (deprecated description of mass-springs networks).

Reimplemented from sofa::core::componentmodel::topology::BaseMeshTopology.

Definition at line 120 of file SparseGridTopology.cpp.

References sofa::core::componentmodel::topology::BaseMeshTopology::d_filename, sofa::helper::system::DataRepository, and sofa::core::objectmodel::Data< T >::setValue().

void sofa::component::topology::SparseGridTopology::propagateFrom ( const int  i,
const int  j,
const int  k,
RegularGridTopology &  regularGrid,
vector< Type > &  regularGridTypes,
vector< bool > &  alreadyTested 
) const [protected]

start from a seed cell (i,j,k) the OUTSIDE filling is propagated to neighboor cells until meet a BOUNDARY cell (this function is called from all border cells of the RegularGrid)

Definition at line 1297 of file SparseGridTopology.cpp.

References BOUNDARY, sofa::component::topology::GridTopology::cube(), sofa::component::topology::GridTopology::getNx(), sofa::component::topology::GridTopology::getNy(), sofa::component::topology::GridTopology::getNz(), and OUTSIDE.

Referenced by voxelizeTriangleMesh().

void sofa::component::topology::SparseGridTopology::setCoarserSparseGrid ( SparseGridTopology *  csp  )  [inline]

Definition at line 162 of file SparseGridTopology.h.

References _coarserSparseGrid.

void sofa::component::topology::SparseGridTopology::setDimVoxels ( int  a,
int  b,
int  c 
) [inline]

Definition at line 175 of file SparseGridTopology.h.

References dataResolution.

void sofa::component::topology::SparseGridTopology::setFinerSparseGrid ( SparseGridTopology *  fsp  )  [inline]

Definition at line 160 of file SparseGridTopology.h.

References _finerSparseGrid.

Referenced by buildVirtualFinerLevels().

void sofa::component::topology::SparseGridTopology::setMax ( Vector3  val  )  [inline]

Definition at line 126 of file SparseGridTopology.h.

References _min, and sofa::core::objectmodel::Data< T >::setValue().

void sofa::component::topology::SparseGridTopology::setMin ( Vector3  val  )  [inline]

Definition at line 120 of file SparseGridTopology.h.

References _min, and sofa::core::objectmodel::Data< T >::setValue().

Referenced by buildFromFiner().

void sofa::component::topology::SparseGridTopology::setN ( Vec3i  _n  )  [inline]

Definition at line 112 of file SparseGridTopology.h.

References n.

void sofa::component::topology::SparseGridTopology::setNbVirtualFinerLevels ( int  n  )  [inline]

void sofa::component::topology::SparseGridTopology::setNx ( int  _n  )  [inline]

Definition at line 113 of file SparseGridTopology.h.

References n.

Referenced by buildFromFiner().

void sofa::component::topology::SparseGridTopology::setNy ( int  _n  )  [inline]

Definition at line 114 of file SparseGridTopology.h.

References n.

Referenced by buildFromFiner().

void sofa::component::topology::SparseGridTopology::setNz ( int  _n  )  [inline]

Definition at line 115 of file SparseGridTopology.h.

References n.

Referenced by buildFromFiner().

void sofa::component::topology::SparseGridTopology::setSizeVoxel ( float  a,
float  b,
float  c 
) [inline]

void sofa::component::topology::SparseGridTopology::setVoxel ( int  index,
unsigned char  value 
) [inline, protected]

void sofa::component::topology::SparseGridTopology::setXmax ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::setXmin ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::setYmax ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::setYmin ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::setZmax ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::setZmin ( SReal  val  )  [inline]

void sofa::component::topology::SparseGridTopology::updateEdges (  )  [protected, virtual]

void sofa::component::topology::SparseGridTopology::updateHexas (  )  [protected, virtual]

Reimplemented from sofa::component::topology::MeshTopology.

Definition at line 1223 of file SparseGridTopology.cpp.

void sofa::component::topology::SparseGridTopology::updateMesh (  ) 

void sofa::component::topology::SparseGridTopology::updateQuads (  )  [protected, virtual]

void sofa::component::topology::SparseGridTopology::voxelizeTriangleMesh ( helper::io::Mesh *  mesh,
RegularGridTopology &  regularGrid,
vector< Type > &  regularGridTypes 
) const [protected]


Field Documentation

Definition at line 264 of file SparseGridTopology.h.

Referenced by getHexas(), getNbPoints(), init(), and SparseGridTopology().

an eventual coarser sparse grid

Definition at line 251 of file SparseGridTopology.h.

Referenced by buildFromFiner(), getCoarserSparseGrid(), setCoarserSparseGrid(), and SparseGridTopology().

an eventual finer sparse grid that can be used to built this coarser sparse grid

Definition at line 250 of file SparseGridTopology.h.

Referenced by buildFromFiner(), getFinerSparseGrid(), init(), setFinerSparseGrid(), and SparseGridTopology().

Definition at line 80 of file SparseGridTopology.h.

Referenced by buildFromFiner().

Definition at line 87 of file SparseGridTopology.h.

Referenced by buildFromFiner().

to redirect an indice of a cube in the sparse grid to its indice in the regular grid

Definition at line 168 of file SparseGridTopology.h.

Referenced by buildFromFiner(), buildFromRegularGridTypes(), and findneighboorCubes().

to redirect an indice of a cube in the regular grid to its indice in the sparse grid

Definition at line 167 of file SparseGridTopology.h.

Referenced by buildFromFiner(), buildFromRawVoxelFile(), buildFromRegularGridTypes(), buildFromVoxelFile(), and findneighboorCubes().

Definition at line 82 of file SparseGridTopology.h.

Referenced by buildFromFiner().

Definition at line 89 of file SparseGridTopology.h.

Referenced by buildFromFiner().

a fine point indice -> corresponding point in coarser level

Definition at line 92 of file SparseGridTopology.h.

Referenced by buildFromFiner().

create virtual (not in the animation tree) finer sparse grids in order to dispose of finest information (usefull to compute better mechanical properties for example)

Definition at line 197 of file SparseGridTopology.h.

Referenced by buildVirtualFinerLevels(), getNbVirtualFinerLevels(), init(), and setNbVirtualFinerLevels().

Definition at line 97 of file SparseGridTopology.h.

Referenced by init().

Definition at line 101 of file SparseGridTopology.h.

Definition at line 99 of file SparseGridTopology.h.

Referenced by init().

a coarse point indice -> corresponding point in finer level

Definition at line 91 of file SparseGridTopology.h.

Referenced by buildFromFiner().

BOUNDARY or FULL filled cells.

Definition at line 212 of file SparseGridTopology.h.

Referenced by buildFromFiner(), buildFromRegularGridTypes(), and getType().

Definition at line 210 of file SparseGridTopology.h.

Referenced by buildAsFinest(), SparseGridTopology(), and updateMesh().

saving the virtual levels (cf _nbVirtualFinerLevels)

Definition at line 104 of file SparseGridTopology.h.

Referenced by buildVirtualFinerLevels().

Definition at line 202 of file SparseGridTopology.h.

Referenced by updateMesh().

Initial value:

      {
          
          {  0,  9,  3, 12,  1, 10,  4, 13},  
          {  9, 18, 12, 21, 10, 19, 13, 22},
          {  3, 12,  6, 15,  4, 13,  7, 16},
          { 12, 21, 15, 24, 13, 22, 16, 25},
          {  1, 10,  4, 13,  2, 11,  5, 14},
          { 10, 19, 13, 22, 11, 20, 14, 23},
          {  4, 13,  7, 16,  5, 14,  8, 17},
          { 13, 22, 16, 25, 14, 23, 17, 26} 
      }

Definition at line 68 of file SparseGridTopology.h.

Referenced by buildFromFiner().

Definition at line 199 of file SparseGridTopology.h.

Referenced by buildFromRawVoxelFile(), getVoxel(), setDimVoxels(), and updateMesh().

Data< vector< unsigned char > > sofa::component::topology::SparseGridTopology::dataVoxels [protected]

Definition at line 188 of file SparseGridTopology.h.

Referenced by buildFromRawVoxelFile(), and SparseGridTopology().

Definition at line 208 of file SparseGridTopology.h.

Referenced by constructCollisionModels(), getMesh(), and updateMesh().

Definition at line 201 of file SparseGridTopology.h.

Referenced by updateMesh().

cutting number in all directions

Definition at line 194 of file SparseGridTopology.h.

Referenced by buildFromVoxelFile(), buildVirtualFinerLevels(), getN(), getNx(), getNy(), getNz(), init(), setN(), setNx(), setNy(), and setNz().

Definition at line 200 of file SparseGridTopology.h.

Referenced by buildFromRawVoxelFile(), setSizeVoxel(), and updateMesh().

Initial value:

      {
      
      {1.0, 0.5, 0.0, 0.5, 0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.25, 0.0, 0.25, 0.125, 0.0,  0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0}, 
      {0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.5, 0.25, 0.0, 0.25, 0.125, 0.0,  0.0, 0.0,  0.0, 1.0, 0.5, 0.0, 0.5, 0.25, 0.0, 0.0, 0.0, 0.0},
      {0.0, 0.0, 0.0, 0.5, 0.25, 0.0, 1.0, 0.5, 0.0, 0.0, 0.0,  0.0, 0.25, 0.125, 0.0,  0.5, 0.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0},
      {0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.25, 0.125, 0.0,  0.5, 0.25, 0.0, 0.0, 0.0, 0.0, 0.5, 0.25, 0.0, 1.0, 0.5, 0.0},
      {0.0, 0.5, 1.0, 0.0, 0.25, 0.5, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.0,  0.125, 0.25, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0},
      {0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.0,  0.125, 0.25, 0.0, 0.0,  0.0, 0.0, 0.5, 1.0, 0.0, 0.25, 0.5, 0.0, 0.0, 0.0},
      {0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.0, 0.5, 1.0, 0.0, 0.0,  0.0, 0.0,  0.125, 0.25, 0.0, 0.25, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0},
      {0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0, 0.0, 0.0, 0.0, 0.0,  0.0, 0.0,  0.125, 0.25, 0.0, 0.25, 0.5, 0.0, 0.0, 0.0, 0.0, 0.25, 0.5, 0.0, 0.5, 1.0}
      }

Definition at line 67 of file SparseGridTopology.h.

Referenced by buildFromFiner().


The documentation for this class was generated from the following files:

Generated on Sun Nov 23 04:21:36 2008 for Sofa by  doxygen 1.5.7.1