Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
MSPModel_Striping::Obstacle Struct Reference

information regarding surround Pedestrians (and potentially other things) More...

#include <MSPModel_Striping.h>

Collaboration diagram for MSPModel_Striping::Obstacle:
[legend]

Public Member Functions

bool closer (const Obstacle &o, int dir)
 
 Obstacle (const PState &ped)
 create an obstacle from ped for ego moving in dir
 
 Obstacle (double _x, double _speed, ObstacleType _type, const std::string &_description, const double width=0., const SUMOVehicle *veh=nullptr)
 create an obstacle from explicit values
 
 Obstacle (int dir, double dist=DIST_FAR_AWAY)
 create No-Obstacle
 

Data Fields

std::string description
 the id / description of the obstacle
 
double speed
 speed relative to lane direction (positive means in the same direction)
 
ObstacleType type
 whether this obstacle denotes a border, a vehicle or a pedestrian
 
const SUMOVehiclevehicle = nullptr
 a pointer to the vehicle if this obstacle is one
 
double xBack
 maximal position on the current lane in backward direction
 
double xFwd
 maximal position on the current lane in forward direction
 

Detailed Description

information regarding surround Pedestrians (and potentially other things)

Definition at line 213 of file MSPModel_Striping.h.

Constructor & Destructor Documentation

◆ Obstacle() [1/3]

MSPModel_Striping::Obstacle::Obstacle ( int  dir,
double  dist = DIST_FAR_AWAY 
)

create No-Obstacle

Definition at line 1461 of file MSPModel_Striping.cpp.

◆ Obstacle() [2/3]

MSPModel_Striping::Obstacle::Obstacle ( const PState ped)

create an obstacle from ped for ego moving in dir

Definition at line 1470 of file MSPModel_Striping.cpp.

References MSPModel_InteractingState::isWaitingToEnter(), MSPModel_Striping::OBSTACLE_VEHICLE, type, and vehicle.

◆ Obstacle() [3/3]

MSPModel_Striping::Obstacle::Obstacle ( double  _x,
double  _speed,
ObstacleType  _type,
const std::string &  _description,
const double  width = 0.,
const SUMOVehicle veh = nullptr 
)
inline

create an obstacle from explicit values

Definition at line 219 of file MSPModel_Striping.h.

Member Function Documentation

◆ closer()

bool MSPModel_Striping::Obstacle::closer ( const Obstacle o,
int  dir 
)

Definition at line 1484 of file MSPModel_Striping.cpp.

References MSPModel::FORWARD, xBack, and xFwd.

Referenced by MSPModel_Striping::moveInDirectionOnLane().

Here is the caller graph for this function:

Field Documentation

◆ description

std::string MSPModel_Striping::Obstacle::description

the id / description of the obstacle

Definition at line 231 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::PState::distanceTo(), and MSPModel_Striping::PState::walk().

◆ speed

double MSPModel_Striping::Obstacle::speed

speed relative to lane direction (positive means in the same direction)

Definition at line 227 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::getNextLaneObstacles(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::walk().

◆ type

ObstacleType MSPModel_Striping::Obstacle::type

whether this obstacle denotes a border, a vehicle or a pedestrian

Definition at line 229 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::addCrossingVehs(), MSPModel_Striping::PState::distanceTo(), and Obstacle().

◆ vehicle

const SUMOVehicle* MSPModel_Striping::Obstacle::vehicle = nullptr

a pointer to the vehicle if this obstacle is one

Definition at line 233 of file MSPModel_Striping.h.

Referenced by Obstacle().

◆ xBack

double MSPModel_Striping::Obstacle::xBack

maximal position on the current lane in backward direction

Definition at line 225 of file MSPModel_Striping.h.

Referenced by MSPModel_Striping::addCrossingVehs(), closer(), MSPModel_Striping::PState::distanceTo(), and MSPModel_Striping::PState::walk().

◆ xFwd

double MSPModel_Striping::Obstacle::xFwd

The documentation for this struct was generated from the following files: