// Helper function to undo the turning of the vehicle to calculate a relative position of the passenger when boarding void VehicleInfo::CalculateBoardingPositionOf(float gx, float gy, float gz, float go, float& lx, float& ly, float& lz, float& lo) const { NormalizeRotatedPosition(gx - m_owner->GetPositionX(), gy - m_owner->GetPositionY(), lx, ly); lz = gz - m_owner->GetPositionZ(); lo = NormalizeOrientation(go - m_owner->GetOrientation()); }
// Helper function to undo the turning of the vehicle to calculate a relative position of the passenger when boarding void VehicleKit::CalculateBoardingPositionOf(float gx, float gy, float gz, float go, float &lx, float &ly, float &lz, float &lo) { NormalizeRotatedPosition(gx - GetBase()->GetPositionX(), gy - GetBase()->GetPositionY(), lx, ly); lz = gz - GetBase()->GetPositionZ(); lo = MapManager::NormalizeOrientation(go - GetBase()->GetOrientation()); }
// Helper function to undo the turning of the vehicle to calculate a relative position of the passenger when boarding Position VehicleKit::CalculateBoardingPositionOf(Position const& pos) const { Position posl = pos; NormalizeRotatedPosition(pos.x - GetBase()->GetPositionX(), pos.y - GetBase()->GetPositionY(), posl.x, posl.y); posl.z = pos.z - GetBase()->GetPositionZ(); posl.o = MapManager::NormalizeOrientation(pos.o - GetBase()->GetOrientation()); return posl; }
// Helper function to undo the turning of the vehicle to calculate a relative position of the passenger when boarding Position TransportKit::CalculateBoardingPositionOf(Position const& pos) const { Position l(pos); NormalizeRotatedPosition(pos.x - GetBase()->GetPositionX(), pos.y - GetBase()->GetPositionY(), l.x, l.y); l.z = pos.z - GetBase()->GetPositionZ(); l.o = MapManager::NormalizeOrientation(pos.o - GetBase()->GetOrientation()); return l; }