sofa::component::topology::CubeTopology Class Reference

#include <CubeTopology.h>

Inheritance diagram for sofa::component::topology::CubeTopology:

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

Collaboration graph
[legend]

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

Detailed Description

Definition at line 42 of file CubeTopology.h.


Member Enumeration Documentation

Enumerator:
PLANE_UNKNOWN 
PLANE_X0 
PLANE_X1 
PLANE_Y0 
PLANE_Y1 
PLANE_Z0 
PLANE_Z1 

Definition at line 68 of file CubeTopology.h.


Constructor & Destructor Documentation

sofa::component::topology::CubeTopology::CubeTopology ( int  nx,
int  ny,
int  nz 
)

Definition at line 74 of file CubeTopology.cpp.

sofa::component::topology::CubeTopology::CubeTopology (  ) 

Definition at line 84 of file CubeTopology.cpp.


Member Function Documentation

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

Definition at line 86 of file CubeTopology.h.

References dx.

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

Definition at line 87 of file CubeTopology.h.

References dy.

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

Definition at line 88 of file CubeTopology.h.

References dz.

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 85 of file CubeTopology.h.

References p0.

Vector3 sofa::component::topology::CubeTopology::getPoint ( int  x,
int  y,
int  z 
) const

Definition at line 358 of file CubeTopology.cpp.

References dx, dy, dz, and p0.

Vector3 sofa::component::topology::CubeTopology::getPoint ( int  i  )  const

Definition at line 263 of file CubeTopology.cpp.

References sofa::core::objectmodel::Data< T >::getValue(), internalPoints, nx, ny, nz, and splitNormals.

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

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

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]

Definition at line 79 of file CubeTopology.h.

References dx, and inv_dx2.

Referenced by setPos().

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

Definition at line 80 of file CubeTopology.h.

References dy, and inv_dy2.

Referenced by setPos().

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

Definition at line 81 of file CubeTopology.h.

References dz, and inv_dz2.

Referenced by setPos().

void sofa::component::topology::CubeTopology::setNx ( int  n  )  [inline]

Definition at line 57 of file CubeTopology.h.

References setSize().

void sofa::component::topology::CubeTopology::setNy ( int  n  )  [inline]

Definition at line 58 of file CubeTopology.h.

References setSize().

void sofa::component::topology::CubeTopology::setNz ( int  n  )  [inline]

Definition at line 59 of file CubeTopology.h.

References setSize().

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

Definition at line 78 of file CubeTopology.h.

References p0.

Referenced by setPos().

void sofa::component::topology::CubeTopology::setPos ( SReal  xmin,
SReal  xmax,
SReal  ymin,
SReal  ymax,
SReal  zmin,
SReal  zmax 
)

Definition at line 246 of file CubeTopology.cpp.

References sofa::core::objectmodel::Data< T >::getValue(), nx, ny, nz, setDx(), setDy(), setDz(), and setP0().

Referenced by parse().

void sofa::component::topology::CubeTopology::setSize (  )  [protected, virtual]

void sofa::component::topology::CubeTopology::setSize ( int  nx,
int  ny,
int  nz 
)

Definition at line 93 of file CubeTopology.cpp.

References 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]

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


Field Documentation

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().

Definition at line 113 of file CubeTopology.h.

Referenced by getDy(), getPoint(), and setDy().

Definition at line 113 of file CubeTopology.h.

Referenced by getDz(), getPoint(), and setDz().

Definition at line 106 of file CubeTopology.h.

Referenced by getPoint(), point(), and setSize().

Definition at line 114 of file CubeTopology.h.

Referenced by setDx().

Definition at line 114 of file CubeTopology.h.

Referenced by setDy().

Definition at line 114 of file CubeTopology.h.

Referenced by setDz().

Definition at line 109 of file CubeTopology.h.

Referenced by getMax(), and parse().

Definition at line 109 of file CubeTopology.h.

Referenced by getMin(), and parse().

Definition at line 103 of file CubeTopology.h.

Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().

Definition at line 104 of file CubeTopology.h.

Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().

Definition at line 105 of file CubeTopology.h.

Referenced by getPoint(), point(), setPos(), setSize(), updateEdges(), and updateQuads().

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().


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

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