25 #ifndef PEGASUS_NEIGHBORHOOD_MARS_SPACECHASE3D_H 26 #define PEGASUS_NEIGHBORHOOD_MARS_SPACECHASE3D_H 28 #include "pegasus/neighborhood/mars/constants.h" 35 static const float kTangentFOV = 1.0;
38 #define convertSpaceXToScreenH(x, z) \ 39 ((x) / (z) * (kScreenWidth / (2 * kTangentFOV)) + kShuttleWindowMidH) 41 #define convertSpaceYToScreenV(y, z) \ 42 (kShuttleWindowMidV - (y) / (z) * (kScreenWidth / (2 * kTangentFOV))) 44 #define convertScreenHToSpaceX(x, d) \ 45 (((2.0F * kTangentFOV) / kScreenWidth) * ((float)(x) - kShuttleWindowMidH) * (d)) 47 #define convertScreenVToSpaceY(y, d) \ 48 (((2.0F * kTangentFOV) / kScreenWidth) * ((float)kShuttleWindowMidV - (y)) * (d)) 54 Point3D(
float x1,
float y1,
float z1) : x(x1), y(y1), z(z1) {}
55 bool operator==(
const Point3D &p)
const {
return x == p.x && y == p.y && z == p.z; }
56 bool operator!=(
const Point3D &p)
const {
return x != p.x || y != p.y || z != p.z; }
58 void translate(
float dx,
float dy,
float dz) {
65 static const int kScreenWidth = kShuttleWindowWidth;
67 bool isNegative(
int a);
68 bool isPositive(
int a);
70 bool sameSign(
int a,
int b);
76 void linearInterp(
const Point3D &pt1,
const float x2,
const float y2,
const float z2,
const float t,
Point3D &pt3);
77 void linearInterp(
const float x1,
const float y1,
const float z1,
const Point3D &pt2,
const float t,
Point3D &pt3);
78 void linearInterp(
const float x1,
const float y1,
const float z1,
const float x2,
79 const float y2,
const float z2,
const float t,
Point3D &pt3);
84 void linearInterp(
const float h1,
const float v1,
const float h2,
const float v2,
const float t,
Common::Point &pt3);
86 float linearInterp(
const float arg1,
const float arg2,
const float t);
Definition: spacechase3d.h:50
Definition: ai_action.h:33