OpenWalnut 1.2.5
Public Member Functions | Private Attributes

WFiberAccumulator Class Reference

A class that encapsulates the data needed to construct a WDataSetFibers. More...

#include <WFiberAccumulator.h>

List of all members.

Public Member Functions

 WFiberAccumulator ()
 Constructor.
virtual ~WFiberAccumulator ()
 Destructor.
void add (std::vector< WVector3d > const &in)
 Add a fiber to the dataset.
boost::shared_ptr< WDataSetFibersbuildDataSet ()
 Return the dataset that has been accumulated to this point and start a new dataset.
void clear ()
 Clears all data.

Private Attributes

boost::mutex m_fiberMutex
 A mutex needed to guarantee thread-safety.
boost::shared_ptr< std::vector
< float > > 
m_points
 One of the vectors needed to construct a WDataSetFibers.
boost::shared_ptr< std::vector
< size_t > > 
m_fiberIndices
 One of the vectors needed to construct a WDataSetFibers.
boost::shared_ptr< std::vector
< size_t > > 
m_fiberLengths
 One of the vectors needed to construct a WDataSetFibers.
boost::shared_ptr< std::vector
< size_t > > 
m_pointToFiber
 One of the vectors needed to construct a WDataSetFibers.

Detailed Description

A class that encapsulates the data needed to construct a WDataSetFibers.

Definition at line 41 of file WFiberAccumulator.h.


Constructor & Destructor Documentation

WFiberAccumulator::WFiberAccumulator ( )

Constructor.

Definition at line 33 of file WFiberAccumulator.cpp.

WFiberAccumulator::~WFiberAccumulator ( ) [virtual]

Destructor.

Definition at line 42 of file WFiberAccumulator.cpp.


Member Function Documentation

void WFiberAccumulator::add ( std::vector< WVector3d > const &  in)

Add a fiber to the dataset.

Parameters:
inThe fiber to add, stored as a vector of Positions.

This function is threadsafe.

Definition at line 46 of file WFiberAccumulator.cpp.

References m_fiberIndices, m_fiberLengths, m_fiberMutex, m_points, and m_pointToFiber.

boost::shared_ptr< WDataSetFibers > WFiberAccumulator::buildDataSet ( )

Return the dataset that has been accumulated to this point and start a new dataset.

Returns:
A shared_ptr pointing to the WDataSetFibers that has been accumulated.

The returned shared_ptr is the sole owner of the WDataSetFibers.

Definition at line 66 of file WFiberAccumulator.cpp.

References m_fiberIndices, m_fiberLengths, m_fiberMutex, m_points, and m_pointToFiber.

void WFiberAccumulator::clear ( )

Clears all data.

Definition at line 81 of file WFiberAccumulator.cpp.

References m_fiberIndices, m_fiberLengths, m_points, and m_pointToFiber.


Member Data Documentation

boost::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_fiberIndices [private]

One of the vectors needed to construct a WDataSetFibers.

Stores the starting indices (refering to the points vector) of the fibers.

Definition at line 97 of file WFiberAccumulator.h.

Referenced by add(), buildDataSet(), and clear().

boost::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_fiberLengths [private]

One of the vectors needed to construct a WDataSetFibers.

Stores the length of the fibers.

Definition at line 103 of file WFiberAccumulator.h.

Referenced by add(), buildDataSet(), and clear().

boost::mutex WFiberAccumulator::m_fiberMutex [private]

A mutex needed to guarantee thread-safety.

Definition at line 85 of file WFiberAccumulator.h.

Referenced by add(), and buildDataSet().

boost::shared_ptr< std::vector< float > > WFiberAccumulator::m_points [private]

One of the vectors needed to construct a WDataSetFibers.

Stores the points in a vector of floats.

Definition at line 91 of file WFiberAccumulator.h.

Referenced by add(), buildDataSet(), and clear().

boost::shared_ptr< std::vector< size_t > > WFiberAccumulator::m_pointToFiber [private]

One of the vectors needed to construct a WDataSetFibers.

Stores information about what fiber a point in the points vector refers to.

Definition at line 109 of file WFiberAccumulator.h.

Referenced by add(), buildDataSet(), and clear().


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends