|
ORTS
|
A pair of locations, representing boundaries etc. More...
#include <TerrainBase.H>
Public Member Functions | |
| Segment (sint4 x1=0, sint4 y1=0, sint4 x2=0, sint4 y2=0) | |
| Segment (const Loc &l1_, const Loc &l2_) | |
| sint4 | is_left_turn (const Loc &l3) const |
| positive if l3 is on the left of the line from l1 to l2; negative if l3 is on the right; 0 if l3 is on the line containing the segment. | |
| bool | touches (const Segment &o) const |
| true if the segments weakly intersect | |
| bool | intersects (const Segment &o) const |
| true if the segments strictly intersect | |
Public Attributes | |
| Loc | l1 |
| Loc | l2 |
A pair of locations, representing boundaries etc.
Definition at line 64 of file TerrainBase.H.
Definition at line 68 of file TerrainBase.H.
Definition at line 69 of file TerrainBase.H.
| bool TerrainBase::Segment::intersects | ( | const Segment & | o | ) | const [inline] |
true if the segments strictly intersect
Definition at line 84 of file TerrainBase.H.
References is_left_turn(), l1, and l2.
positive if l3 is on the left of the line from l1 to l2; negative if l3 is on the right; 0 if l3 is on the line containing the segment.
Adapted for the reversed y-axis used by ORTS.
Definition at line 75 of file TerrainBase.H.
References l1, l2, TerrainBase::Loc::x, and TerrainBase::Loc::y.
Referenced by intersects(), and touches().
| bool TerrainBase::Segment::touches | ( | const Segment & | o | ) | const [inline] |
true if the segments weakly intersect
Definition at line 78 of file TerrainBase.H.
References is_left_turn(), l1, and l2.
Referenced by TRTerrain::UnitPath::is_intersect(), SimpleTerrain::UnitPath::is_intersect(), and SimplePathfinder::is_intersect().
Definition at line 66 of file TerrainBase.H.
Referenced by VecField::PolygonEmitter::closest_point_on_seg(), SimpleTerrain::ST_ForceField::get_forcefield_target(), FFLocPath::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_line_repulsion(), FFLocPath::get_line_repulsion(), SimpleTerrain::ST_ForceField::get_push_target(), FFLocPath::get_push_target(), SimpleTerrain::ST_Terrain::PFEngine::Map::insert_boundary(), SimpleTerrain::SimpleGlobalPF::Map::insert_boundary(), PR_Terrain::PRAEngine::insert_boundary(), intersects(), is_left_turn(), operator<<(), and touches().
Definition at line 66 of file TerrainBase.H.
Referenced by VecField::PolygonEmitter::closest_point_on_seg(), SimpleTerrain::ST_ForceField::get_forcefield_target(), FFLocPath::get_forcefield_target(), SimpleTerrain::ST_ForceField::get_line_repulsion(), FFLocPath::get_line_repulsion(), SimpleTerrain::ST_ForceField::get_push_target(), FFLocPath::get_push_target(), SimpleTerrain::ST_Terrain::PFEngine::Map::insert_boundary(), SimpleTerrain::SimpleGlobalPF::Map::insert_boundary(), PR_Terrain::PRAEngine::insert_boundary(), intersects(), is_left_turn(), operator<<(), and touches().