Cogs.Core
SeaCurrentsComponent.h
1#pragma once
2
3#include "Foundation/ComponentModel/Component.h"
4
5#include <glm/vec2.hpp>
6
7namespace Cogs::Core {
8
15 enum class ArrowScalingMode : int{
16
17 Off,
18 Normal,
19 PerBand
20 };
21
22
35 float scale = 1.0f;
36 std::vector<glm::vec2> positions;
37 std::vector<float> speeds;
38 std::vector<float> angles;
39 std::vector<int> priorities;
43
44 static void registerType();
45 bool isValid() const;
46 };
47}
48
49template<> inline Cogs::StringView getName<Cogs::Core::SeaCurrentsComponent>() { return "SeaCurrentsComponent"; }
50template<> inline Cogs::StringView getName<Cogs::Core::ArrowScalingMode>() { return "ArrowScalingMode"; }
Base class for Component instances.
Definition: Component.h:143
Provides a weakly referenced view over the contents of a string.
Definition: StringView.h:24
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
@ Normal
Regular shaded rendering.
@ Off
Disable capture and camera, consume no rendering resources.
ArrowScalingMode
Different modes for scaling surface current arrows based on the speed of the current.
@ PerBand
Arrows scale with the speed of the current within each band.
Component for displaying surface currents based on the IHO S111 standard.
std::vector< float > speeds
Speed in knots of the current at each position.
std::vector< int > priorities
Priority of each arrow.
float scale
Fixed scale applied to every arrow, in addition to any scaling for speed.
bool ignorePriorities
Ignore priorities and draw all arrows.
std::vector< float > angles
Compass direction of the current at each position.
int priorityLevel
Hide arrows with priority greater than this.
ArrowScalingMode scalingMode
How the arrows scale with the speed of the currents.
std::vector< glm::vec2 > positions
Position of each arrow in this component in world coordinates.