OpenWalnut  1.5.0dev
WConverterVectors.cpp
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 #include <vector>
26 
27 #include "WConverterVectors.h"
28 
29 
31 {
32  m_vertices = SPFloatVector( new std::vector< float >() );
33  m_sizes = SPFloatVector( new std::vector< float >() );
34  m_colors = SPFloatVector( new std::vector< float >() );
35  m_edeps = SPFloatVector( new std::vector< float >() );
36  m_fiberStartIndexes = SPSizeVector( new std::vector< size_t >() );
37  m_fiberLengths = SPSizeVector( new std::vector< size_t >() );
38  m_verticesReverse = SPSizeVector( new std::vector< size_t >() );
39  m_eventIDs = SPSizeVector( new std::vector< size_t >() );
40 }
41 
43 {
44  m_vertices->clear();
45  m_sizes->clear();
46  m_colors->clear();
47  m_edeps->clear();
48  m_fiberStartIndexes->clear();
49  m_fiberLengths->clear();
50  m_verticesReverse->clear();
51  m_eventIDs->clear();
52 }
53 
55 {
56  return m_vertices;
57 }
58 
60 {
61  return m_sizes;
62 }
63 
65 {
66  return m_colors;
67 }
68 
70 {
71  return m_edeps;
72 }
73 
75 {
76  return m_fiberStartIndexes;
77 }
78 
80 {
81  return m_fiberLengths;
82 }
83 
85 {
86  return m_verticesReverse;
87 }
88 
90 {
91  return m_eventIDs;
92 }
93 
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.
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.