OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
WDataCreatorTorus< T > Class Template Reference

Create a torus. More...

#include <WDataCreatorTorus.h>

+ Inheritance diagram for WDataCreatorTorus< T >:
+ Collaboration diagram for WDataCreatorTorus< T >:

Public Types

typedef std::shared_ptr< WDataCreatorTorus< T > > SPtr
 Abbreviate shared_ptr. More...
 
typedef std::shared_ptr< const WDataCreatorTorus< T > > ConstSPtr
 Abbreviate const shared_ptr. More...
 
- Public Types inherited from WObjectNDIP< T >
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

 WDataCreatorTorus ()
 Default constructor. More...
 
virtual ~WDataCreatorTorus ()
 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 fiber dataset. More...
 
virtual void operator() (int seed, WProgress::SPtr progress, const WColor &color, size_t numPoints, const WPosition &origin, const WPosition &size, WDataSetPoints::VertexArray vertices, WDataSetPoints::ColorArray colors)
 Create the point dataset. More...
 
- Public Member Functions inherited from WObjectNDIP< T >
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...
 

Private Member Functions

WMatrix4d calculateTransform (const WPosition &origin, const WPosition &size)
 Calculates the transformation matrix. More...
 
WVector4d calculateTorusVertex (double torusRadius, double ringRadius, double torusAngle, double ringAngle)
 Calculates a vertex on a torus. More...
 

Private Attributes

WPropDouble m_innerRadius
 The inner radius of the torus. More...
 
WPropBool m_generateInner
 Property whether inner fibers should be created. More...
 
WPropDouble m_rotateX
 The rotation angle for the x axis. More...
 
WPropDouble m_rotateY
 The rotation angle for the x axis. More...
 
WPropDouble m_rotateZ
 The rotation angle for the x axis. More...
 

Additional Inherited Members

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

Detailed Description

template<class T>
class WDataCreatorTorus< T >

Create a torus.

Definition at line 41 of file WDataCreatorTorus.h.

Member Typedef Documentation

◆ ConstSPtr

template<class T >
typedef std::shared_ptr< const WDataCreatorTorus< T > > WDataCreatorTorus< T >::ConstSPtr

Abbreviate const shared_ptr.

Definition at line 52 of file WDataCreatorTorus.h.

◆ SPtr

template<class T >
typedef std::shared_ptr< WDataCreatorTorus< T > > WDataCreatorTorus< T >::SPtr

Abbreviate shared_ptr.

Definition at line 47 of file WDataCreatorTorus.h.

Constructor & Destructor Documentation

◆ WDataCreatorTorus()

template<class T >
WDataCreatorTorus< T >::WDataCreatorTorus

◆ ~WDataCreatorTorus()

template<class T >
WDataCreatorTorus< T >::~WDataCreatorTorus
virtual

Destructor.

Definition at line 191 of file WDataCreatorTorus.h.

Member Function Documentation

◆ calculateTorusVertex()

template<class T >
WVector4d WDataCreatorTorus< T >::calculateTorusVertex ( double  torusRadius,
double  ringRadius,
double  torusAngle,
double  ringAngle 
)
private

Calculates a vertex on a torus.

Parameters
torusRadiusThe radius of the torus ( to the midpoint of the ring)
ringRadiusThe radius of the ring
torusAngleThe radius around the torus
ringAngleThe radius around the ring
Returns
WVector4d The vector for the vertex

Definition at line 207 of file WDataCreatorTorus.h.

◆ calculateTransform()

template<class T >
WMatrix4d WDataCreatorTorus< T >::calculateTransform ( const WPosition origin,
const WPosition size 
)
private

Calculates the transformation matrix.

Parameters
originorigin of the bbox
sizesize of the bounding box
Returns
WMatrix4d The transformation matrix

Definition at line 197 of file WDataCreatorTorus.h.

◆ operator()() [1/2]

template<class T >
void WDataCreatorTorus< T >::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 fiber 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.

Definition at line 219 of file WDataCreatorTorus.h.

References wlimits::MAX_FLOAT, WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z().

+ Here is the call graph for this function:

◆ operator()() [2/2]

template<class T >
void WDataCreatorTorus< T >::operator() ( int  seed,
WProgress::SPtr  progress,
const WColor &  color,
size_t  numPoints,
const WPosition origin,
const WPosition size,
WDataSetPoints::VertexArray  vertices,
WDataSetPoints::ColorArray  colors 
)
virtual

Create the point dataset.

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

Parameters
seedthe seed for the random values.
progressprogress indicator
colorcolor of all points
numPointsnumber of points
originorigin of the bbox
sizesize of the bounding box
verticesthe vertex array. Fill this.
colorsthe color array. Fill this.

Definition at line 288 of file WDataCreatorTorus.h.

References wlimits::MAX_FLOAT, WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::x(), WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::y(), and WMatrixFixed< ValueT, Rows, Cols, ValueStoreT >::z().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_generateInner

template<class T >
WPropBool WDataCreatorTorus< T >::m_generateInner
private

Property whether inner fibers should be created.

Definition at line 143 of file WDataCreatorTorus.h.

Referenced by WDataCreatorTorus< T >::WDataCreatorTorus().

◆ m_innerRadius

template<class T >
WPropDouble WDataCreatorTorus< T >::m_innerRadius
private

The inner radius of the torus.

Definition at line 138 of file WDataCreatorTorus.h.

Referenced by WDataCreatorTorus< T >::WDataCreatorTorus().

◆ m_rotateX

template<class T >
WPropDouble WDataCreatorTorus< T >::m_rotateX
private

The rotation angle for the x axis.

Definition at line 148 of file WDataCreatorTorus.h.

Referenced by WDataCreatorTorus< T >::WDataCreatorTorus().

◆ m_rotateY

template<class T >
WPropDouble WDataCreatorTorus< T >::m_rotateY
private

The rotation angle for the x axis.

Definition at line 153 of file WDataCreatorTorus.h.

Referenced by WDataCreatorTorus< T >::WDataCreatorTorus().

◆ m_rotateZ

template<class T >
WPropDouble WDataCreatorTorus< T >::m_rotateZ
private

The rotation angle for the x axis.

Definition at line 158 of file WDataCreatorTorus.h.

Referenced by WDataCreatorTorus< T >::WDataCreatorTorus().


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