Vis2 Line Renderer
Linedata-Renderer with transparancy
host_structures.h
Go to the documentation of this file.
1#pragma once
2
3#include <vulkan/vulkan_core.h>
4
8struct Vertex {
9
13 glm::vec3 position = { -1.0F, -1.0F, -1.0F };
14
18 float data = -1.0F;
19
24 float curvature = -1.0F;
25};
26
30struct Poly {
31
35 std::vector<Vertex> vertices;
36
37};
38
44{
48 uint32_t firstIndex;
53};
54
62 glm::mat4 mViewMatrix;
66 glm::mat4 mProjMatrix;
70 glm::vec4 mCamPos;
74 glm::vec4 mCamDir;
79 glm::vec4 mClearColor;
88 glm::vec4 mkBufferInfo;
89
98 glm::vec4 mDirLightColor;
103 glm::vec4 mAmbLightColor;
111 glm::vec4 mMaterialLightReponse; // vec4(0.5, 1.0, 0.5, 32.0); // amb, diff, spec, shininess
112
136
146
159
178
179};
Represents a connected group of lines
Definition: host_structures.h:30
std::vector< Vertex > vertices
The vertices that make up this Polyline
Definition: host_structures.h:35
Represents one point of a line
Definition: host_structures.h:8
glm::vec3 position
The position of the point
Definition: host_structures.h:13
float data
The data (velocity/radius/vorticity) of this point
Definition: host_structures.h:18
float curvature
The curvature of this point (angle between adjacent lines) The value is mapped in between 0 and 1 by ...
Definition: host_structures.h:24
This structure holds information about when a polyline starts and how long it is inside a sorted Vert...
Definition: host_structures.h:44
uint32_t numberOfPrimitives
The number of vertices that belong to this polyline
Definition: host_structures.h:52
uint32_t firstIndex
The index of the first vertex inside the buffer array
Definition: host_structures.h:48
A container for the general UBO that we send to the shaders which contains all of the user controllab...
Definition: host_structures.h:58
glm::vec4 mkBufferInfo
contains resx, resy and kbuffer levels
Definition: host_structures.h:88
uint32_t mVertexRadiusMode
The radius mode for vertices (see main->renderUI() for possible states)
Definition: host_structures.h:158
VkBool32 mVertexRadiusInvert
Reverses the factor (depending on the mode) for dynamic radius if true
Definition: host_structures.h:167
glm::mat4 mProjMatrix
The projection matrix given by the quake cam
Definition: host_structures.h:66
VkBool32 mVertexAlphaInvert
Reverses the factor (depending on the mode) for dynamic transparency if true
Definition: host_structures.h:163
float mDataMaxLineLength
The maximum line length inside the dataset. Which is necessary to calculate a factor from 0-1 in the ...
Definition: host_structures.h:172
glm::vec4 mAmbLightColor
The color of the ambient light a ... ignored
Definition: host_structures.h:103
glm::vec4 mCamDir
The looking direction of the camera/eye in world space
Definition: host_structures.h:74
float mDataMaxVertexAdjacentLineLength
The maximum line length of adjacing lines to a vertex inside the dataset. This value is unused so far...
Definition: host_structures.h:177
glm::vec4 mDirLightColor
The color of the light/sun multiplied with the intensity a ... ignored
Definition: host_structures.h:98
uint32_t mVertexAlphaMode
The transparency mode for vertices (see main->renderUI() for possible states)
Definition: host_structures.h:154
glm::vec4 mVertexColorMin
The vertex color for minimum values (depending on the mode). Is also used for the color if in static ...
Definition: host_structures.h:118
glm::vec4 mDirLightDirection
The direction of the light/sun in WS
Definition: host_structures.h:93
glm::vec4 mVertexColorMax
The vertex color for vertices with maximum values (depending on the mode) a ... ignored
Definition: host_structures.h:123
glm::vec4 mMaterialLightReponse
The material light properties for the tubes: r ... ambient light factor g ... diffuse light factor b ...
Definition: host_structures.h:111
glm::vec4 mVertexRadiusBounds
The min/max level for the radius of vertices in dynamic modes The min value is also used if in static...
Definition: host_structures.h:135
VkBool32 mBillboardShadingEnabled
Flag to enable/disable shading of the billboard (raycasting will still be done for possible clipping)
Definition: host_structures.h:145
glm::vec4 mHelperLineColor
rgb ... The color for the 2d helper lines. a ... ignored
Definition: host_structures.h:84
glm::vec4 mClearColor
rgb ... The background color for the background shader a ... The strength of the gradient
Definition: host_structures.h:79
glm::mat4 mViewMatrix
The view matrix given by the quake cam
Definition: host_structures.h:62
VkBool32 mBillboardClippingEnabled
Flag to enable/disable the clipping of the billboard based on the raycasting and for the caps.
Definition: host_structures.h:141
glm::vec4 mCamPos
The position of the camera/eye in world space
Definition: host_structures.h:70
glm::vec4 mVertexAlphaBounds
The min/max levels for line transparencies in dynamic modes The min value is also used if in static m...
Definition: host_structures.h:129
uint32_t mVertexColorMode
The coloring mode for vertices (see main->renderUI() for possible states)
Definition: host_structures.h:150