OpenWalnut  1.5.0dev
WDataSetPointsCreatorInterface.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 WDATASETPOINTSCREATORINTERFACE_H
26 #define WDATASETPOINTSCREATORINTERFACE_H
27 
28 #include <core/common/WProgress.h>
29 #include <core/common/math/linearAlgebra/WMatrixFixed.h>
30 #include <core/dataHandler/WDataSetPoints.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 WDataSetPoints 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 points
47  * \param numPoints number of points
48  * \param origin origin of the bbox
49  * \param size size of the bounding box
50  * \param vertices the vertex array. Fill this.
51  * \param colors the color array. Fill this.
52  */
53  virtual void operator()( int seed,
54  WProgress::SPtr progress,
55  const WColor& color,
56  size_t numPoints,
57  const WPosition& origin,
58  const WPosition& size,
60  WDataSetPoints::ColorArray colors ) = 0;
61 
62  /**
63  * Destructor
64  */
66 };
67 
68 #endif // WDATASETPOINTSCREATORINTERFACE_H
69 
Define the interface which is injected into an WObjectNDIP.
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)=0
Create the dataset.
std::shared_ptr< std::vector< float > > ColorArray
Colors for each vertex in VertexArray.
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