OpenWalnut  1.5.0dev
WConverterVectors.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 WCONVERTERVECTORS_H
26 #define WCONVERTERVECTORS_H
27 
28 #include <memory>
29 #include <vector>
30 
31 
32 
33 /**
34  * represents a std::shared_ptr to a vector containing a vector of floats.
35  */
36 typedef std::shared_ptr< std::vector< float > > SPFloatVector;
37 
38 /**
39  * represents a std::shared_ptr to a vector containing a vector of size_t.
40  */
41 typedef std::shared_ptr< std::vector< size_t > > SPSizeVector;
42 
43 /**
44  * Holds the vectors that store the data for the points and fibers.
45  */
47 {
48 public:
49  /**
50  * A shared_ptr to this class.
51  */
52  typedef std::shared_ptr< WConverterVectors > SPtr;
53 
54  /**
55  * Initializes the vectors as empty vectors.
56  */
58 
59  /**
60  * Clears all vectors.
61  */
62  void clear();
63 
64  /**
65  * Gets the vertices as shared_ptr to a float vector.
66  * \return SPFloatVector The vertices.
67  */
68  SPFloatVector getVertices();
69 
70  /**
71  * Gets the sizes as shared_ptr to a float vector.
72  * \return SPFloatVector The sizes.
73  */
74  SPFloatVector getSizes();
75 
76  /**
77  * Gets the colors as shared_ptr to a float vector.
78  * \return SPFloatVector The colors.
79  */
80  SPFloatVector getColors();
81 
82  /**
83  * Gets the edeps as shared_ptr to a float vector.
84  * \return SPFloatVector The edeps.
85  */
86  SPFloatVector getEdeps();
87 
88  /**
89  * Gets the fiber start indexes as shared_ptr to a size_t vector.
90  * \return SPSizeVector The fiber start indexes.
91  */
92  SPSizeVector getFiberStartIndexes();
93 
94  /**
95  * Gets the fiber lengths as shared_ptr to a size_t vector.
96  * \return SPSizeVector The fiber lengths.
97  */
98  SPSizeVector getFiberLengths();
99 
100  /**
101  * Gets the reverse vertices as shared_ptr to a size_t vector.
102  * \return SPSizeVector The reverse vertices.
103  */
104  SPSizeVector getVerticesReverse();
105 
106  /**
107  * Gets the event IDs as shared_ptr to a size_t vector.
108  * \return SPSizeVector The event IDs.
109  */
110  SPSizeVector getEventIDs();
111 
112 private:
113  SPFloatVector m_vertices; //!< The vertices.
114 
115  SPFloatVector m_sizes; //!< The sizes.
116 
117  SPFloatVector m_colors; //!< The colors.
118 
119  SPFloatVector m_edeps; //!< The edeps.
120 
121  SPSizeVector m_fiberStartIndexes; //!< The fiber start indexes.
122 
123  SPSizeVector m_fiberLengths; //!< The fiber lengths.
124 
125  SPSizeVector m_verticesReverse; //!< The reverse vertices.
126 
127  SPSizeVector m_eventIDs; //!< the event IDs.
128 };
129 
130 #endif // WCONVERTERVECTORS_H
Holds the vectors that store the data for the points and fibers.
SPFloatVector m_edeps
The edeps.
SPFloatVector getVertices()
Gets the vertices as shared_ptr to a float vector.
SPFloatVector m_vertices
The vertices.
SPSizeVector m_fiberStartIndexes
The fiber start indexes.
SPSizeVector getFiberLengths()
Gets the fiber lengths as shared_ptr to a size_t vector.
SPFloatVector getColors()
Gets the colors as shared_ptr to a float vector.
SPFloatVector m_colors
The colors.
SPSizeVector getVerticesReverse()
Gets the reverse vertices as shared_ptr to a size_t vector.
SPSizeVector getFiberStartIndexes()
Gets the fiber start indexes as shared_ptr to a size_t vector.
SPFloatVector getEdeps()
Gets the edeps as shared_ptr to a float vector.
WConverterVectors()
Initializes the vectors as empty vectors.
SPFloatVector m_sizes
The sizes.
std::shared_ptr< WConverterVectors > SPtr
A shared_ptr to this class.
void clear()
Clears all vectors.
SPSizeVector m_fiberLengths
The fiber lengths.
SPSizeVector m_verticesReverse
The reverse vertices.
SPSizeVector m_eventIDs
the event IDs.
SPFloatVector getSizes()
Gets the sizes as shared_ptr to a float vector.
SPSizeVector getEventIDs()
Gets the event IDs as shared_ptr to a size_t vector.