sofa::component::MeshLoader Class Reference

#include <MeshLoader.h>

Inheritance diagram for sofa::component::MeshLoader:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::MeshLoader:

Collaboration graph
[legend]

Public Types

typedef unsigned int index_type
typedef index_type PointID
typedef index_type EdgeID
typedef index_type TriangleID
typedef index_type QuadID
typedef index_type TetraID
typedef index_type HexaID
typedef helper::fixed_array
< SReal, 3 > 
Point
typedef helper::fixed_array
< PointID, 2 > 
Edge
typedef helper::fixed_array
< PointID, 3 > 
Triangle
typedef helper::fixed_array
< PointID, 4 > 
Quad
typedef helper::fixed_array
< PointID, 4 > 
Tetra
typedef helper::fixed_array
< PointID, 8 > 
Hexa
typedef helper::vector< Point > SeqPoints
typedef helper::vector< Edge > SeqEdges
typedef helper::vector< Triangle > SeqTriangles
typedef helper::vector< Quad > SeqQuads
typedef helper::vector< Tetra > SeqTetras
typedef helper::vector< Hexa > SeqHexas

Public Member Functions

 MeshLoader ()
virtual ~MeshLoader ()
virtual void clear ()
virtual bool load (const char *filename)
void setFilename (std::string f)
const std::string & getFilename () const
double getPX (int i) const
double getPY (int i) const
double getPZ (int i) const
int getNbPoints () const
const SeqPoints & getPoints () const
const SeqEdges & getEdges () const
const SeqTriangles & getTriangles () const
const SeqQuads & getQuads () const
const SeqTetras & getTetras () const
const SeqHexas & getHexas () const
void parse (core::objectmodel::BaseObjectDescription *arg)
 Parse the given description to assign values to this object's fields and potentially other parameters.

Protected Member Functions

void addPoint (double px, double py, double pz)
void addLine (int a, int b)
void addTriangle (int a, int b, int c)
void addTetra (int a, int b, int c, int d)
void addQuad (int a, int b, int c, int d)
void addCube (int a, int b, int c, int d, int e, int f, int g, int h)

Protected Attributes

Data< SeqPoints > seqPoints
Data< SeqEdges > seqEdges
Data< SeqTriangles > seqTriangles
Data< SeqQuads > seqQuads
Data< SeqTetras > seqTetras
Data< SeqHexas > seqHexas
Data< std::string > filename

Detailed Description

Definition at line 41 of file MeshLoader.h.


Member Typedef Documentation

Definition at line 54 of file MeshLoader.h.

Definition at line 47 of file MeshLoader.h.

Definition at line 58 of file MeshLoader.h.

Definition at line 51 of file MeshLoader.h.

Definition at line 45 of file MeshLoader.h.

Definition at line 53 of file MeshLoader.h.

Definition at line 46 of file MeshLoader.h.

Definition at line 56 of file MeshLoader.h.

Definition at line 49 of file MeshLoader.h.

Definition at line 61 of file MeshLoader.h.

Definition at line 65 of file MeshLoader.h.

Definition at line 60 of file MeshLoader.h.

Definition at line 63 of file MeshLoader.h.

Definition at line 64 of file MeshLoader.h.

Definition at line 62 of file MeshLoader.h.

Definition at line 57 of file MeshLoader.h.

Definition at line 50 of file MeshLoader.h.

Definition at line 55 of file MeshLoader.h.

Definition at line 48 of file MeshLoader.h.


Constructor & Destructor Documentation

sofa::component::MeshLoader::MeshLoader (  ) 

Definition at line 44 of file MeshLoader.cpp.

virtual sofa::component::MeshLoader::~MeshLoader (  )  [inline, virtual]

Definition at line 69 of file MeshLoader.h.


Member Function Documentation

