Blue Brain BioExplorer
Streamline.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018, EPFL/Blue Brain Project
3
* All rights reserved. Do not distribute without permission.
4
* Responsible Author: Jonas Karlsson <jonas.karlsson@epfl.ch>
5
*
6
* This file is part of Blue Brain BioExplorer <https://github.com/BlueBrain/BioExplorer>
7
*
8
* This library is free software; you can redistribute it and/or modify it under
9
* the terms of the GNU Lesser General Public License version 3.0 as published
10
* by the Free Software Foundation.
11
*
12
* This library is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15
* details.
16
*
17
* You should have received a copy of the GNU Lesser General Public License
18
* along with this library; if not, write to the Free Software Foundation, Inc.,
19
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
*/
21
22
#pragma once
23
24
#include <
platform/core/common/Types.h
>
25
26
namespace
core
27
{
28
struct
Streamline
29
{
30
Streamline
(
const
Vector3fs
& position_in,
const
Vector4fs
& color_in,
const
std::vector<float>& radius_in)
31
:
position
(position_in)
32
,
color
(color_in)
33
,
radius
(radius_in)
34
{
35
}
36
37
// Array of vertex positions
38
Vector3fs
position
;
39
40
// Array of corresponding vertex colors (RGBA)
41
Vector4fs
color
;
42
43
// Array of vertex radii
44
std::vector<float>
radius
;
45
};
46
47
struct
StreamlinesData
48
{
49
// Data array of all vertex position (and optional radius) for all
50
// streamlines
51
Vector4fs
vertex
;
52
53
// Data array of corresponding vertex colors (RGBA)
54
Vector4fs
vertexColor
;
55
56
// Data array of indices to the first vertex of a link.
57
//
58
// A streamlines geometry can contain multiple disjoint streamlines, each streamline is specified as a list of
59
// segments (or links) referenced via index: each entry e of the index array points the first vertex of a link
60
// (vertex[index[e]]) and the second vertex of the link is implicitly the directly following one
61
// (vertex[index[e]+1]). For example, two streamlines of vertices (A-B-C-D) and (E-F-G), respectively, would
62
// internally correspond to five links (A-B, B-C, C-D, E-F, and F-G), and would be specified via an array of
63
// vertices [A,B,C,D,E,F,G], plus an array of link indices [0,1,2,4,5].
64
std::vector<int32_t>
indices
;
65
66
void
clear
()
67
{
68
vertex
.clear();
69
vertexColor
.clear();
70
indices
.clear();
71
}
72
};
73
}
// namespace core
core
Definition:
BaseWindow.cpp:53
core::Vector4fs
std::vector< Vector4f > Vector4fs
Definition:
MathTypes.h:140
core::Vector3fs
std::vector< Vector3f > Vector3fs
Definition:
MathTypes.h:139
Types.h
core::Streamline
Definition:
Streamline.h:29
core::Streamline::position
Vector3fs position
Definition:
Streamline.h:38
core::Streamline::color
Vector4fs color
Definition:
Streamline.h:41
core::Streamline::radius
std::vector< float > radius
Definition:
Streamline.h:44
core::Streamline::Streamline
Streamline(const Vector3fs &position_in, const Vector4fs &color_in, const std::vector< float > &radius_in)
Definition:
Streamline.h:30
core::StreamlinesData
Definition:
Streamline.h:48
core::StreamlinesData::vertexColor
Vector4fs vertexColor
Definition:
Streamline.h:54
core::StreamlinesData::clear
void clear()
Definition:
Streamline.h:66
core::StreamlinesData::vertex
Vector4fs vertex
Definition:
Streamline.h:51
core::StreamlinesData::indices
std::vector< int32_t > indices
Definition:
Streamline.h:64
platform
core
common
geometry
Streamline.h
Generated by
1.9.1