OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Private Attributes | List of all members
WDataCreatorFiberSpiral Class Reference

Create a fiber spiral. More...

#include <WDataCreatorFiberSpiral.h>

+ Inheritance diagram for WDataCreatorFiberSpiral:
+ Collaboration diagram for WDataCreatorFiberSpiral:

Public Types

typedef std::shared_ptr< WDataCreatorFiberSpiralSPtr
 Abbreviate shared_ptr. More...
 
typedef std::shared_ptr< const WDataCreatorFiberSpiralConstSPtr
 Abbreviate const shared_ptr. More...
 
- Public Types inherited from WObjectNDIP< WDataSetFibersCreatorInterface >
typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 

Public Member Functions

 WDataCreatorFiberSpiral ()
 Default constructor. More...
 
virtual ~WDataCreatorFiberSpiral ()
 Destructor. More...
 
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)
 Create the dataset. More...
 
- Public Member Functions inherited from WObjectNDIP< WDataSetFibersCreatorInterface >
virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 
- Public Member Functions inherited from WDataSetFibersCreatorInterface
virtual ~WDataSetFibersCreatorInterface ()
 Destructor. More...
 

Private Attributes

WPropInt m_numRotations
 Number of rotations to do. More...
 
WPropDouble m_tubeRadius
 The radius of a tube (consisting of multiple fibers. More...
 

Additional Inherited Members

- Protected Member Functions inherited from WObjectNDIP< WDataSetFibersCreatorInterface >
 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 
- Protected Attributes inherited from WObjectNDIP< WDataSetFibersCreatorInterface >
WProperties::SPtr m_properties
 the properties of the object. More...
 

Detailed Description

Create a fiber spiral.

Definition at line 37 of file WDataCreatorFiberSpiral.h.

Member Typedef Documentation

◆ ConstSPtr

Abbreviate const shared_ptr.

Definition at line 48 of file WDataCreatorFiberSpiral.h.

◆ SPtr

Abbreviate shared_ptr.

Definition at line 43 of file WDataCreatorFiberSpiral.h.

Constructor & Destructor Documentation

◆ WDataCreatorFiberSpiral()

WDataCreatorFiberSpiral::WDataCreatorFiberSpiral ( )

◆ ~WDataCreatorFiberSpiral()

WDataCreatorFiberSpiral::~WDataCreatorFiberSpiral ( )
virtual

Destructor.

Definition at line 43 of file WDataCreatorFiberSpiral.cpp.

Member Function Documentation

◆ operator()()

void WDataCreatorFiberSpiral::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 
)
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.

Implements WDataSetFibersCreatorInterface.

Definition at line 48 of file WDataCreatorFiberSpiral.cpp.

References m_numRotations, and m_tubeRadius.

Member Data Documentation

◆ m_numRotations

WPropInt WDataCreatorFiberSpiral::m_numRotations
private

Number of rotations to do.

Definition at line 93 of file WDataCreatorFiberSpiral.h.

Referenced by operator()(), and WDataCreatorFiberSpiral().

◆ m_tubeRadius

WPropDouble WDataCreatorFiberSpiral::m_tubeRadius
private

The radius of a tube (consisting of multiple fibers.

Definition at line 98 of file WDataCreatorFiberSpiral.h.

Referenced by operator()(), and WDataCreatorFiberSpiral().


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