Hosted by: BerliOS Developer Logo

OpenMBV C++ Interface

BerliOS Project Page
Public Member Functions | Protected Member Functions | Protected Attributes
OpenMBV::SpineExtrusion Class Reference

Class for all bodies extruded along a curve. More...

#include <spineextrusion.h>

Inheritance diagram for OpenMBV::SpineExtrusion:
OpenMBV::DynamicColoredBody OpenMBV::Body OpenMBV::Object

List of all members.

Public Member Functions

 SpineExtrusion ()
 constructor
std::string getClassName ()
 Retrun the class name.
void setNumberOfSpinePoints (const int num)
 Set the number of spine points used for extrusion along a path.
int getNumberOfSpinePoints ()
 Get the number of spine points used for extrusion along a path.
void setContour (std::vector< PolygonPoint * > *contour_)
 Set the 2D contour (cross-section) of the extrusion.
std::vector< PolygonPoint * > * getContour ()
void setScaleFactor (const ScalarParameter scale)
 Set the scale factor of the body.
double getScaleFactor ()
void append (const std::vector< double > &row)
 Append a data vector to the h5 datsset.
int getRows ()
 Get the number of rows of the default data.
std::vector< double > getRow (int i)
 Get row number i of the default data.
virtual void initializeUsingXML (MBXMLUtils::TiXmlElement *element)
 Initializes the time invariant part of the object using a XML node.
MBXMLUtils::TiXmlElement * writeXMLFile (MBXMLUtils::TiXmlNode *parent)
 Write XML file for not time-dependent data.

Protected Member Functions

virtual ~SpineExtrusion ()
 destructor
void createHDF5File ()
 Write H5 file for time-dependent data.
void openHDF5File ()

Protected Attributes

int numberOfSpinePoints
 Number of spine points used for extrusion along a path.
std::vector< PolygonPoint * > * contour
 Vector of local x-y points.
H5::VectorSerie< double > * data
 Each row comprises [time,spine world position,spine twist,...,spine world position,spine twist].
ScalarParameter scaleFactor
 Scale factor of the body.

Detailed Description

Class for all bodies extruded along a curve.

Author:
Thorsten Schindler

HDF5-Dataset: The HDF5 dataset of this object is a 2D array of double precision values. Each row represents one dataset in time. A row consists of the following columns in order given in world frame (N is the number of spine points): time, spine point 1 x, spine point 1 y, spine point 1 z, spine twist 1, spine point 2 x, spine point 2 y, spine point 2 z, spine twist 2, ..., spine point N x, spine point N y, spine point N z, spine twist N


Member Function Documentation

void OpenMBV::SpineExtrusion::createHDF5File ( ) [protected, virtual]

Write H5 file for time-dependent data.

Reimplemented from OpenMBV::Body.

std::vector<double> OpenMBV::SpineExtrusion::getRow ( int  i) [inline, virtual]

Get row number i of the default data.

NOTE: see also append()

Implements OpenMBV::Body.

References data, and numberOfSpinePoints.

int OpenMBV::SpineExtrusion::getRows ( ) [inline, virtual]

Get the number of rows of the default data.

Returns -1, if no default data is avaliable. NOTE: see also append()

Implements OpenMBV::Body.

References data.

void OpenMBV::SpineExtrusion::setContour ( std::vector< PolygonPoint * > *  contour_) [inline]

Set the 2D contour (cross-section) of the extrusion.

The contour (polygon) points must be in clockwise order.

References contour.

Set the scale factor of the body.

References scaleFactor.

MBXMLUtils::TiXmlElement* OpenMBV::SpineExtrusion::writeXMLFile ( MBXMLUtils::TiXmlNode *  parent) [virtual]

Write XML file for not time-dependent data.

Reimplemented from OpenMBV::DynamicColoredBody.


Member Data Documentation

std::vector<PolygonPoint*>* OpenMBV::SpineExtrusion::contour [protected]

Vector of local x-y points.

Referenced by setContour().

H5::VectorSerie<double>* OpenMBV::SpineExtrusion::data [protected]

Each row comprises [time,spine world position,spine twist,...,spine world position,spine twist].

Referenced by append(), getRow(), and getRows().

Number of spine points used for extrusion along a path.

Referenced by getNumberOfSpinePoints(), getRow(), and setNumberOfSpinePoints().

Scale factor of the body.

Referenced by setScaleFactor().


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