1#include "SeaCurrentsComponent.h"
5void Cogs::Core::SeaCurrentsComponent::registerType() {
11 TypeDatabase::createType<ArrowScalingMode>().setEnumerators(scalingModeEnumerator);
24 Cogs::Reflection::TypeDatabase::createType<SeaCurrentsComponent>().setBase<Component>().setFields(fields);
27bool Cogs::Core::SeaCurrentsComponent::isValid()
const {
28 size_t s = positions.size();
30 return (speeds.size() == s) && (angles.size() == s) && (ignorePriorities || priorities.size() == s);
Field definition describing a single data member of a data structure.
@ PerBand
Arrows scale with the speed of the current within each band.
@ Normal
Arrows scale with the speed of the current from min speed to max speed.
@ Off
No speed dependent arrow scaling.
Contains reflection support.
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.