OpenWalnut
1.4.0
|
A class that encapsulates the data needed to construct a WDataSetFibers. More...
#include <WFiberAccumulator.h>
Public Member Functions | |
WFiberAccumulator () | |
Constructor. | |
virtual | ~WFiberAccumulator () |
Destructor. | |
void | add (std::vector< WVector3d > const &in) |
Add a fiber to the dataset. | |
boost::shared_ptr< WDataSetFibers > | buildDataSet () |
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. |
A class that encapsulates the data needed to construct a WDataSetFibers.
Definition at line 41 of file WFiberAccumulator.h.
Constructor.
Definition at line 33 of file WFiberAccumulator.cpp.
WFiberAccumulator::~WFiberAccumulator | ( | ) | [virtual] |
Destructor.
Definition at line 42 of file WFiberAccumulator.cpp.
void WFiberAccumulator::add | ( | std::vector< WVector3d > const & | in | ) |
Add a fiber to the dataset.
in | The 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.
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 80 of file WFiberAccumulator.cpp.
References m_fiberIndices, m_fiberLengths, m_points, and m_pointToFiber.
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 95 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 101 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 83 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 89 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 107 of file WFiberAccumulator.h.
Referenced by add(), buildDataSet(), and clear().