OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
WDataSetFiberVector Class Reference

Represents a simple set of WFibers. More...

#include <WDataSetFiberVector.h>

+ Inheritance diagram for WDataSetFiberVector:
+ Collaboration diagram for WDataSetFiberVector:

Public Types

typedef std::shared_ptr< WDataSetFiberVectorSPtr
 Short hand for a std::shared_ptr on such classes. More...
 
- Public Types inherited from WMixinVector< WFiber >
typedef vector_type::allocator_type allocator_type
 Compares to std::vector type. More...
 
typedef vector_type::value_type value_type
 Compares to std::vector type. More...
 
typedef vector_type::const_pointer const_pointer
 Compares to std::vector type. More...
 
typedef vector_type::pointer pointer
 Compares to std::vector type. More...
 
typedef vector_type::const_reference const_reference
 Compares to std::vector type. More...
 
typedef vector_type::reference reference
 Compares to std::vector type. More...
 
typedef vector_type::const_iterator const_iterator
 Compares to std::vector type. More...
 
typedef vector_type::iterator iterator
 Compares to std::vector type. More...
 
typedef vector_type::const_reverse_iterator const_reverse_iterator
 Compares to std::vector type. More...
 
typedef vector_type::reverse_iterator reverse_iterator
 Compares to std::vector type. More...
 
typedef vector_type::size_type size_type
 Compares to std::vector type. More...
 
typedef vector_type::difference_type difference_type
 Compares to std::vector type. More...
 
- Public Types inherited from WDataSet
typedef std::shared_ptr< WDataSetSPtr
 Shared pointer abbreviation to a instance of this class. More...
 
typedef std::shared_ptr< const WDataSetConstSPtr
 Shared pointer abbreviation to a const instance of this class. More...
 

Public Member Functions

 WDataSetFiberVector ()
 Default constructor for creating an empty fiber vector. More...
 
 WDataSetFiberVector (std::shared_ptr< std::vector< WFiber > > fibs)
 Constructs a new set of WFibers. More...
 
 WDataSetFiberVector (std::shared_ptr< const WDataSetFibers > fiberDS)
 Convert a WDataSetFibers into a fiber vector dataset. More...
 
 WDataSetFiberVector (const WDataSetFiberVector &other)
 Copy constructor for fibers. More...
 
virtual ~WDataSetFiberVector ()
 Destructs WDataSetFiberVector instances. More...
 
WDataSetFiberVectoroperator= (const WDataSetFiberVector &other)
 Operator for assigning instances of WDataSetFiberVector. More...
 
void sortDescLength ()
 Sort fibers descending on their length and update. More...
 
std::shared_ptr< WDataSetFiberVectorgenerateDataSetOutOfUsedFibers (const std::vector< bool > &unused) const
 Generates new WDataSetFiberVector out of the used fibers from this dataset. More...
 
virtual bool isTexture () const
 Determines whether this dataset can be used as a texture. More...
 
virtual const std::string getName () const
 Gets the name of this prototype. More...
 
virtual const std::string getDescription () const
 Gets the description for this prototype. More...
 
std::shared_ptr< WDataSetFiberstoWDataSetFibers () const
 Convert this dataset into WDataSetFibers format for other purposes if needed. More...
 
- Public Member Functions inherited from WMixinVector< WFiber >
 WMixinVector ()
 Empty standard constructor. More...
 
 WMixinVector (size_type initial_size, const value_type &fill_value=value_type())
 Constructs a vector of initial_size size where every emlement has its default value or the given value. More...
 
 WMixinVector (InputIterator first, InputIterator last)
 Constructs a new vector out of an iterator of another vector. More...
 
 WMixinVector (const vector_type &other)
 Copy constructor for the appropriate vector type. More...
 
 WMixinVector (const WMixinVector &other)
 Copy constructor for the WMixinVector itself. More...
 
WMixinVectoroperator= (const vector_type &other)
 Assignment operator for the appropriate vector type. More...
 
WMixinVectoroperator= (const WMixinVector &other)
 Assigment operator for the WMixinVector itself. More...
 
virtual ~WMixinVector ()
 Virtual Destructor. More...
 
void clear ()
 Wrapper around std::vector member function. More...
 
void resize (size_type new_size, const value_type &fill_value=value_type())
 Wrapper around std::vector member function. More...
 
void reserve (size_type new_capacity)
 Wrapper around std::vector member function. More...
 
void swap (vector_type &other)
 Allow also swap with vectors of an appropriate type. More...
 
void swap (WMixinVector &other)
 Wrapper around std::vector member function. More...
 
bool empty () const
 Wrapper around std::vector member function. More...
 
size_type size () const
 Wrapper around std::vector member function. More...
 
size_type capacity () const
 Wrapper around std::vector member function. More...
 
size_type max_size () const
 Wrapper around std::vector member function. More...
 
allocator_type get_allocator () const
 Returns its allocator. More...
 
