sofa::component::topology::MultiResSparseGridTopology Class Reference

#include <MultiResSparseGridTopology.h>

Inheritance diagram for sofa::component::topology::MultiResSparseGridTopology:

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

Collaboration graph
[legend]

Data Structures

class  SparseGrid
 Make all resolution of sparse grid create with a .vox file. More...

Public Types

typedef GridTopology::Cube Cube

Public Member Functions

 MultiResSparseGridTopology ()
 MultiResSparseGridTopology (const char *filevoxel, int resol, float scale)
SReal getPX (int i) const
 get the postion of the voxel i
SReal getPY (int i) const
SReal getPZ (int i) const
Vector3 getPoint (int i) const
 get the vertex's psotion with its indice or its index
bool hasPos () const
 ??????
int getNbVoxels () const
 number of voxels in the current grid
int getNbPoints () const
 number of vertices int th current grid
int point (int x, int y, int z)
 get the indices of the voxel x y z
GridTopology::Cube getCube (int i)
 get the cube of the voxel i for the mapping
int findCube (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) const
 get the indice of the cube at the coordinates pos and the barycentric coordinates
int findNearestCube (const Vector3 &pos, SReal &fx, SReal &fy, SReal &fz) const
 get the indice of the nearest cube of the coordinates pos and the barycentric coordinates
void setP0 (const Vector3 &val)
 set the position (not used)
void setDx (const Vector3 &val)
 set the interval between voxels
void setDy (const Vector3 &val)
void setDz (const Vector3 &val)
const Vector3 & getP0 () const
 get the position (not used)
const Vector3 & getDx () const
 get the interval between voxels
const Vector3 & getDy () const
const Vector3 & getDz () const

Data Fields

vector< SparseGrid > vectorSparseGrid
 contain all resolution of the sparse grid
int resolution
 indices of the current grid
int dimx
 Size of the grid and its position.
int dimy
int dimz
int px
int py
int pz

Protected Attributes

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

Private Attributes

int nbPoints

Detailed Description

Definition at line 52 of file MultiResSparseGridTopology.h.


Member Typedef Documentation

Definition at line 336 of file MultiResSparseGridTopology.h.


Constructor & Destructor Documentation

sofa::component::topology::MultiResSparseGridTopology::MultiResSparseGridTopology (  ) 

Definition at line 76 of file MultiResSparseGridTopology.cpp.

sofa::component::topology::MultiResSparseGridTopology::MultiResSparseGridTopology ( const char *  filevoxel,
int  resol,
float  scale 
)


Member Function Documentation

int sofa::component::topology::MultiResSparseGridTopology::findCube ( const Vector3 &  pos,
SReal &  fx,
SReal &  fy,
SReal &  fz 
) const

get the indice of the cube at the coordinates pos and the barycentric coordinates

int sofa::component::topology::MultiResSparseGridTopology::findNearestCube ( const Vector3 &  pos,
SReal &  fx,
SReal &  fy,
SReal &  fz 
) const

get the indice of the nearest cube of the coordinates pos and the barycentric coordinates

GridTopology::Cube sofa::component::topology::MultiResSparseGridTopology::getCube ( int  i  ) 

get the cube of the voxel i for the mapping

Definition at line 173 of file MultiResSparseGridTopology.cpp.

References point(), resolution, and vectorSparseGrid.

const Vector3& sofa::component::topology::MultiResSparseGridTopology::getDx (  )  const [inline]

const Vector3& sofa::component::topology::MultiResSparseGridTopology::getDy (  )  const [inline]

const Vector3& sofa::component::topology::MultiResSparseGridTopology::getDz (  )  const [inline]

int sofa::component::topology::MultiResSparseGridTopology::getNbPoints (  )  const [virtual]

number of vertices int th current grid

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

Definition at line 160 of file MultiResSparseGridTopology.cpp.

References resolution, and vectorSparseGrid.

int sofa::component::topology::MultiResSparseGridTopology::getNbVoxels (  )  const

const Vector3& sofa::component::topology::MultiResSparseGridTopology::getP0 (  )  const [inline]

get the position (not used)

Definition at line 394 of file MultiResSparseGridTopology.h.

References p0.

MultiResSparseGridTopology::Vec3 sofa::component::topology::MultiResSparseGridTopology::getPoint ( int  i  )  const

get the vertex's psotion with its indice or its index

Definition at line 116 of file MultiResSparseGridTopology.cpp.

References p0, resolution, and vectorSparseGrid.

Referenced by getPX(), getPY(), and getPZ().

double sofa::component::topology::MultiResSparseGridTopology::getPX ( int  i  )  const [virtual]

get the postion of the voxel i

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

Definition at line 137 of file MultiResSparseGridTopology.cpp.

References getPoint().

double sofa::component::topology::MultiResSparseGridTopology::getPY ( int  i  )  const [virtual]

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

Definition at line 141 of file MultiResSparseGridTopology.cpp.

References getPoint().

double sofa::component::topology::MultiResSparseGridTopology::getPZ ( int  i  )  const [virtual]

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

Definition at line 145 of file MultiResSparseGridTopology.cpp.

References getPoint().

bool sofa::component::topology::MultiResSparseGridTopology::hasPos (  )  const [virtual]

??????

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

Definition at line 150 of file MultiResSparseGridTopology.cpp.

int sofa::component::topology::MultiResSparseGridTopology::point ( int  x,
int  y,
int  z 
)

void sofa::component::topology::MultiResSparseGridTopology::setDx ( const Vector3 &  val  )  [inline]

set the interval between voxels

Definition at line 378 of file MultiResSparseGridTopology.h.

References dx, and inv_dx2.

Referenced by MultiResSparseGridTopology().

void sofa::component::topology::MultiResSparseGridTopology::setDy ( const Vector3 &  val  )  [inline]

Definition at line 383 of file MultiResSparseGridTopology.h.

References dy, and inv_dy2.

Referenced by MultiResSparseGridTopology().

void sofa::component::topology::MultiResSparseGridTopology::setDz ( const Vector3 &  val  )  [inline]

Definition at line 388 of file MultiResSparseGridTopology.h.

References dz, and inv_dz2.

Referenced by MultiResSparseGridTopology().

void sofa::component::topology::MultiResSparseGridTopology::setP0 ( const Vector3 &  val  )  [inline]

set the position (not used)

Definition at line 373 of file MultiResSparseGridTopology.h.

References p0.


Field Documentation

Size of the grid and its position.

Definition at line 347 of file MultiResSparseGridTopology.h.

Definition at line 347 of file MultiResSparseGridTopology.h.

Definition at line 347 of file MultiResSparseGridTopology.h.

Definition at line 417 of file MultiResSparseGridTopology.h.

Referenced by setDx().

Definition at line 417 of file MultiResSparseGridTopology.h.

Referenced by setDy().

Definition at line 417 of file MultiResSparseGridTopology.h.

Referenced by setDz().

Definition at line 54 of file MultiResSparseGridTopology.h.

Referenced by MultiResSparseGridTopology().

Position of point 0.

Definition at line 414 of file MultiResSparseGridTopology.h.

Referenced by getP0(), getPoint(), and setP0().

Definition at line 347 of file MultiResSparseGridTopology.h.

Definition at line 347 of file MultiResSparseGridTopology.h.

Definition at line 347 of file MultiResSparseGridTopology.h.


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

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