OpenWalnut  1.5.0dev
WDataSetFibersCreatorInterface.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
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.
14 //
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.
19 //
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/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WDATASETFIBERSCREATORINTERFACE_H
26 #define WDATASETFIBERSCREATORINTERFACE_H
27 
28 #include <core/common/WProgress.h>
29 #include <core/common/math/linearAlgebra/WMatrixFixed.h>
30 #include <core/dataHandler/WDataSetFibers.h>
31 
32 /**
33  * Define the interface which is injected into an \ref WObjectNDIP. Remember that \ref WObjectNDIP is a template class deriving from its
34  * template type. This way we can inject methods into the base class. It avoids derivation from \ref WObjectNDIP.
35  *
36  * This class is especially useful for all dataset types that are WDataSetFibers types.
37  */
39 {
40 public:
41  /**
42  * Create the dataset. This needs to be implemented by all the creators you write.
43  *
44  * \param seed the seed for the random values.
45  * \param progress progress indicator
46  * \param color color of all fibers
47  * \param numFibers number of fibers
48  * \param numVertsPerFiber number of vertices per fiber
49  * \param origin origin of the bbox
50  * \param size size of the bounding box
51  * \param vertices the vertex array. Fill this.
52  * \param fibIdx the fiber index array. Fill this.
53  * \param lengths the lengths array. Fill this.
54  * \param fibIdxVertexMap inverse map. Fill this.
55  * \param colors the color array. Fill this.
56  */
57  virtual void operator()( int seed,
58  WProgress::SPtr progress,
59  const WColor& color,
60  size_t numFibers,
61  size_t numVertsPerFiber,
62  const WPosition& origin,
63  const WPosition& size,
67  WDataSetFibers::IndexArray fibIdxVertexMap,
68  WDataSetFibers::ColorArray colors ) = 0;
69 
70  /**
71  * Destructor
72  */
74 };
75 
76 #endif // WDATASETFIBERSCREATORINTERFACE_H
77 
Define the interface which is injected into an WObjectNDIP.
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)=0
Create the dataset.
std::shared_ptr< std::vector< size_t > > IndexArray
Index list indexing fibers in VertexArray in terms of vertex numbers.
std::shared_ptr< std::vector< float > > ColorArray
Colors for each vertex in VertexArray.
std::shared_ptr< std::vector< size_t > > LengthArray
Lengths of fibers in terms of vertices.
std::shared_ptr< std::vector< float > > VertexArray
List of vertex coordinates in term of components of vertices.
This only is a 3d double vector.
std::shared_ptr< WProgress > SPtr
Shared pointer on a WProgress.
Definition: WProgress.h:48