const_iterator begin () const
 Wrapper around std::vector member function. More...
 
iterator begin ()
 Wrapper around std::vector member function. More...
 
const_iterator end () const
 Wrapper around std::vector member function. More...
 
iterator end ()
 Wrapper around std::vector member function. More...
 
const_reverse_iterator rbegin () const
 Wrapper around std::vector member function. More...
 
reverse_iterator rbegin ()
 Wrapper around std::vector member function. More...
 
const_reverse_iterator rend () const
 Wrapper around std::vector member function. More...
 
reverse_iterator rend ()
 Wrapper around std::vector member function. More...
 
const_reference operator[] (size_type index) const
 Wrapper around std::vector member function. More...
 
reference operator[] (size_type index)
 Wrapper around std::vector member function. More...
 
const_reference at (size_type index) const
 Wrapper around std::vector member function. More...
 
reference at (size_type index)
 Wrapper around std::vector member function. More...
 
void assign (size_type count, const value_type &value)
 Wrapper around std::vector member function. More...
 
void assign (Iter first, Iter last)
 Wrapper around std::vector member function. More...
 
void push_back (const value_type &value)
 Wrapper around std::vector member function. More...
 
void pop_back ()
 Wrapper around std::vector member function. More...
 
iterator erase (iterator where)
 Wrapper around std::vector member function. More...
 
iterator erase (iterator first, iterator last)
 Wrapper around std::vector member function. More...
 
iterator insert (iterator where, const value_type &value)
 Wrapper around std::vector member function. More...
 
void insert (iterator where, InputIterator first, InputIterator last)
 Wrapper around std::vector member function. More...
 
void insert (iterator where, size_type count, const value_type &value)
 Wrapper around std::vector member function. More...
 
const_reference back () const
 Wrapper around std::vector member function. More...
 
reference back ()
 Wrapper around std::vector member function. More...
 
const_reference front () const
 Wrapper around std::vector member function. More...
 
reference front ()
 Wrapper around std::vector member function. More...
 
vector_typeasVector ()
 Return this Mixin as its underlying real vector type. More...
 
const vector_typeasVector () const
 Return this Mixin as its underlying real vector type. More...
 
- Public Member Functions inherited from WDataSet
 WDataSet ()
 This constructor should be used if a dataSet does not stem from a file. More...
 
virtual ~WDataSet ()
 Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More...
 
