Fix Yasim ground interface recursion bug
The base (non-FlightGear) implementation of YASim ground getBody would always call itself. Fortunately we always replace it with the FG-specific subclass (FGGround).
This commit is contained in:
parent
7fe641f3b3
commit
7811b11565
3 changed files with 15 additions and 25 deletions
|
@ -18,26 +18,26 @@ public:
|
|||
FGGround(FGInterface *iface);
|
||||
virtual ~FGGround();
|
||||
|
||||
virtual void getGroundPlane(const double pos[3],
|
||||
void getGroundPlane(const double pos[3],
|
||||
double plane[4], float vel[3],
|
||||
unsigned int &body);
|
||||
unsigned int &body) override;
|
||||
|
||||
virtual void getGroundPlane(const double pos[3],
|
||||
void getGroundPlane(const double pos[3],
|
||||
double plane[4], float vel[3],
|
||||
const simgear::BVHMaterial **material,
|
||||
unsigned int &body);
|
||||
unsigned int &body) override;
|
||||
|
||||
virtual bool getBody(double t, double bodyToWorld[16], double linearVel[3],
|
||||
double angularVel[3], unsigned int &id);
|
||||
bool getBody(double t, double bodyToWorld[16], double linearVel[3],
|
||||
double angularVel[3], unsigned int &id) override;
|
||||
|
||||
virtual bool caughtWire(const double pos[4][3]);
|
||||
bool caughtWire(const double pos[4][3]) override;
|
||||
|
||||
virtual bool getWire(double end[2][3], float vel[2][3]);
|
||||
bool getWire(double end[2][3], float vel[2][3]) override;
|
||||
|
||||
virtual void releaseWire(void);
|
||||
void releaseWire(void) override;
|
||||
|
||||
virtual float getCatapult(const double pos[3],
|
||||
double end[2][3], float vel[2][3]);
|
||||
float getCatapult(const double pos[3],
|
||||
double end[2][3], float vel[2][3]) override;
|
||||
|
||||
void setTimeOffset(double toff);
|
||||
|
||||
|
|
|
@ -8,14 +8,6 @@
|
|||
#include "Ground.hpp"
|
||||
namespace yasim {
|
||||
|
||||
Ground::Ground()
|
||||
{
|
||||
}
|
||||
|
||||
Ground::~Ground()
|
||||
{
|
||||
}
|
||||
|
||||
void Ground::getGroundPlane(const double pos[3],
|
||||
double plane[4], float vel[3],
|
||||
unsigned int &body)
|
||||
|
@ -47,8 +39,7 @@ void Ground::getGroundPlane(const double pos[3],
|
|||
bool Ground::getBody(double t, double bodyToWorld[16], double linearVel[3],
|
||||
double angularVel[3], unsigned int &body)
|
||||
{
|
||||
return getBody(t, bodyToWorld, linearVel,
|
||||
angularVel, body);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Ground::caughtWire(const double pos[4][3])
|
||||
|
|
|
@ -8,8 +8,7 @@ namespace yasim {
|
|||
|
||||
class Ground {
|
||||
public:
|
||||
Ground();
|
||||
virtual ~Ground();
|
||||
virtual ~Ground() = default;
|
||||
|
||||
virtual void getGroundPlane(const double pos[3],
|
||||
double plane[4], float vel[3],
|
||||
|
@ -20,8 +19,8 @@ public:
|
|||
const simgear::BVHMaterial **material,
|
||||
unsigned int &body);
|
||||
|
||||
virtual bool getBody(double t, double bodyToWorld[16], double linearVel[3],
|
||||
double angularVel[3], unsigned int &id);
|
||||
virtual bool getBody(double t, double bodyToWorld[16], double linearVel[3],
|
||||
double angularVel[3], unsigned int &id);
|
||||
|
||||
virtual bool caughtWire(const double pos[4][3]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue