Point3D view_pos;
// cartesion coordinates of current lon/lat if at sea level
- // translated to scenery.center*/
+ // translated to scenery.center
Point3D cur_zero_elev;
// vector in cartesian coordinates from current position to the
// up vector for the view (usually point straight up through the
// top of the aircraft
MAT3vec view_up;
+ sgVec3 sgview_up;
// the vector pointing straight out the nose of the aircraft
MAT3vec view_forward;
// Transformation matrix for the view direction offset relative to
// the AIRCRAFT matrix
MAT3mat VIEW_OFFSET;
-
- // Transformation matrix for aircraft coordinates to world
- // coordinates
- MAT3mat WORLD;
-
- // Combined transformation from eye coordinates to world coordinates
- MAT3mat EYE_TO_WORLD;
-
- // Inverse of EYE_TO_WORLD which is a transformation from world
- // coordinates to eye coordinates
- MAT3mat WORLD_TO_EYE;
+ sgMat4 sgVIEW_OFFSET;
// Current model view matrix;
GLfloat MODEL_VIEW[16];
// Initialize a view class
void Init( void );
- // Basically, this is a modified version of the Mesa gluLookAt()
- // function that's been modified slightly so we can capture the
- // result (and use it later) otherwise this all gets calculated in
- // OpenGL land and we don't have access to the results.
- void LookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
- GLdouble centerx, GLdouble centery, GLdouble centerz,
- GLdouble upx, GLdouble upy, GLdouble upz );
-
// Update the view volume, position, and orientation
void UpdateViewParams( void );
// Update the view parameters
void UpdateViewMath( FGInterface *f );
- // Update the "World to Eye" transformation matrix
- void UpdateWorldToEye( FGInterface *f );
-
// Update the field of view coefficients
void UpdateFOV( const fgOPTIONS& o );
inline double *get_surface_east() { return surface_east; }
inline double *get_local_up() { return local_up; }
inline double *get_view_forward() { return view_forward; }
- inline const MAT3mat *get_WORLD_TO_EYE() const { return &WORLD_TO_EYE; }
inline GLfloat *get_MODEL_VIEW() { return MODEL_VIEW; }
};