|
| dclspc void | PutOn (std::shared_ptr< const Track > pTrack, const TrackLocation &tl) |
| | Attaches this Location onto the specified track.
|
|
dclspc void | PutOff () noexcept |
| | Removes the Location from its position on the track.
|
| dclspc bool | IsOnTrack () const noexcept |
| dclspc std::shared_ptr< const Track > | GetTrack () const noexcept |
| | Gets the track this Location is on.
|
| dclspc Length | Param () const noexcept |
| dclspc Orientation | Orient () const noexcept |
| dclspc AnglePerLength | Curvature () const |
| dclspc AnglePerLength | Torsion () const |
| dclspc void | TNBFrame (spat::Frame< Length, One > &frame) const |
| | Receives the TNB - Frame of the curve at the location.
|
|
dclspc void | Get (TrackLocation &tl) const noexcept |
| | Gets the TrackLocation - data of this track location.
|
|
dclspc void | Get (TrackLocationRef &tlr) const noexcept |
| | Gets the TrackLocationRef - data of this track location.
|
| dclspc std::shared_ptr< Track > | GetMutableTrack () const noexcept |
| | Gets mutable track access.
|
| dclspc | Location () noexcept=default |
| | Construction.
|
| dclspc | Location (const Location &location) noexcept=default |
| | Construction.
|
| dclspc | Location (Location &&location) noexcept=default |
| | Construction.
|
| dclspc | Location (std::shared_ptr< const Track > pTrack, const TrackLocation &tl) |
| | Construction.
|
| dclspc | Location (const Track &track, const TrackLocation &tl) |
| | Construction.
|
|
dclspc Location & | operator= (const Location &location) noexcept=default |
| | Assignment.
|
|
dclspc Location & | operator= (Location &&location) noexcept=default |
| | Assignment.
|
Copys the 3D position and orientation of this Location.
Coordinates are calculated in the global frame. - Parameters
-
| pos | Reference to a Position to receive the 3d location. |
| tan | Reference to a Vector to receive the 3D tangential vector. |
| bundle | Reference to a VectorBundle to receive the full 3D position and tangential vector. |
| frame | Reference to a Frame to receive the full 3d location and orientation. |
| td | Reference to a track data struct. Receives the data in engine units. Used by trackjoints and trackfeeders internally. |
- Exceptions
-
| std::logic_error | if the location is not on track. |
| std::exception | if the transition could not get performed. |
|
|
dclspc void | Transition (spat::Position< Length > &pos) const |
|
dclspc void | Transition (spat::Vector< One > &tan) const |
|
dclspc void | Transition (spat::VectorBundle< Length, One > &bundle) const |
|
dclspc void | Transition (spat::VectorBundle2< Length, One > &bundle) const |
|
dclspc void | Transition (spat::Frame< Length, One > &frame) const |
|
dclspc void | Transition (TrackData< Real > &td, Real engine_meters_per_unit) const |
Moves this Location by dParam along the tracks with respect to actual switch settings.
Optionally the function receives signals and triggers sensors. If a dead end of a track (uncoupled track end) is reached that end's position will be the resulting location. All sensors in the valid range get triggered for the given Event and all signals be dispatched to the SignalTarget.
- Parameters
-
| dParam | Incremental value to move the location in the direction of the track (not the locations positive orientation). Be aware that huge values in combination with cyclic track systems might result in long execution times of this function. |
| principalDirection | Specifies the direction of movement relative to the Location's orientation. This is used to receive signals and might differ from the sign of ds. For one, ds might be zero, for second it might happen that an actual movement is oriented against the principal direction. |
| pEvent | Trigger sensors and dispatch Event. |
| pSignalTarget | Receive signals. |
- Returns
- 0m if the movement could get accomplished. If a dead end was encountered during movement the leftover parameter value is returned. I.e.: if the dead end would be connected a new move operation with that very value would lead to the correct position. The bool flag indicates wether one or more track transitions have been performed during the operation.
- Exceptions
-
| std::exception | if the move could not get performed. |
|
|
dclspc std::pair< Length, bool > | Move (Length dParam) |
|
dclspc std::pair< Length, bool > | Move (Length dParam, const Event *pEvent) |
|
dclspc std::pair< Length, bool > | Move (Length dParam, Orientation principalDirection, SignalTarget *pSignalTarget) |
|
dclspc std::pair< Length, bool > | Move (Length dParam, Orientation principalDirection, const Event *pEvent, SignalTarget *pSignalTarget) |
Moves this Location to the specified end of the track without transitioning to the next.
- Parameters
-
| direction | para moves to the tracks end in Track's direction, anti against it. |
| pEvent | Trigger sensors and dispatch Event. |
| pSignalTarget | Receive signals. |
- Returns
- The parameter length the location moved.
- Exceptions
-
| std::exception | if the move could not get performed. |
|
| dclspc Length | MoveToEnd (Orientation direction=Orientation::Value::para, const Event *pEvent=nullptr, SignalTarget *pSignalTarget=nullptr) |
| | Moves the location to the track's end and transitions it to the coupled track's end if any.
|
| dclspc std::pair< Length, bool > | MoveTransit (Orientation direction=Orientation::Value::para, const Event *pEvent=nullptr, SignalTarget *pSignalTarget=nullptr) |
| | Moves the location to the track's end and transitions it to the coupled track's end if any.
|
|
dclspc Location & | Flip () noexcept |
| | Turns the direction of this location to the other side.
|
| dclspc bool | Equals (const Location &loc, Length epsilon) const noexcept |
| | Compares two Locations.
|
| dclspc Length | Distance (const Location &loc, Length maxdistance) const |
| | Gets the parameter distance between two locations.
|
|
| dclspc void | Reserve (common::Interval< Length > range, IDType forID) |
| | Reserves a range on the track relative to this Location.
|
| dclspc void | DeleteReservation (IDType forID=anyID) |
| | Deletes a reservation.
|
| dclspc std::vector< Track::Overlap > | Overlaps (IDType forID) const |
| | Finds overlapping areas for reservations.
|
A Location specifies a position on a track system by referencing a track and a TrackLocation on it.
It provides member functions for moving along a track, triggering Sensors and receiving Signals that are attached along the tracks. Use it to get information such as 3D position about a location on a track system.