28 #include "WConnectorData.h"
33 m_vertices = osg::ref_ptr< osg::Vec3Array >(
new osg::Vec3Array() );
34 m_colors = osg::ref_ptr< osg::Vec4Array >(
new osg::Vec4Array() );
35 m_edeps = std::shared_ptr< std::vector< float > >(
new std::vector< float >() );
36 m_clusterSizes = std::shared_ptr< std::vector< float > >(
new std::vector< float> () );
90 std::vector< osg::Vec3 >::iterator vertexIterator = std::find(
m_vertices->begin(),
m_vertices->end(), vertex );
91 size_t vIdx = std::distance(
m_vertices->begin(), vertexIterator );
bool getSelectedPoint(size_t *idx)
void deselectPoint()
Deselects the currently selected point.
void addVertex(osg::Vec3 vertex, osg::Vec4 color, float edep=0.0, float clusterSize=0.0)
Adds a vertex with its color to the currently selected fiber.
void selectPoint(size_t idx)
Selects a point by its index in m_vertices.
WConnectorData()
Creates the internal vector arrays.
std::shared_ptr< std::vector< float > > m_clusterSizes
The cluster size of the vertices.
bool m_hasClusterSize
Whether cluster size should be used.
void setHasClusterSize(bool clusterSize=true)
Sets whether the cluster size should be used.
std::shared_ptr< std::vector< float > > getEdeps()
void clear()
Clears the internal vector arrays.
bool m_hasSelected
Whether a selection has been done or not.
std::shared_ptr< std::vector< float > > m_edeps
The energy deposition of the vertices.
osg::ref_ptr< osg::Vec3Array > m_vertices
The vertices that are drawn.
std::shared_ptr< std::vector< float > > getClusterSizes()
size_t m_selectedIndex
The index of the selected vertex.
osg::ref_ptr< osg::Vec4Array > getColors()
osg::ref_ptr< osg::Vec3Array > getVertices()
osg::ref_ptr< osg::Vec4Array > m_colors
The color of the vertices that are drawn.