51 MSTrainHelper(
const MSVehicle* vehicle,
bool reversed =
false,
bool secondaryShape =
false,
double exaggeration = 1.0,
int vehicleQuality = 3)
112 static double getUpscaleLength(
double upscale,
double length,
double width,
int vehicleQuality);
A class that helps computing positions of a train's carriages and additional structures.
void computeTrainDimensions(double exaggeration, int vehicleQuality)
int getFirstCarriageNo() const
double myFirstCarriageLength
const MSVehicle * myTrain
double getFirstCarriageLength() const
static const double PEDESTRIAN_RADIUS_EXTRA_TOLERANCE
small extra tolerance used to avoid constraint violations
std::vector< Carriage * > myCarriages
MSTrainHelper(const MSVehicle *vehicle, bool reversed=false, bool secondaryShape=false, double exaggeration=1.0, int vehicleQuality=3)
void computeDoorPositions()
compute door positions on demand and fills the carriage structures
double myLocomotiveLength
const std::vector< Carriage * > & getCarriages() const
double myCarriageLengthWithGap
double getCarriageLength() const
void computeUnboardingPositions(double passengerRadius, std::vector< Position > &unboardingPositions)
compute unboarding positions on demand and fills the carriage structures
static const double CARRIAGE_DOOR_WIDTH
average door width used to compute doors positions
int myFirstPassengerCarriage
int getNumCarriages() const
double getUpscaleLength() const
int getCarriageDoors() const
int getFirstPassengerCarriage() const
double getHalfWidth() const
void computeCarriages(bool reversed, bool secondaryShape)
Representation of a vehicle in the micro simulation.
A point in 2D or 3D with translation and scaling methods.
std::vector< Position > unboardingPositions
std::vector< Position > doorPositions