#include <simgear/compiler.h>
#include <simgear/constants.h>
#include <simgear/math/SGMath.hxx>
+#include <simgear/math/SGGeometry.hxx>
class SGMaterial;
class GroundCacheFillVisitor;
struct Triangle {
Triangle() : material(0) {}
- // The edge vertices.
- SGVec3d vertices[3];
- // The surface normal.
- SGVec4d plane;
- // The bounding shpere.
- SGVec3d boundCenter;
- double boundRadius;
+ // The triangle we represent
+ SGTriangled triangle;
+ SGSphered sphere;
// The linear and angular velocity.
SGVec3d velocity;
SGVec3d rotation;
};
- // The center of the cache.
- SGVec3d cache_center;
// Approximate ground radius.
// In case the aircraft is too high above ground.
double ground_radius;
+ // Ground type
+ int _type;
+ // the simgear material reference, contains friction coeficients ...
+ const SGMaterial* _material;
// The time reference for later call to intersection test routines.
// Is required since we will have moving triangles in carriers.
double cache_ref_time;
const SGMaterial* material;
};
- static void velocityTransformTriangle(double dt, Triangle& dst,
- const Triangle& src);
+ static void velocityTransformTriangle(double dt, SGTriangled& dst,
+ SGSphered& sdst, const Triangle& src);
};
#endif