|
WSF
|
A collection of WsfWaypoint objects that represent a path to be followed. More...
#include <WsfRoute.hpp>


Classes | |
| struct | RouteIntersection |
Public Types | |
| using | WaypointVector = std::vector<WsfWaypoint> |
| using | WayptVecIter = std::vector<WsfWaypoint>::iterator |
| using | WaypointPtrVector = std::vector<WsfWaypoint*> |
| using | WaypointSegment = std::pair<WsfWaypoint, WsfWaypoint> |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
Public Member Functions | |
| WsfRoute ()=default | |
| WsfRoute (const std::string &aName) | |
| WsfRoute (const WsfRoute &aSrc) | |
| Copy constructor (for Clone()). | |
| ~WsfRoute () override | |
| WsfRoute & | operator= (const WsfRoute &aRhs) |
| WsfWaypoint & | operator[] (size_t aIndex) |
| const WsfWaypoint & | operator[] (size_t aIndex) const |
| WsfRoute * | Clone () const override |
| virtual bool | Initialize (double aSimTime=0.0) |
| bool | ProcessInput (UtInput &aInput) override |
| const char * | GetScriptClassName () const override |
| void | Append (const WsfWaypoint &aWaypoint) |
| Add the given point to the end of the waypoint vector. | |
| void | Append (const WsfRoute &aRoute) |
| Add all the waypoints of the given route to the end of the current route. | |
| void | Insert (WayptVecIter aIter, const WsfWaypoint &aWaypoint) |
| void | Insert (int aIndex, const WsfWaypoint &aWaypoint) |
| void | Remove (unsigned int aWaypointIndex) |
| void | Transform (double aRefLat, double aRefLon, double aHeading) |
| void | TransformNED (double aNorth, double aEast, double aDown) |
| void | GetSubroute (const WsfWaypoint &aFromWaypoint, const WsfWaypoint &aToWaypoint, WsfRoute &aRoute) const |
| void | GetSubroute (int aStartIndex, int aEndIndex, WsfRoute &aRoute) const |
| void | AppendSubroute (int aStartIndex, int aEndIndex, WsfRoute &aRoute) const |
| void | GetAllNodes (WaypointPtrVector &aWaypointPtrVector) |
| int | GetAdjacentNodeIndices (int aWaypointIndex, int *aAdjacentNodeIndices) const |
| int | FindWaypointIndex (double aLat, double aLon, double aAlt) |
| int | FindWaypointIndex (const WsfWaypoint &aWpt) |
| bool | IsBetweenWaypoints (const double aPointLL[2], const unsigned int aFirstWaypointIndex, const unsigned int aSecondWaypointIndex, const double aTolerancePercentage=0.01) const |
| double | GetDistance (int aFromWaypointIndex, int aToWaypointIndex) const |
| double | GetDistanceOffset (const double aFromLL[2], const double aToLL[2], const double aPointLL[2], double &aOffsetDist) const |
| double | GetDistanceAlongRoute (const double aFromLL[2], const double aToLL[2]) const |
| double | GetDistanceAlongRoute (const double aFromLL[2], const double aToLL[2], double &aOffsetDist) const |
| bool | GetEndPointsAtDistance (double aDistance, int &aWaypointIndex) const |
| bool | PointAlongRoute (double aDistanceFromStart, double aPointAlongRoute[2], int &aSegmentIndex) |
| bool | ProjectOntoRoute (const double aPointLL[2], int &aSegmentIndex, double aProjectedLL[2], double &aDistance) const |
| bool | ProjectOntoRoute (const double aPointLL[2], double &aDistanceFromRoute, double &aDistanceAlongRoute) const |
| int | ProjectOntoRouteFast (const double aPointLL[2], double &aDistanceFromRoute, double &aDistanceAlongRoute) const |
| bool | ProjectOntoRouteGivenClosestWaypoint (double aLat, double aLon, int aClosestWaypointIndex, int &aSegmentIndex, double aProjectedLL[2]) |
| int | Intersect (WsfRoute &aOtherRoute, std::vector< RouteIntersection > &aIntersections) |
| double | GetTotalLength () const |
| Get the total distance along all waypoints in the route. | |
| double | GetTravelTime () const |
| Get the time to travel the route given the speed of each segment. | |
| double | GetTravelTimeToPosition (const double aPosition[2]) const |
| WsfWaypoint & | GetWaypointAt (size_t aIndex) |
| const WsfWaypoint & | GetWaypointAt (size_t aIndex) const |
| unsigned int | GetWaypointIndexAt (WsfStringId aLabelId) const |
| bool | IsGlobalRoute () const |
| void | SetNetworkRouteId (unsigned int aRouteId) |
| unsigned int | GetNetworkRouteId () const |
| Get the network route Id associated with this route. | |
| void | SetSpeed (double aSpeed) |
| double | GetSpeed (unsigned int aIndex) const |
| const WaypointVector & | GetWaypoints () const |
| WayptVecIter | Begin () |
| Return an iterator to the first waypoint in the route. | |
| WayptVecIter | End () |
| void | Clear () |
| Remove all waypoints from a route. | |
| bool | Empty () const |
| unsigned int | GetSize () const |
| void | Print (ut::log::MessageStream &aStream) const |
| Adds details to the notes of aStream. | |
| void | Swap (WsfRoute &aRhs) |
| Swap two WsfRoute's efficiently. | |
| UtReferenceCount * | GetWaypointReferenceCount () |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| UtScriptRef * | ScriptRef () |
| Return a script reference to this route, managed by the application. | |
| UtScriptRef * | ConstScriptRef () const |
| UtScriptRef * | ScriptRefManage () |
| Return a script reference to this route, managed by the scripting language. | |
| bool | ProcessNavigationInput (UtInput &aInput) |
| void | ProcessWaypoint (UtInput &aInput, WsfWaypoint &aWaypoint) |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
| Public Member Functions inherited from WsfAuxDataEnabled | |
| WsfAuxDataEnabled ()=default | |
| WsfAuxDataEnabled (const WsfAuxDataEnabled &aSrc)=default | |
| WsfAuxDataEnabled & | operator= (const WsfAuxDataEnabled &aRhs) |
| WsfAuxDataEnabled (WsfAuxDataEnabled &&)=default | |
| WsfAuxDataEnabled & | operator= (WsfAuxDataEnabled &&)=default |
| virtual | ~WsfAuxDataEnabled () noexcept |
| void | SetAuxData (const WsfAttributeContainer &aAuxData) |
| void | DeleteAuxData () |
| Delete the aux data container from the object. | |
| void | MergeAuxData (const WsfAuxDataEnabled &aSrc) |
| Merge the object's aux data with aux data from an existing object. | |
| void | UpdateAuxData (const WsfAuxDataEnabled &aSrc) |
| Update the object's aux data with aux data from an existing object. | |
| bool | HasAuxData () const |
| Returns true if this object has aux data. | |
| bool | ProcessInput (UtInput &aInput) |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| (De)serialization for XIO | |
| WsfAttributeContainer & | GetAuxData () |
| const WsfAttributeContainer & | GetAuxData () const noexcept |
| const WsfAttributeContainer & | GetAuxDataConst () const noexcept |
Static Public Member Functions | |
| static std::unique_ptr< UtScriptClass > | CreateScriptClass (const std::string &aClassName, UtScriptTypes *aScriptTypesPtr) |
| static std::unique_ptr< UtScriptClass > | CreateIteratorScriptClass (const std::string &aClassName, UtScriptTypes *aScriptTypesPtr) |
| static bool | ProjectOntoRoute (const double aPointLL[2], const double aSegmentStartLL[2], const double aSegmentEndLL[2], double aWaypointLL[2]) |
| static void | ProcessInputBlock (UtInputBlock &aInputBlock, WsfRoute *aRoutePtr, bool aAllowName) |
Static Public Attributes | |
| static constexpr const char * | cTYPE_KIND = "route" |
| Static Public Attributes inherited from WsfAuxDataEnabled | |
| static UtCallbackListN< void(const WsfAuxDataEnabled *)> | AuxDataAccessed |
| static UtCallbackListN< void(const WsfAuxDataEnabled *)> | AuxDataDestroyed |
Additional Inherited Members | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
A collection of WsfWaypoint objects that represent a path to be followed.
| using WsfRoute::WaypointPtrVector = std::vector<WsfWaypoint*> |
| using WsfRoute::WaypointSegment = std::pair<WsfWaypoint, WsfWaypoint> |
| using WsfRoute::WaypointVector = std::vector<WsfWaypoint> |
| using WsfRoute::WayptVecIter = std::vector<WsfWaypoint>::iterator |
|
default |
References Append(), AppendSubroute(), CreateIteratorScriptClass(), CreateScriptClass(), FindWaypointIndex(), GetAdjacentNodeIndices(), GetAllNodes(), GetDistance(), GetDistanceAlongRoute(), GetDistanceOffset(), GetEndPointsAtDistance(), GetSubroute(), Initialize(), Insert(), Intersect(), IsBetweenWaypoints(), operator[](), PointAlongRoute(), ProjectOntoRoute(), ProjectOntoRouteFast(), ProjectOntoRouteGivenClosestWaypoint(), Remove(), Transform(), TransformNED(), and WsfRoute().
Referenced by Append(), AppendSubroute(), Clone(), ConstScriptRef(), CreateScriptClass(), GetSubroute(), GetSubroute(), Intersect(), operator=(), ProcessInputBlock(), ProcessNavigationInput(), Swap(), WsfRoute(), and WsfRoute().
| WsfRoute::WsfRoute | ( | const std::string & | aName | ) |
Constructor for a named, but empty, route
| aName | A string containing the name of the route. |
References WsfObject::SetName(), and WsfObject::WsfObject().
| WsfRoute::WsfRoute | ( | const WsfRoute & | aSrc | ) |
Copy constructor (for Clone()).
References WsfAuxDataEnabled::WsfAuxDataEnabled(), WsfObject::WsfObject(), and WsfRoute().
|
override |
| void WsfRoute::Append | ( | const WsfRoute & | aRoute | ) |
Add all the waypoints of the given route to the end of the current route.
References Append(), GetSize(), and WsfRoute().
| void WsfRoute::Append | ( | const WsfWaypoint & | aWaypoint | ) |
Add the given point to the end of the waypoint vector.
References GetDistanceAlongRoute(), WsfWaypoint::GetLat(), and WsfWaypoint::GetLon().
Referenced by Append(), WsfRouteNetwork::Append(), AppendSubroute(), WsfRouteNetwork::AppendSubroute(), WsfPathFinder::ComputeExtrapolate(), WsfNavigationMesh::ComputeSetRoute(), WsfPathFinder::ComputeSetRoute(), WsfRoadMover::CreateRoute(), WsfRoadMover::CreateRoute(), WsfRoadMover::CreateRoute(), WsfRouteMover::FindAndSetPath(), WsfNavigationMesh::FindPath(), WsfPathFinder::FindPath(), WsfRouteNetwork::GeneratePathBetweenClosestSegments(), WsfRouteNetwork::GeneratePathOffRouteToRoute(), WsfIterativeRouteMover::GoToLocation(), WsfRouteMover::GoToLocation(), if(), if(), WsfRoadMover::Initialize(), XWsfAirTraffic::Initialize(), Insert(), WsfNavigationMesh::LineOfSightTest(), SAM_LaunchComputerGenerator::PlaceNewTarget(), ProcessNavigationInput(), ProcessWaypoint(), WsfNavigationMesh::RefineFromCurrentPosition(), WsfZoneRouteFinder::RouteAroundZones(), 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(), while(), and WsfRoute().
| void WsfRoute::AppendSubroute | ( | int | aStartIndex, |
| int | aEndIndex, | ||
| WsfRoute & | aRoute ) const |
Given a 'start' route index and an 'end' route index, both of which represent waypoints that are contained within the referenced route, append the sub-route that begins and ends with those waypoints.
| aStartIndex | The first waypoint index in the sub-route. |
| aEndIndex | The last waypoint index in the sub-route. |
| aRoute | The route to be appended with the sub-route. |
References Append(), and WsfRoute().
Referenced by GetSubroute(), and WsfRoute().
|
inline |
Return an iterator to the first waypoint in the route.
| void WsfRoute::Clear | ( | ) |
Remove all waypoints from a route.
Referenced by WsfPathFinder::ComputeExtrapolate(), WsfNavigationMesh::ComputeSetRoute(), WsfRoadMover::CreateRoute(), WsfNavigationMesh::FindPath(), WsfPathFinder::FindPath(), WsfRouteNetwork::GeneratePathBetweenClosestSegments(), WsfRouteNetwork::GeneratePathBetweenClosestWaypoints(), WsfRouteNetwork::GeneratePathOffRouteToRoute(), WsfRouteNetwork::GenerateShortestPathBetweenWaypoints(), WsfNavigationMesh::GetFurthestVisiblePoint(), GetSubroute(), and WsfNavigationMesh::RefineFromCurrentPosition().
|
overridevirtual |
Clone this object by creating an identical copy and returning a pointer to it.
Implements WsfObject.
References WsfRoute().
Referenced by XWsfOSM_Traffic::AddScriptedVehicle(), WsfRouteFinder::Route(), WsfRouteFinder::RouteAvoidances(), wsf::six_dof::Mover::SetDefaultRoute(), WsfP6DOF_Mover::SetDefaultRoute(), wsf::six_dof::Mover::SetTempRoute(), WsfP6DOF_Mover::SetTempRoute(), wsf::six_dof::Mover::UpdateRoute(), WsfP6DOF_Mover::UpdateRoute(), UT_DEFINE_SCRIPT_METHOD(), and WsfP6DOF_Mover::WsfP6DOF_Mover().
| UtScriptRef * WsfRoute::ConstScriptRef | ( | ) | const |
Return a const script reference to this route, managed by the application. Script accessors will be forbidden from modifying this object.
References cCONST_ROUTE_ID, ScriptRef(), and WsfRoute().
Referenced by UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
static |
Referenced by WsfScriptManager::RegisterTypes(), and WsfRoute().
|
static |
Create the 'class' object for the script system. This is invoked once by WsfScriptManager to create the 'class' object that defines the interface to instances of this class from the script system.
References CreateScriptClass(), and WsfRoute().
Referenced by CreateScriptClass(), WsfScriptManager::RegisterTypes(), and WsfRoute().
|
inline |
Determine whether the route contains any waypoints.
Referenced by WsfRouteNetwork::Append(), WsfRouteNetwork::GeneratePathOffRouteToRoute(), wsf::six_dof::GuidanceComputer::RouteChanged(), WsfGuidanceComputer::RouteChanged(), WsfP6DOF_GuidanceComputer::RouteChanged(), WsfP6DOF_GuidanceComputer::SelectPhase(), wsf::six_dof::GuidanceComputer::SelectWaypoint(), WsfGuidanceComputer::SelectWaypoint(), WsfRouteMover::UpdateRoute(), wsf::six_dof::GuidanceComputer::UpdateRouteFollowing(), and WsfGuidanceComputer::UpdateRouteFollowing().
|
inline |
Return an iterator to the end of the vector (i.e., whether the iterator is past the last waypoint in the vector).
| int WsfRoute::FindWaypointIndex | ( | const WsfWaypoint & | aWpt | ) |
| int WsfRoute::FindWaypointIndex | ( | double | aLat, |
| double | aLon, | ||
| double | aAlt ) |
References WsfWaypoint::GetAlt(), WsfWaypoint::GetLat(), and WsfWaypoint::GetLon().
Referenced by FindWaypointIndex(), WsfRouteNetwork::GenerateShortestPathBetweenWaypoints(), and WsfRoute().
| int WsfRoute::GetAdjacentNodeIndices | ( | int | aWaypointIndex, |
| int * | aAdjacentNodeIndices ) const |
Determine which nodes are adjacent to a node given its index.
| aWaypointIndex | The waypoint index around which to find adjacent nodes. |
| aAdjacentNodeIndices | [output] The (0, 1, or 2) adjacent node indices in the route. |
Referenced by WsfRoute().
| void WsfRoute::GetAllNodes | ( | WaypointPtrVector & | aWaypointPtrVector | ) |
Loop through the waypoints and return a vector containing only those points whose intersection identifier is non-zero.
| aWaypointPtrVector | [output] A vector of waypoint pointers whose intersection identifier is non-zero. |
Referenced by WsfRoute().
| double WsfRoute::GetDistance | ( | int | aFromWaypointIndex, |
| int | aToWaypointIndex ) const |
Get the distance along the route between two waypoints.
| aFromWaypointIndex | The beginning waypoint index for which the distance is calculated. |
| aToWaypointIndex | The ending waypoint index for which the distance is calculated. |
References GetDistanceAlongRoute().
Referenced by XWsfOSM_Traffic::ChangeScriptedLane(), GetDistanceAlongRoute(), GetDistanceAlongRoute(), WsfFuel::GetQuantityRequired(), and WsfRoute().
| double WsfRoute::GetDistanceAlongRoute | ( | const double | aFromLL[2], |
| const double | aToLL[2] ) const |
Get the distance along the route between ANY two waypoints along the route.
| aFromLL | The beginning point for which the distance is calculated. |
| aToLL | The ending point for which the distance is calculated. |
References GetDistance(), IsBetweenWaypoints(), and waypointIndex.
Referenced by Append(), XWsfOSM_Traffic::ChangeScriptedLane(), GetDistance(), Insert(), Remove(), and WsfRoute().
| double WsfRoute::GetDistanceAlongRoute | ( | const double | aFromLL[2], |
| const double | aToLL[2], | ||
| double & | aOffsetDist ) const |
Get the distance along the route between ANY waypoint on the route and an arbitrary (lat, lon) along with the perpendicular offset distance of (lat, lon) to the route.
| aFromLL | The beginning point for which the distance is calculated. |
| aToLL | The ending point for which the distances are calculated. |
| aOffsetDist | [output] The perpendicular distance from the specified point to the point on the route. |
References GetDistance(), GetDistanceOffset(), IsBetweenWaypoints(), and waypointIndex.
| double WsfRoute::GetDistanceOffset | ( | const double | aFromLL[2], |
| const double | aToLL[2], | ||
| const double | aPointLL[2], | ||
| double & | aOffsetDist ) const |
Get the distance and offset along the route between two waypoints.
| aFromLL | The beginning point for which the distance is calculated. |
| aToLL | The ending point for which the distance is calculated. |
| aPointLL | The point for which the distances are calculated. |
| aOffsetDist | the dist (aLat, aLon) is off the route between the waypoints |
Referenced by GetDistanceAlongRoute(), and WsfRoute().
| bool WsfRoute::GetEndPointsAtDistance | ( | double | aDistance, |
| int & | aSegmentIndex ) const |
| aDistance | A distance along the route. |
| aSegmentIndex | Set to the index of the waypoint which comes before the specified distance. aSegmentIndex will never be the last waypoint. |
References WsfWaypoint::SetDistanceAlongRoute().
Referenced by PointAlongRoute(), and WsfRoute().
|
inline |
Get the network route Id associated with this route.
Referenced by XWsfOSM_Traffic::ChangeScriptedLane().
|
override |
|
inline |
Get the number of waypoints in the route.
Referenced by Append(), XWsfOSM_Traffic::ChangeScriptedLane(), WsfPathFinder::ComputeExtrapolate(), WsfNavigationMesh::ComputeSetRoute(), WsfPathFinder::ComputeSetRoute(), WsfP6DOF_Mover::ConvertWsfRouteToP6DofRoute(), wsf::six_dof::Mover::ConvertWsfRouteToSixDOF_Route(), WsfRoadMover::CreateRoute(), WsfRoadMover::CreateRoute(), WsfPathFinder::FindClosestPointInQuadrant(), WsfRouteNetwork::GeneratePathOffRouteToRoute(), WsfRouteNetwork::GetAdjacentNodeIndices(), WsfWaypointMover::GetFutureLocationWCS(), if(), if(), ProcessNavigationInput(), WsfNavigationMesh::RefineFromCurrentIndex(), WsfNavigationMesh::RefineFromCurrentPosition(), WsfRoadMover::SetOrUpdateRoute(), WsfRouteMover::SetRoutePoint(), WsfSA_Processor::UpdateNavData(), WsfRoadMover::UpdateRoute(), WsfRouteMover::UpdateRoute(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfDraw::VertexRoute().
|
inline |
Get the speed at the requested waypoint on a route
Referenced by GetTravelTime(), GetTravelTimeToPosition(), WsfNavigationMesh::RefineFromCurrentPosition(), and WsfRouteMover::Update().
| void WsfRoute::GetSubroute | ( | const WsfWaypoint & | aFromWaypoint, |
| const WsfWaypoint & | aToWaypoint, | ||
| WsfRoute & | aRoute ) const |
Given a 'start' waypoint and an 'end' waypoint, both of which are contained within the referenced route, return the sub-route that begins and ends with those waypoints.
| aFromWaypoint | The first waypoint in the sub-route. |
| aToWaypoint | The last waypoint in the sub-route. |
| aRoute | [output] The desired sub-route. |
References GetSubroute(), and WsfRoute().
Referenced by GetSubroute(), if(), UT_DEFINE_SCRIPT_METHOD(), and WsfRoute().
| void WsfRoute::GetSubroute | ( | int | aStartIndex, |
| int | aEndIndex, | ||
| WsfRoute & | aRoute ) const |
Given a 'start' route index and an 'end' route index, both of which represent waypoints that are contained within the referenced route, return the sub-route that begins and ends with those waypoints.
| aStartIndex | The first waypoint index in the sub-route. |
| aEndIndex | The last waypoint index in the sub-route. |
| aRoute | [output] The desired sub-route. |
References AppendSubroute(), Clear(), and WsfRoute().
|
inline |
Get the total distance along all waypoints in the route.
| double WsfRoute::GetTravelTime | ( | ) | const |
Get the time to travel the route given the speed of each segment.
References WsfPath::cDOUBLE_NOT_SET, and GetSpeed().
Referenced by WsfRoadMover::CreateRoute(), WsfFuel::FuelSecondsRemaining(), and WsfRoadMover::GetTravelTime().
| double WsfRoute::GetTravelTimeToPosition | ( | const double | aPosition[2] | ) | const |
References WsfPath::cDOUBLE_NOT_SET, and GetSpeed().
| WsfWaypoint & WsfRoute::GetWaypointAt | ( | size_t | aIndex | ) |
Return a reference to the waypoint in the route specified by the given index.
| aIndex | The waypoint number to be referenced. |
Referenced by WsfRouteNetwork::Append(), XWsfOSM_Traffic::ChangeScriptedLane(), wsf::six_dof::GuidanceComputer::CheckForWaypointChange(), WsfGuidanceComputer::CheckForWaypointChange(), WsfPathFinder::ComputeExtrapolate(), WsfNavigationMesh::ComputeSetRoute(), WsfPathFinder::ComputeSetRoute(), WsfP6DOF_Mover::ConvertWsfRouteToP6DofRoute(), wsf::six_dof::Mover::ConvertWsfRouteToSixDOF_Route(), WsfPathFinder::FindClosestPointInQuadrant(), WsfRouteNetwork::FindClosestSegment(), WsfRouteNetwork::GetAdjacentNodeIndices(), WsfWaypointMover::GetFutureLocationWCS(), if(), if(), operator[](), operator[](), ProcessNavigationInput(), WsfNavigationMesh::RefineFromCurrentIndex(), WsfNavigationMesh::RefineFromCurrentPosition(), WsfPathFinder::ReturnToRoute(), WsfRoadMover::SetOrUpdateRoute(), wsf::six_dof::GuidanceComputer::UpdateAimpoint(), WsfGuidanceComputer::UpdateAimpoint(), WsfP6DOF_GuidanceComputer::UpdateAimpoint(), WsfRoadMover::UpdateRoute(), and UT_DEFINE_SCRIPT_METHOD().
| const WsfWaypoint & WsfRoute::GetWaypointAt | ( | size_t | aIndex | ) | const |
Return a reference to the waypoint in the route specified by the given index.
| aIndex | The waypoint number to be referenced. |
| unsigned int WsfRoute::GetWaypointIndexAt | ( | WsfStringId | aLabelId | ) | const |
Return a index to the waypoint in the route specified by the given label.
| aLabelId | The waypoint label. |
Referenced by WsfWaypointMover::GetFutureLocationWCS().
|
inline |
Returns the reference count for waypoints owned by this route. If the route is resized, waypoint references are invalidated. This allows scripts to access waypoint references safely.
|
inline |
Gets the vector of the actual waypoints
Referenced by WsfRouteNetwork::Append(), WsfFuel::GetQuantityRequired(), and WsfSA_Processor::UpdateNavData().
|
virtual |
Perform initialization of the route.
References WsfObject::GetNameId(), ok, and SetNetworkRouteId().
Referenced by WsfRoute().
| void WsfRoute::Insert | ( | int | aIndex, |
| const WsfWaypoint & | aWaypoint ) |
References Insert().
| void WsfRoute::Insert | ( | WayptVecIter | aIter, |
| const WsfWaypoint & | aWaypoint ) |
References Append(), GetDistanceAlongRoute(), WsfWaypoint::GetDistanceAlongRoute(), WsfWaypoint::GetLat(), WsfWaypoint::GetLon(), WsfWaypoint::SetDistanceAlongRoute(), WsfWaypoint::SetPositionInRoute(), and WsfWaypoint::SetRouteId().
Referenced by engage::TargetConfig::CreatePlatform(), WsfRoadMover::CreateRoute(), Insert(), UT_DEFINE_SCRIPT_METHOD(), and WsfRoute().
| int WsfRoute::Intersect | ( | WsfRoute & | aOtherRoute, |
| std::vector< RouteIntersection > & | aIntersections ) |
Returns a list of intersections between two routes. Assumes that both routes contain only latitude-longitude waypoints.
References WsfRoute::RouteIntersection::mPoint, WsfRoute::RouteIntersection::mWaypointIndex1, WsfRoute::RouteIntersection::mWaypointIndex2, std::swap(), and WsfRoute().
Referenced by UT_DEFINE_SCRIPT_METHOD(), and WsfRoute().
| bool WsfRoute::IsBetweenWaypoints | ( | const double | aPointLL[2], |
| const unsigned int | aFirstWaypointIndex, | ||
| const unsigned int | aSecondWaypointIndex, | ||
| const double | aTolerancePercentage = 0.01 ) const |
Determine if a waypoint is between two other waypoints.
| aPointLL | The point of interest along the route. |
| aFirstWaypointIndex | The first route waypoint index. |
| aSecondWaypointIndex | The second route waypoint index. |
| aTolerancePercentage | The percentage of firstSecondDistance that aPointLL can be off the path and still be considered to be "between" |
Referenced by GetDistanceAlongRoute(), GetDistanceAlongRoute(), ProjectOntoRoute(), and WsfRoute().
| bool WsfRoute::IsGlobalRoute | ( | ) | const |
References WsfObject::GetName().
Referenced by ProcessNavigationInput().
Set one route equal to another.
| aRhs | The route to which the left-hand-side route is equated. |
References WsfAuxDataEnabled::operator=(), WsfObject::operator=(), and WsfRoute().
| WsfWaypoint & WsfRoute::operator[] | ( | size_t | aIndex | ) |
Return a reference to the waypoint in the route specified by the given index.
| aIndex | The waypoint number to be referenced. |
References GetWaypointAt().
Referenced by WsfRoute().
| const WsfWaypoint & WsfRoute::operator[] | ( | size_t | aIndex | ) | const |
Return a reference to the waypoint in the route specified by the given index.
| aIndex | The waypoint number to be referenced. |
References GetWaypointAt().
| bool WsfRoute::PointAlongRoute | ( | double | aDistanceFromStart, |
| double | aPointAlongRoute[2], | ||
| int & | aSegmentIndex ) |
Computes a location along a route given a distance from the start of the route.
| aDistanceFromStart | The distance from the start of the route |
| aPointAlongRoute | Set to the point on the route at the specified distance from start. |
| aSegmentIndex | Set to the segment index at which the point occurs |
References d2, WsfWaypoint::GetDistanceAlongRoute(), GetEndPointsAtDistance(), WsfWaypoint::GetLat(), and WsfWaypoint::GetLon().
Referenced by WsfRoute().
| void WsfRoute::Print | ( | ut::log::MessageStream & | aStream | ) | const |
Adds details to the notes of aStream.
Used to print out a route for debugging purposes.
References WsfObject::GetName().
Referenced by UT_DEFINE_SCRIPT_METHOD().
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References WsfAuxDataEnabled::ProcessInput(), and ProcessNavigationInput().
Referenced by ProcessInputBlock().
|
static |
References ProcessInput(), WsfObject::SetName(), and WsfRoute().
Referenced by WsfRouteTypes::LoadInstance().
| bool WsfRoute::ProcessNavigationInput | ( | UtInput & | aInput | ) |
References Append(), WsfWaypoint::cABSOLUTE_HEADING, WsfWaypoint::cLATITUDE_AND_LONGITUDE, WsfWaypoint::cRELATIVE_HEADING, WsfWaypoint::cRELATIVE_OFFSET, WsfScenario::FindType(), WsfScenario::FromInput(), WsfScenario::GetDeferredInput(), WsfWaypoint::GetHeading(), WsfWaypoint::GetLat(), WsfWaypoint::GetLon(), WsfObject::GetNameId(), WsfWaypoint::GetPointType(), GetSize(), GetWaypointAt(), WsfWaypoint::GreatCircleHeadingAndDistance(), IsGlobalRoute(), ProcessWaypoint(), WsfDeferredInput::Requires(), WsfWaypoint::SetHeading(), WsfWaypoint::SetLat(), WsfWaypoint::SetLon(), WsfObject::SetName(), WsfWaypoint::SetPointType(), success, Transform(), TransformNED(), and WsfRoute().
Referenced by ProcessInput().
| void WsfRoute::ProcessWaypoint | ( | UtInput & | aInput, |
| WsfWaypoint & | aWaypoint ) |
|
static |
Projects the given point onto the provided segment.
| aPointLL | The point to project. |
| aSegmentStartLL | The segment start point |
| aSegmentEndLL | The segment end point |
| aProjectedLL | Set to the location of the point projected onto the segment |
Referenced by ProjectOntoRoute(), ProjectOntoRoute(), ProjectOntoRouteGivenClosestWaypoint(), and WsfRoute().
| bool WsfRoute::ProjectOntoRoute | ( | const double | aPointLL[2], |
| double & | aDistanceFromRoute, | ||
| double & | aDistanceAlongRoute ) const |
Projects a point onto the closest segment in the route.
| aPointLL | The point to project Latitude/Longitude |
| aDistanceFromRoute | Set to the distance the given point is from the projected point. |
| aDistanceAlongRoute | Set to the distance along the route at which the point projected point occurs returns True if successful |
References ProjectOntoRoute().
| bool WsfRoute::ProjectOntoRoute | ( | const double | aPointLL[2], |
| int & | aSegmentIndex, | ||
| double | aProjectedLL[2], | ||
| double & | aDistance ) const |
Projects the given point onto the closest segment in the route.
| aPointLL | The point to project. |
| aSegmentIndex | Set to the segment index used to project |
| aProjectedLL | Set to the location of the point projected onto the segment |
| aDistance | Set to the distance from the segment |
References end(), WsfWaypoint::GetLat(), WsfWaypoint::GetLon(), IsBetweenWaypoints(), and ProjectOntoRoute().
| int WsfRoute::ProjectOntoRouteFast | ( | const double | aPointLL[2], |
| double & | aDistanceFromRoute, | ||
| double & | aDistanceAlongRoute ) const |
Projects a point onto the closest segment in the route.
| aPointLL | The point to project Latitude/Longitude |
| aDistanceFromRoute | Set to the distance the given point is from the projected point. |
| aDistanceAlongRoute | Set to the distance along the route at which the point projected point occurs returns Index of closest segment, or -1 if failure |
References WsfWaypoint::GetDistanceAlongRoute(), WsfWaypoint::GetLat(), and WsfWaypoint::GetLon().
Referenced by WsfRoute().
| bool WsfRoute::ProjectOntoRouteGivenClosestWaypoint | ( | double | aLat, |
| double | aLon, | ||
| int | aClosestWaypointIndex, | ||
| int & | aSegmentIndex, | ||
| double | aProjectedLL[2] ) |
Projects the given latitude/longitude onto a segment where the provided closest waypoint is one of the endpoints of the segment.
| aLat | The latitude to project. |
| aLon | The longitude to project. |
| aClosestWaypointIndex | The closest waypoint to the provided latitude/longitude. |
| aSegmentIndex | The index of the waypoint at segment start |
| aProjectedLL | Set to the projected point. |
References WsfWaypoint::GetLat(), WsfWaypoint::GetLon(), and ProjectOntoRoute().
Referenced by WsfRoute().
| void WsfRoute::Remove | ( | unsigned int | aWaypointIndex | ) |
References GetDistanceAlongRoute().
Referenced by WsfRoute().
| UtScriptRef * WsfRoute::ScriptRef | ( | ) |
Return a script reference to this route, managed by the application.
References gRouteClassPtr.
Referenced by ConstScriptRef().
| UtScriptRef * WsfRoute::ScriptRefManage | ( | ) |
Return a script reference to this route, managed by the scripting language.
References gRouteClassPtr.
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(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
For XIO (de)serialization.
References WsfObject::Serialize().
| void WsfRoute::SetNetworkRouteId | ( | unsigned int | aRouteId | ) |
Assign a route with a particular route Id.
| aRouteId | The route id to associate with the route. |
Referenced by Initialize().
| void WsfRoute::SetSpeed | ( | double | aSpeed | ) |
Set the speed of all waypoints in the route
| aSpeed | The speed to which all waypoints in the route will be set. |
Referenced by WsfNavigationMesh::ComputeSetRoute(), WsfPathFinder::ComputeSetRoute(), WsfRoadMover::CreateRoute(), WsfRouteMover::FindAndSetPath(), WsfNavigationMesh::RefineFromCurrentPosition(), and WsfRouteMover::Update().
|
inline |
| void WsfRoute::Transform | ( | double | aRefLat, |
| double | aRefLon, | ||
| double | aHeading ) |
Transform a relative route to an absolute route by applying a rotation and a translation. This method is useful for transforming a pattern constructed of relative positions into an absolute route that can be used by a mover. rotation and a translation. Waypoints of type cRELATIVE_OFFSET are rotated and translated to become points of cLATITUDE_AND_LONGITUDE.
| aRefLat | The latitude coordinate (degrees) of the local coordinate system's origin. |
| aRefLon | The longitude coordinate (degrees) of the local coordinate system's origin. |
| aHeading | The heading (degrees) of the X axis from north. |
References WsfWaypoint::cLATITUDE_AND_LONGITUDE, WsfWaypoint::cLOCATION_MASK, and WsfWaypoint::cRELATIVE_OFFSET.
Referenced by ProcessNavigationInput(), and WsfRoute().
| void WsfRoute::TransformNED | ( | double | aNorth, |
| double | aEast, | ||
| double | aDown ) |
Transform an absolute route by a given offset. Only waypoints of type cLATITUDE_AND_LONGITUDE are translated.
| aNorth | The distance the waypoint will be translated in the north direction (meters). |
| aEast | The distance the waypoint will be translated in the east direction (meters). |
| aDown | The distance the waypoint will be translated in the down direction (meters). |
References WsfWaypoint::cLATITUDE_AND_LONGITUDE.
Referenced by ProcessNavigationInput(), and WsfRoute().
|
staticconstexpr |