void setFilename (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
std::string getFilename () const
 Get the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED void setFileName (const std::string filename)
 Set the name of the file that this data set stems from. More...
 
OW_API_DEPRECATED std::string getFileName () const
 Get the name of the file that this data set stems from. More...
 
virtual std::shared_ptr< WDataSetVectorisVectorDataSet ()
 Checks if this dataset is a vector dataset. More...
 
virtual osg::ref_ptr< WDataTexture3DgetTexture () const
 Returns the texture- representation of the dataset. More...
 
std::shared_ptr< WPropertiesgetProperties () const
 Return a pointer to the properties object of the dataset. More...
 
std::shared_ptr< WPropertiesgetInformationProperties () const
 Return a pointer to the information properties object of the dataset. More...
 
- Public Member Functions inherited from WTransferable
 WTransferable ()
 Default constructor. More...
 
virtual ~WTransferable ()
 Destructor. More...
 
- Public Member Functions inherited from WPrototyped
 WPrototyped ()
 Default constructor. More...
 
virtual ~WPrototyped ()
 Destructor. More...
 
template<typename T >
bool isA ()
 Checks whether the actual prototype has the specified runtime type. More...
 

Static Public Member Functions

static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 
- Static Public Member Functions inherited from WDataSet
static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Static Protected Attributes

static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 
- Static Protected Attributes inherited from WDataSet
static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Additional Inherited Members

- Protected Attributes inherited from WDataSet
std::shared_ptr< WPropertiesm_properties
 The property object for the dataset. More...
 
std::shared_ptr< WPropertiesm_infoProperties
 The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More...
 

Detailed Description

Represents a simple set of WFibers.

Definition at line 41 of file WDataSetFiberVector.h.

Member Typedef Documentation

◆ SPtr

typedef std::shared_ptr< WDataSetFiberVector > WDataSetFiberVector::SPtr

Short hand for a std::shared_ptr on such classes.

Definition at line 47 of file WDataSetFiberVector.h.

Constructor & Destructor Documentation

◆ WDataSetFiberVector() [1/4]

WDataSetFiberVector::WDataSetFiberVector ( )

Default constructor for creating an empty fiber vector.

Definition at line 38 of file WDataSetFiberVector.cpp.

Referenced by generateDataSetOutOfUsedFibers(), and getPrototype().

+ Here is the caller graph for this function:

◆ WDataSetFiberVector() [2/4]

WDataSetFiberVector::WDataSetFiberVector ( std::shared_ptr< std::vector< WFiber > >  fibs)
explicit

Constructs a new set of WFibers.

Parameters
fibsFiber vector to store in this data set

Definition at line 44 of file WDataSetFiberVector.cpp.

◆ WDataSetFiberVector() [3/4]

WDataSetFiberVector::WDataSetFiberVector ( std::shared_ptr< const WDataSetFibers fiberDS)
explicit

Convert a WDataSetFibers into a fiber vector dataset.

Parameters
fiberDSDataset which has to be converted

Definition at line 50 of file WDataSetFiberVector.cpp.

References wlog::error(), WMixinVector< WFiber >::push_back(), WMixinVector< ValueT >::push_back(), WMixinVector< WFiber >::reserve(), WDataSet::setFilename(), and WMixinVector< WFiber >::size().

+ Here is the call graph for this function:

◆ WDataSetFiberVector() [4/4]

WDataSetFiberVector::WDataSetFiberVector ( const WDataSetFiberVector other)

Copy constructor for fibers.

Parameters
otherInstance to copy from

Definition at line 79 of file WDataSetFiberVector.cpp.

◆ ~WDataSetFiberVector()

WDataSetFiberVector::~WDataSetFiberVector ( )
virtual

Destructs WDataSetFiberVector instances.

Definition at line 95 of file WDataSetFiberVector.cpp.

Member Function Documentation

◆ generateDataSetOutOfUsedFibers()

std::shared_ptr< WDataSetFiberVector > WDataSetFiberVector::generateDataSetOutOfUsedFibers ( const std::vector< bool > &  unused) const

Generates new WDataSetFiberVector out of the used fibers from this dataset.

Parameters
unusedIf the i'th postion of this vector is true, then this fiber is considered as used.
Returns
A reference to the new generate WDataSetFiberVector

Definition at line 105 of file WDataSetFiberVector.cpp.

References WMixinVector< WFiber >::at(), WMixinVector< WFiber >::size(), and WDataSetFiberVector().

+ Here is the call graph for this function:

◆ getDescription()

const std::string WDataSetFiberVector::getDescription ( ) const
virtual

Gets the description for this prototype.

Returns
the description

Reimplemented from WDataSet.

Definition at line 129 of file WDataSetFiberVector.cpp.

◆ getName()

const std::string WDataSetFiberVector::getName ( ) const
virtual

Gets the name of this prototype.

Returns
the name.

Reimplemented from WDataSet.

Definition at line 124 of file WDataSetFiberVector.cpp.

◆ getPrototype()

std::shared_ptr< WPrototyped > WDataSetFiberVector::getPrototype ( )
static

Returns a prototype instantiated with the true type of the deriving class.

Returns
the prototype.

Definition at line 134 of file WDataSetFiberVector.cpp.

References m_prototype, and WDataSetFiberVector().

+ Here is the call graph for this function:

◆ isTexture()

bool WDataSetFiberVector::isTexture ( ) const
virtual

Determines whether this dataset can be used as a texture.

Returns
true if usable as texture.

Reimplemented from WDataSet.

Definition at line 119 of file WDataSetFiberVector.cpp.

◆ operator=()

WDataSetFiberVector & WDataSetFiberVector::operator= ( const WDataSetFiberVector other)

Operator for assigning instances of WDataSetFiberVector.

Parameters
otherInstance which should replace this
Returns
Reference for further usage of the outcome of the assigment

Definition at line 85 of file WDataSetFiberVector.cpp.

References WMixinVector< WFiber >::assign(), WMixinVector< ValueT >::begin(), and WMixinVector< ValueT >::end().

+ Here is the call graph for this function:

◆ sortDescLength()

void WDataSetFiberVector::sortDescLength ( )

Sort fibers descending on their length and update.

Definition at line 100 of file WDataSetFiberVector.cpp.

References WMixinVector< WFiber >::begin(), and WMixinVector< WFiber >::end().

+ Here is the call graph for this function:

◆ toWDataSetFibers()

std::shared_ptr< WDataSetFibers > WDataSetFiberVector::toWDataSetFibers ( ) const

Convert this dataset into WDataSetFibers format for other purposes if needed.

(e.g. display)

Returns
Reference to the dataset in WDataSetFibers format

Definition at line 144 of file WDataSetFiberVector.cpp.

References WMixinVector< ValueT >::begin(), WMixinVector< WFiber >::begin(), WMixinVector< ValueT >::end(), WMixinVector< WFiber >::end(), WMixinVector< ValueT >::push_back(), WMixinVector< ValueT >::size(), and WMixinVector< WFiber >::size().

Referenced by WMReadAmiraMesh::prepareResult().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_prototype

std::shared_ptr< WPrototyped > WDataSetFiberVector::m_prototype = std::shared_ptr< WPrototyped >()
staticprotected

The prototype as singleton.

Definition at line 143 of file WDataSetFiberVector.h.

Referenced by getPrototype().


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