OpenWalnut  1.5.0dev
WDataCreatorPointsRandom.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 WDATACREATORPOINTSRANDOM_H
26 #define WDATACREATORPOINTSRANDOM_H
27 
28 #include "WDataSetPointsCreatorInterface.h"
29 #include "core/common/WObjectNDIP.h"
30 
31 /**
32  * Create a fiber spiral
33  */
34 class WDataCreatorPointsRandom: public WObjectNDIP< WDataSetPointsCreatorInterface >
35 {
36 public:
37  /**
38  * Abbreviate shared_ptr
39  */
40  typedef std::shared_ptr< WDataCreatorPointsRandom > SPtr;
41 
42  /**
43  * Abbreviate const shared_ptr
44  */
45  typedef std::shared_ptr< const WDataCreatorPointsRandom > ConstSPtr;
46 
47  /**
48  * Default constructor.
49  */
51 
52  /**
53  * Destructor.
54  */
55  virtual ~WDataCreatorPointsRandom();
56 
57  /**
58  * Create the dataset. This needs to be implemented by all the creators you write.
59  *
60  * \param seed the seed for the random values.
61  * \param progress progress indicator
62  * \param color color of all points
63  * \param numPoints number of points
64  * \param origin origin of the bbox
65  * \param size size of the bounding box
66  * \param vertices the vertex array. Fill this.
67  * \param colors the color array. Fill this.
68  */
69  virtual void operator()( int seed,
70  WProgress::SPtr progress,
71  const WColor& color,
72  size_t numPoints,
73  const WPosition& origin,
74  const WPosition& size,
77 protected:
78 private:
79 };
80 
81 #endif // WDATACREATORPOINTSRANDOM_H
WDataCreatorPointsRandom()
Default constructor.
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)
Create the dataset.
std::shared_ptr< const WDataCreatorPointsRandom > ConstSPtr
Abbreviate const shared_ptr.
virtual ~WDataCreatorPointsRandom()
Destructor.
std::shared_ptr< WDataCreatorPointsRandom > SPtr
Abbreviate shared_ptr.
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 is a base class for everything which has a Name,Description,Icon and Properties (=NDIP).
Definition: WObjectNDIP.h:42
This only is a 3d double vector.
std::shared_ptr< WProgress > SPtr
Shared pointer on a WProgress.
Definition: WProgress.h:48