#include "VehicleDefines.h"
|
virtual void | CalculatePassengerPosition (float &x, float &y, float &z, float *o=nullptr) const =0 |
| This method transforms supplied transport offsets into global coordinates. More...
|
|
virtual void | CalculatePassengerOffset (float &x, float &y, float &z, float *o=nullptr) const =0 |
| This method transforms supplied global coordinates into local offsets. More...
|
|
|
static void | CalculatePassengerPosition (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO) |
|
static void | CalculatePassengerOffset (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO) |
|
◆ TransportBase()
TransportBase::TransportBase |
( |
| ) |
|
|
protecteddefault |
◆ ~TransportBase()
virtual TransportBase::~TransportBase |
( |
| ) |
|
|
protectedvirtualdefault |
◆ CalculatePassengerOffset() [1/2]
static void TransportBase::CalculatePassengerOffset |
( |
float & |
x, |
|
|
float & |
y, |
|
|
float & |
z, |
|
|
float * |
o, |
|
|
float |
transX, |
|
|
float |
transY, |
|
|
float |
transZ, |
|
|
float |
transO |
|
) |
| |
|
inlinestaticprotected |
131 {
132 if (o)
134
135 z -= transZ;
136 y -= transY;
137 x -= transX;
138 float inx = x, iny = y;
139 y = (iny - inx * std::tan(transO)) / (std::cos(transO) + std::sin(transO) * std::tan(transO));
140 x = (inx + iny * std::tan(transO)) / (std::cos(transO) + std::sin(transO) * std::tan(transO));
141 }
static float NormalizeOrientation(float o)
Definition: Position.h:233
References Position::NormalizeOrientation().
◆ CalculatePassengerOffset() [2/2]
virtual void TransportBase::CalculatePassengerOffset |
( |
float & |
x, |
|
|
float & |
y, |
|
|
float & |
z, |
|
|
float * |
o = nullptr |
|
) |
| const |
|
pure virtual |
◆ CalculatePassengerPosition() [1/2]
static void TransportBase::CalculatePassengerPosition |
( |
float & |
x, |
|
|
float & |
y, |
|
|
float & |
z, |
|
|
float * |
o, |
|
|
float |
transX, |
|
|
float |
transY, |
|
|
float |
transZ, |
|
|
float |
transO |
|
) |
| |
|
inlinestaticprotected |
120 {
121 float inx = x, iny = y, inz = z;
122 if (o)
124
125 x = transX + inx * std::cos(transO) - iny * std::sin(transO);
126 y = transY + iny * std::cos(transO) + inx * std::sin(transO);
127 z = transZ + inz;
128 }
References Position::NormalizeOrientation().
◆ CalculatePassengerPosition() [2/2]
virtual void TransportBase::CalculatePassengerPosition |
( |
float & |
x, |
|
|
float & |
y, |
|
|
float & |
z, |
|
|
float * |
o = nullptr |
|
) |
| const |
|
pure virtual |