|
WSF
|
#include "WsfScriptRouteClass.hpp"#include <memory>#include "UtLog.hpp"#include "UtMath.hpp"#include "UtMemory.hpp"#include "UtScriptClassDefine.hpp"#include "WsfCallback.hpp"#include "WsfCallbackTypes.hpp"#include "WsfGeoPoint.hpp"#include "WsfRoute.hpp"#include "WsfRouteTypes.hpp"#include "WsfScriptCallback.hpp"#include "WsfSimulation.hpp"#include "WsfTerrainProfiler.hpp"#include "script/WsfScriptDefs.hpp"
Macros | |
| #define | FORBID_CONSTANT_ROUTE |
Functions | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Print, 0, "void", "") | |
| Print(). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Append_1, 1, "void", "WsfWaypoint") | |
| Append(WsfWaypoint aWaypoint). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Append_2, 1, "void", "WsfRoute") | |
| Append(WsfRoute aRoute). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Append_3, 2, "void", "WsfGeoPoint, double") | |
| Append(WsfGeoPoint aGeoPoint, double aSpeed). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Append_4, 1, "void", "string") | |
| Append(string aRouteName). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Insert_1, 2, "void", "int, WsfWaypoint") | |
| Insert(int aBeforeIndex, WsfWaypoint aNewWaypoint). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Remove_1, 1, "void", "int") | |
| Remove(int aIndex). | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Copy, 0, "WsfRoute", "") | |
| WsfRoute route = Copy();. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, CopyGlobal, 1, "WsfRoute", "string") | |
| WsfRoute route = CopyGlobal(string aGlobalRouteName);. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, FindGlobal, 1, "WsfRoute", "string") | |
| (unmodifiable) WsfRoute route = FindGlobal(string aGlobalRouteName); | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Create_1, 1, "WsfRoute", "string") | |
| WsfRoute route = Create(string aRouteName);. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, GlobalRoutes, 0, "Array<string>", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, SetAltitude_1, 1, "void", "double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, SetAltitude_2, 2, "void", "double, string") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, GetSpeed, 1, "double", "int") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, SetSpeed_1, 1, "void", "double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, SetSpeed_2, 2, "void", "int, double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Transform, 3, "void", "double, double, double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, AddCallbackToWaypoint, 2, "void", "string, int") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, AddCallbackToLastWaypoint_1, 1, "void", "string") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, AddCallbackToLastWaypoint_2, 2, "void", "string, string") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, AddCallbackToLastWaypoint_3, 1, "void", "Method") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Size, 0, "int", "") | |
| Size Returns the number of waypoints in the route. | |
| if (!deprecationShown) | |
| PauseTime Returns the pause_time for the waypoint. | |
| if (aObjectPtr->GetSize() > waypointIndex) | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Waypoint_1, 1, "WsfWaypoint", "int") | |
| Waypoint() Return the location at the waypoint at the specified index. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Waypoint_2, 1, "WsfWaypoint", "string") | |
| Waypoint() Return the location at the waypoint with the specified label. | |
| aReturnVal | SetDouble (pauseTime) |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, TotalLength, 0, "double", "") | |
| TotalLength Returns the total length of the route. | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Intersect, 1, "Array<Object>", "WsfRoute") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, DistanceAlongRoute, 1, "double", "WsfGeoPoint") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, DistanceFromRoute, 1, "double", "WsfGeoPoint") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, LocationAtDistance, 1, "WsfGeoPoint", "double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, SubrouteByDistance, 2, "WsfRoute", "double, double") | |
| if (index >=0 &&index<(int) aObjectPtr->GetSize()) | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Front, 0, "WsfWaypoint", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, Back, 0, "WsfWaypoint", "") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, TerrainProfiledClone, 4, "WsfRoute", "double, double, double, double") | |
| UT_DEFINE_SCRIPT_METHOD (WsfScriptRouteClass, WsfRoute, GetIterator, 0, "WsfRouteIterator", "") | |
Variables | |
| static const int | cCONST_ROUTE_ID = 5 |
| static UtScriptClass * | gRouteClassPtr = nullptr |
| unsigned int | waypointIndex = static_cast<unsigned int>(aVarArgs[0].GetInt()) |
| double | pauseTime = 0.0 |
| #define FORBID_CONSTANT_ROUTE |
Referenced by UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| if | ( | ! | deprecationShown | ) |
PauseTime Returns the pause_time for the waypoint.
SetPauseTime Sets the pause time for a waypoint.
GetWaypointAt Return the waypoint at the specified index. Deprecated in favor of Waypoint()
| if | ( | aObjectPtr-> | GetSize(), |
| waypointIndex | ) |
References WsfWaypoint::GetLocationLLA(), and waypointIndex.
| if | ( | index >=0 &&index< | int) aObjectPtr->GetSize( | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| AddCallbackToLastWaypoint_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "string" | ) |
AddCallbackToLastWaypoint adds the specified callback to the last waypoint in the route. If the callback exists in the callback type list, it is cloned and added to the waypoint. Otherwise, the callback is added as an action id and is assumed to exist on the platform. aVarArgs[0] The callback's name.
References WsfObjectTypeList< T >::Clone(), FORBID_CONSTANT_ROUTE, WsfCallbackTypes::Get(), and waypointIndex.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| AddCallbackToLastWaypoint_2 | , | ||
| 2 | , | ||
| "void" | , | ||
| " | string, | ||
| string" | ) |
References FORBID_CONSTANT_ROUTE, and waypointIndex.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| AddCallbackToLastWaypoint_3 | , | ||
| 1 | , | ||
| "void" | , | ||
| "Method" | ) |
References FORBID_CONSTANT_ROUTE, and waypointIndex.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| AddCallbackToWaypoint | , | ||
| 2 | , | ||
| "void" | , | ||
| " | string, | ||
| int" | ) |
AddCallbackToWaypoint adds the specified callback to the waypoint located at the specified index. If the callback exists in the callback type list, it is cloned and added to the waypoint. Otherwise, the callback is added as an action id and is assumed to exist on the platform. aVarArgs[0] The callback's name. aVarArgs[1] The waypoint's index in the route.
References WsfObjectTypeList< T >::Clone(), FORBID_CONSTANT_ROUTE, WsfCallbackTypes::Get(), and waypointIndex.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Append_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "WsfWaypoint" | ) |
Append(WsfWaypoint aWaypoint).
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Append_2 | , | ||
| 1 | , | ||
| "void" | , | ||
| "WsfRoute" | ) |
Append(WsfRoute aRoute).
References WsfRoute::Append(), and FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Append_3 | , | ||
| 2 | , | ||
| "void" | , | ||
| " | WsfGeoPoint, | ||
| double" | ) |
Append(WsfGeoPoint aGeoPoint, double aSpeed).
References WsfPath::cDOUBLE_NOT_SET, and FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Append_4 | , | ||
| 1 | , | ||
| "void" | , | ||
| "string" | ) |
Append(string aRouteName).
References WsfObjectTypeList< T >::Find(), FORBID_CONSTANT_ROUTE, and WsfRouteTypes::Get().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Back | , | ||
| 0 | , | ||
| "WsfWaypoint" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Copy | , | ||
| 0 | , | ||
| "WsfRoute" | , | ||
| "" | ) |
WsfRoute route = Copy();.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| CopyGlobal | , | ||
| 1 | , | ||
| "WsfRoute" | , | ||
| "string" | ) |
WsfRoute route = CopyGlobal(string aGlobalRouteName);.
References WsfObjectTypeList< T >::Clone(), WsfRouteTypes::Get(), and WsfRoute::ScriptRefManage().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Create_1 | , | ||
| 1 | , | ||
| "WsfRoute" | , | ||
| "string" | ) |
WsfRoute route = Create(string aRouteName);.
References WsfRoute::ScriptRefManage().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| DistanceAlongRoute | , | ||
| 1 | , | ||
| "double" | , | ||
| "WsfGeoPoint" | ) |
References WsfGeoPoint::GetLat(), and WsfGeoPoint::GetLon().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| DistanceFromRoute | , | ||
| 1 | , | ||
| "double" | , | ||
| "WsfGeoPoint" | ) |
References WsfGeoPoint::GetLat(), and WsfGeoPoint::GetLon().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| FindGlobal | , | ||
| 1 | , | ||
| "WsfRoute" | , | ||
| "string" | ) |
(unmodifiable) WsfRoute route = FindGlobal(string aGlobalRouteName);
References cCONST_ROUTE_ID, WsfRoute::ConstScriptRef(), WsfObjectTypeList< T >::Find(), and WsfRouteTypes::Get().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Front | , | ||
| 0 | , | ||
| "WsfWaypoint" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| GetIterator | , | ||
| 0 | , | ||
| "WsfRouteIterator" | , | ||
| "" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| GetSpeed | , | ||
| 1 | , | ||
| "double" | , | ||
| "int" | ) |
GetSpeed(int index) returns the speed of the index waypoint
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| GlobalRoutes | , | ||
| 0 | , | ||
| "Array<string>" | , | ||
| "" | ) |
References WsfRouteTypes::Get(), and WsfObjectTypeList< T >::GetCurrentTypes().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Insert_1 | , | ||
| 2 | , | ||
| "void" | , | ||
| " int | , | ||
| WsfWaypoint" | ) |
Insert(int aBeforeIndex, WsfWaypoint aNewWaypoint).
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Intersect | , | ||
| 1 | , | ||
| "Array<Object>" | , | ||
| "WsfRoute" | ) |
Intersects two routes returning a list of intersection points. Returns an array containing 3 elements for each intersection: [ int waypoint_index_1, int waypoint_index_2, WsfGeoPoint location ]
References FORBID_CONSTANT_ROUTE, and WsfRoute::Intersect().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| LocationAtDistance | , | ||
| 1 | , | ||
| "WsfGeoPoint" | , | ||
| "double" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| , | |||
| 0 | , | ||
| "void" | , | ||
| "" | ) |
Print().
References WsfRoute::Print().
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Remove_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "int" | ) |
Remove(int aIndex).
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| SetAltitude_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "double" | ) |
SetAltitude(double aAltitude) The altitude is applied to all waypoints in the route. Altitude reference not changed.
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| SetAltitude_2 | , | ||
| 2 | , | ||
| "void" | , | ||
| " double | , | ||
| string" | ) |
SetAltitude(double aAltitude, string aAltitudeRef) The altitude is applied to all waypoints in the route.
References WsfPath::cALT_REF_AGL, WsfPath::cALT_REF_MOVER_DEFAULT, WsfPath::cALT_REF_MSL, and FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| SetSpeed_1 | , | ||
| 1 | , | ||
| "void" | , | ||
| "double" | ) |
SetSpeed(double aSpeed) The speed is applied to all waypoints in the route.
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| SetSpeed_2 | , | ||
| 2 | , | ||
| "void" | , | ||
| " int | , | ||
| double" | ) |
SetSpeed(int index, double aSpeed) The speed is applied to the index waypoint in the route.
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Size | , | ||
| 0 | , | ||
| "int" | , | ||
| "" | ) |
Size Returns the number of waypoints in the route.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| SubrouteByDistance | , | ||
| 2 | , | ||
| "WsfRoute" | , | ||
| " double | , | ||
| double" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| TerrainProfiledClone | , | ||
| 4 | , | ||
| "WsfRoute" | , | ||
| " double | , | ||
| double | , | ||
| double | , | ||
| double" | ) |
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| TotalLength | , | ||
| 0 | , | ||
| "double" | , | ||
| "" | ) |
TotalLength Returns the total length of the route.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Transform | , | ||
| 3 | , | ||
| "void" | , | ||
| " double | , | ||
| double | , | ||
| double" | ) |
Transform(double aLatitude, double aLongitude, double aHeading) Note: All units are degrees.
References FORBID_CONSTANT_ROUTE.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Waypoint_1 | , | ||
| 1 | , | ||
| "WsfWaypoint" | , | ||
| "int" | ) |
Waypoint() Return the location at the waypoint at the specified index.
| UT_DEFINE_SCRIPT_METHOD | ( | WsfScriptRouteClass | , |
| WsfRoute | , | ||
| Waypoint_2 | , | ||
| 1 | , | ||
| "WsfWaypoint" | , | ||
| "string" | ) |
Waypoint() Return the location at the waypoint with the specified label.
|
static |
Referenced by WsfRoute::ConstScriptRef(), and UT_DEFINE_SCRIPT_METHOD().
|
static |
| double pauseTime = 0.0 |
Referenced by WsfRouteMover::Initialize(), XWsfRoadTraffic::Initialize(), and SetDouble().
| unsigned int waypointIndex = static_cast<unsigned int>(aVarArgs[0].GetInt()) |