OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Static Protected Attributes
WDataSetFiberVector Class Reference

Represents a simple set of WFibers. More...

#include <WDataSetFiberVector.h>

+ Inheritance diagram for WDataSetFiberVector:

List of all members.

Public Member Functions

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

Static Public Member Functions

static boost::shared_ptr
< WPrototyped
getPrototype ()
 Returns a prototype instantiated with the true type of the deriving class.

Static Protected Attributes

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

Additional Inherited Members

- Public Types inherited from WMixinVector< WFiber >
typedef vector_type::allocator_type allocator_type
 Compares to std::vector type.
typedef vector_type::value_type value_type
 Compares to std::vector type.
typedef vector_type::const_pointer const_pointer
 Compares to std::vector type.
typedef vector_type::pointer pointer
 Compares to std::vector type.
typedef
vector_type::const_reference 
const_reference
 Compares to std::vector type.
typedef vector_type::reference reference
 Compares to std::vector type.
typedef vector_type::const_iterator const_iterator
 Compares to std::vector type.
typedef vector_type::iterator iterator
 Compares to std::vector type.
typedef
vector_type::const_reverse_iterator 
const_reverse_iterator
 Compares to std::vector type.
typedef
vector_type::reverse_iterator 
reverse_iterator
 Compares to std::vector type.
typedef vector_type::size_type size_type
 Compares to std::vector type.
typedef
vector_type::difference_type 
difference_type
 Compares to std::vector type.
- Protected Attributes inherited from WDataSet
boost::shared_ptr< WPropertiesm_properties
 The property object for the dataset.
boost::shared_ptr< WPropertiesm_infoProperties
 The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION".

Detailed Description

Represents a simple set of WFibers.

Definition at line 41 of file WDataSetFiberVector.h.


Constructor & Destructor Documentation

WDataSetFiberVector::WDataSetFiberVector ( )

Default constructor for creating an empty fiber vector.

Definition at line 37 of file WDataSetFiberVector.cpp.

Referenced by generateDataSetOutOfUsedFibers(), and getPrototype().

WDataSetFiberVector::WDataSetFiberVector ( boost::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 43 of file WDataSetFiberVector.cpp.

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

Convert a WDataSetFibers into a fiber vector dataset.

Parameters:
fiberDSDataset which has to be converted

Definition at line 49 of file WDataSetFiberVector.cpp.

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

WDataSetFiberVector::WDataSetFiberVector ( const WDataSetFiberVector other)

Copy constructor for fibers.

Parameters:
otherInstance to copy from

Definition at line 78 of file WDataSetFiberVector.cpp.

WDataSetFiberVector::~WDataSetFiberVector ( )
virtual

Destructs WDataSetFiberVector instances.

Definition at line 94 of file WDataSetFiberVector.cpp.


Member Function Documentation

boost::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 104 of file WDataSetFiberVector.cpp.

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

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

Gets the description for this prototype.

Returns:
the description

Reimplemented from WDataSet.

Definition at line 128 of file WDataSetFiberVector.cpp.

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

Gets the name of this prototype.

Returns:
the name.

Reimplemented from WDataSet.

Definition at line 123 of file WDataSetFiberVector.cpp.

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

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

Returns:
the prototype.

Reimplemented from WDataSet.

Definition at line 133 of file WDataSetFiberVector.cpp.

References m_prototype, and WDataSetFiberVector().

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 118 of file WDataSetFiberVector.cpp.

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 84 of file WDataSetFiberVector.cpp.

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

void WDataSetFiberVector::sortDescLength ( )

Sort fibers descending on their length and update.

Definition at line 99 of file WDataSetFiberVector.cpp.

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

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

Member Data Documentation

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

The prototype as singleton.

Reimplemented from WDataSet.

Definition at line 138 of file WDataSetFiberVector.h.

Referenced by getPrototype().


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