1
//---------------------------------------------------------------------------
3
// Project: OpenWalnut ( http://www.openwalnut.org )
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
8
// This file is part of OpenWalnut.
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
23
//---------------------------------------------------------------------------
25
#ifndef WDATACREATORFIBERSPIRAL_H
26
#define WDATACREATORFIBERSPIRAL_H
28
#include <boost/shared_ptr.hpp>
30
#include "core/common/WObjectNDIP.h"
32
#include "WDataSetFibersCreatorInterface.h"
35
* Create a fiber spiral
37
class WDataCreatorFiberSpiral: public WObjectNDIP< WDataSetFibersCreatorInterface >
41
* Abbreviate shared_ptr
43
typedef boost::shared_ptr< WDataCreatorFiberSpiral > SPtr;
46
* Abbreviate const shared_ptr
48
typedef boost::shared_ptr< const WDataCreatorFiberSpiral > ConstSPtr;
51
* Default constructor.
53
WDataCreatorFiberSpiral();
58
virtual ~WDataCreatorFiberSpiral();
61
* Create the dataset. This needs to be implemented by all the creators you write.
63
* \param progress progress indicator
64
* \param color color of all fibers
65
* \param numFibers number of fibers
66
* \param numVertsPerFiber number of vertices per fiber
67
* \param origin origin of the bbox
68
* \param size size of the bounding box
69
* \param vertices the vertex array. Fill this.
70
* \param fibIdx the fiber index array. Fill this.
71
* \param lengths the lengths array. Fill this.
72
* \param fibIdxVertexMap inverse map. Fill this.
73
* \param colors the color array. Fill this.
77
virtual void operator()( WProgress::SPtr progress,
80
size_t numVertsPerFiber,
81
const WPosition& origin,
82
const WPosition& size,
83
WDataSetFibers::VertexArray vertices,
84
WDataSetFibers::IndexArray fibIdx,
85
WDataSetFibers::LengthArray lengths,
86
WDataSetFibers::IndexArray fibIdxVertexMap,
87
WDataSetFibers::ColorArray colors );
91
* Number of rotations to do.
93
WPropInt m_numRotations;
96
* The radius of a tube (consisting of multiple fibers
98
WPropDouble m_tubeRadius;
101
#endif // WDATACREATORFIBERSPIRAL_H