void sofa::component::MeshLoader::addCube ( int  a,
int  b,
int  c,
int  d,
int  e,
int  f,
int  g,
int  h 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 128 of file MeshLoader.cpp.

References seqHexas.

void sofa::component::MeshLoader::addLine ( int  a,
int  b 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 104 of file MeshLoader.cpp.

References seqEdges.

void sofa::component::MeshLoader::addPoint ( double  px,
double  py,
double  pz 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 98 of file MeshLoader.cpp.

References sofa::helper::make_array(), and seqPoints.

void sofa::component::MeshLoader::addQuad ( int  a,
int  b,
int  c,
int  d 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 122 of file MeshLoader.cpp.

References seqQuads.

void sofa::component::MeshLoader::addTetra ( int  a,
int  b,
int  c,
int  d 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 116 of file MeshLoader.cpp.

References seqTetras.

void sofa::component::MeshLoader::addTriangle ( int  a,
int  b,
int  c 
) [protected, virtual]

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 110 of file MeshLoader.cpp.

References seqTriangles.

void sofa::component::MeshLoader::clear (  )  [virtual]

Definition at line 64 of file MeshLoader.cpp.

References seqEdges, seqHexas, seqPoints, seqQuads, seqTetras, and seqTriangles.

Referenced by load().

const MeshLoader::SeqEdges & sofa::component::MeshLoader::getEdges (  )  const

const std::string& sofa::component::MeshLoader::getFilename (  )  const [inline]

Definition at line 81 of file MeshLoader.h.

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

const MeshLoader::SeqHexas & sofa::component::MeshLoader::getHexas (  )  const

int sofa::component::MeshLoader::getNbPoints (  )  const

const MeshLoader::SeqPoints & sofa::component::MeshLoader::getPoints (  )  const

Definition at line 138 of file MeshLoader.cpp.

References seqPoints.

Referenced by sofa::component::topology::MeshTopology::loadFromMeshLoader().

double sofa::component::MeshLoader::getPX ( int  i  )  const [inline]

Definition at line 86 of file MeshLoader.h.

References seqPoints.

Referenced by sofa::component::MechanicalObject< DataTypes >::init().

double sofa::component::MeshLoader::getPY ( int  i  )  const [inline]

Definition at line 87 of file MeshLoader.h.

References seqPoints.

Referenced by sofa::component::MechanicalObject< DataTypes >::init().

double sofa::component::MeshLoader::getPZ ( int  i  )  const [inline]

Definition at line 88 of file MeshLoader.h.

References seqPoints.

Referenced by sofa::component::MechanicalObject< DataTypes >::init().

const MeshLoader::SeqQuads & sofa::component::MeshLoader::getQuads (  )  const

const MeshLoader::SeqTetras & sofa::component::MeshLoader::getTetras (  )  const

const MeshLoader::SeqTriangles & sofa::component::MeshLoader::getTriangles (  )  const

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

Reimplemented from sofa::helper::io::MeshTopologyLoader.

Definition at line 85 of file MeshLoader.cpp.

References clear(), and sofa::core::objectmodel::BaseObject::logWarning().

Referenced by parse().

void sofa::component::MeshLoader::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::objectmodel::Base.

Definition at line 56 of file MeshLoader.cpp.

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

void sofa::component::MeshLoader::setFilename ( std::string  f  )  [inline]

Definition at line 76 of file MeshLoader.h.

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

Referenced by main().


Field Documentation

Data< std::string > sofa::component::MeshLoader::filename [protected]

Definition at line 117 of file MeshLoader.h.

Referenced by getFilename(), parse(), and setFilename().

Definition at line 111 of file MeshLoader.h.

Referenced by addLine(), clear(), and getEdges().

Definition at line 115 of file MeshLoader.h.

Referenced by addCube(), clear(), and getHexas().

Definition at line 110 of file MeshLoader.h.

Referenced by addPoint(), clear(), getNbPoints(), getPoints(), getPX(), getPY(), and getPZ().

Definition at line 113 of file MeshLoader.h.

Referenced by addQuad(), clear(), and getQuads().

Definition at line 114 of file MeshLoader.h.

Referenced by addTetra(), clear(), and getTetras().

Definition at line 112 of file MeshLoader.h.

Referenced by addTriangle(), clear(), and getTriangles().


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

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