52 bool secondaryShape =
false,
double exaggeration = 1.0,
int vehicleQuality = 3)
55 computeTrainDimensions(exaggeration, secondaryShape, scaledLength < 0 ? myTrain->getLength() : scaledLength, vehicleQuality);
114 static double getUpscaleLength(
double upscale,
double length,
double width,
int vehicleQuality);
120 void computeTrainDimensions(
double exaggeration,
bool secondaryShape,
double scaledLength,
int vehicleQuality);
A class that helps computing positions of a train's carriages and additional structures.
int getFirstCarriageNo() const
double myFirstCarriageLength
void computeTrainDimensions(double exaggeration, bool secondaryShape, double scaledLength, int vehicleQuality)
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
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
int myFirstPassengerCarriage
int getNumCarriages() const
double getUpscaleLength() const
int getCarriageDoors() const
int getFirstPassengerCarriage() const
MSTrainHelper(const MSVehicle *vehicle, double scaledLength=-1, bool reversed=false, bool secondaryShape=false, double exaggeration=1.0, int vehicleQuality=3)
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