OpenWalnut  1.5.0dev
Public Member Functions | List of all members
WDataSetFibersCreatorInterface Class Referenceabstract

Define the interface which is injected into an WObjectNDIP. More...

#include <WDataSetFibersCreatorInterface.h>

+ Inheritance diagram for WDataSetFibersCreatorInterface:

Public Member Functions

virtual void operator() (int seed, WProgress::SPtr progress, const WColor &color, size_t numFibers, size_t numVertsPerFiber, const WPosition &origin, const WPosition &size, WDataSetFibers::VertexArray vertices, WDataSetFibers::IndexArray fibIdx, WDataSetFibers::LengthArray lengths, WDataSetFibers::IndexArray fibIdxVertexMap, WDataSetFibers::ColorArray colors)=0
 Create the dataset. More...
 
virtual ~WDataSetFibersCreatorInterface ()
 Destructor. More...
 

Detailed Description

Define the interface which is injected into an WObjectNDIP.

Remember that WObjectNDIP is a template class deriving from its template type. This way we can inject methods into the base class. It avoids derivation from WObjectNDIP.

This class is especially useful for all dataset types that are WDataSetFibers types.

Definition at line 38 of file WDataSetFibersCreatorInterface.h.

Constructor & Destructor Documentation

◆ ~WDataSetFibersCreatorInterface()

WDataSetFibersCreatorInterface::~WDataSetFibersCreatorInterface ( )
virtual

Destructor.

Definition at line 27 of file WDataSetFibersCreatorInterface.cpp.

Member Function Documentation

◆ operator()()

virtual void WDataSetFibersCreatorInterface::operator() ( int  seed,
WProgress::SPtr  progress,
const WColor &  color,
size_t  numFibers,
size_t  numVertsPerFiber,
const WPosition origin,
const WPosition size,
WDataSetFibers::VertexArray  vertices,
WDataSetFibers::IndexArray  fibIdx,
WDataSetFibers::LengthArray  lengths,
WDataSetFibers::IndexArray  fibIdxVertexMap,
WDataSetFibers::ColorArray  colors 
)
pure virtual

Create the dataset.

This needs to be implemented by all the creators you write.

Parameters
seedthe seed for the random values.
progressprogress indicator
colorcolor of all fibers
numFibersnumber of fibers
numVertsPerFibernumber of vertices per fiber
originorigin of the bbox
sizesize of the bounding box
verticesthe vertex array. Fill this.
fibIdxthe fiber index array. Fill this.
lengthsthe lengths array. Fill this.
fibIdxVertexMapinverse map. Fill this.
colorsthe color array. Fill this.

Implemented in WDataCreatorFiberStar, WDataCreatorFiberSpiral, WDataCreatorFiberRandom, and WDataCreatorFiberParallel.


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