Triton
Visual simulation library for ocean rendering.
WindFetch.h
Go to the documentation of this file.
1// Copyright (c) 2011-2013 Sundog Software LLC. All rights reserved worldwide.
2
3#ifndef TRITON_WINDFETCH_H
4#define TRITON_WINDFETCH_H
5
9#ifdef SWIG
10%module TritonWindFetch
11#define TRITONAPI
12%{
13#include "WindFetch.h"
14using namespace Triton;
15%}
16#endif
17
18#include "Vector3.h"
19
20#pragma pack(push)
21#pragma pack(8)
22
23namespace Triton
24{
26class WindFetch : public MemObject
27{
28public:
31
40 void TRITONAPI SetWind(double speed, double direction);
41
58 void TRITONAPI SetLocalization(const Vector3& center, const Vector3& radii);
59
73 void TRITONAPI SetFetchLength(double fetch);
74
76 void TRITONAPI ClearLocalization();
77
79 void TRITONAPI ClearFetchLength();
80
95 void TRITONAPI GetWindAtLocation(const Vector3& position, double& windSpeed, double& windDirection, double& fetchLength) const;
96
97 // Called internally:
98 void TRITONAPI AdjustForLeftHanded();
99
100protected:
101 bool isGlobal;
102 Vector3 center, radii;
103 double speed, direction, fetchLength;
104};
105}
106
107#pragma pack(pop)
108
109#endif
A 3D Vector class and its operations.
A localized or global area of wind of given speed and direction.
This base class for all Triton objects intercepts the new and delete operators, routing them through ...
Definition: MemAlloc.h:71
A 3D double-precision Vector class and its operations.
Definition: Vector3.h:36
A localized or global area of wind of given speed and direction.
Definition: WindFetch.h:27
void TRITONAPI SetFetchLength(double fetch)
If using the JONSWAP model, swells will increase depending on the "fetch length," or the distance the...
void TRITONAPI SetLocalization(const Vector3 &center, const Vector3 &radii)
Sets a localized area, in the form of an ellipsoid, in which the wind fetch is active.
void TRITONAPI ClearLocalization()
Clears any localization and makes this wind fetch globally applied.
WindFetch()
Default constructor.
void TRITONAPI SetWind(double speed, double direction)
Sets the wind speed and direction of this wind fetch.
void TRITONAPI GetWindAtLocation(const Vector3 &position, double &windSpeed, double &windDirection, double &fetchLength) const
Retrieves the wind direction and speed from this wind fetch at the given location.
void TRITONAPI ClearFetchLength()
Clears any explicit fetch length specified by SetFetchLength().