**************************************************************************/
-#include "views.h"
+#include <Main/views.h>
-#include "../Include/constants.h"
-
-#include "../Flight/flight.h"
-#include "../Math/mat3.h"
-#include "../Math/polar.h"
-#include "../Math/vector.h"
-#include "../Scenery/scenery.h"
-#include "../Time/fg_time.h"
+#include <Include/fg_constants.h>
+#include <Flight/flight.h>
+#include <Math/mat3.h>
+#include <Math/polar.h>
+#include <Math/vector.h>
+#include <Scenery/scenery.h>
+#include <Time/fg_time.h>
+#include <Main/fg_debug.h>
/* This is a record containing current view parameters */
struct fgVIEW current_view;
/* Initialize a view structure */
void fgViewInit(struct fgVIEW *v) {
+ fgPrintf( FG_VIEW, FG_INFO, "Initializing View parameters\n");
+
v->view_offset = 0.0;
v->goal_view_offset = 0.0;
}
v->view_pos.y -= scenery.center.y;
v->view_pos.z -= scenery.center.z;
- printf("View pos = %.4f, %.4f, %.4f\n",
+ fgPrintf( FG_VIEW, FG_DEBUG, "View pos = %.4f, %.4f, %.4f\n",
v->view_pos.x, v->view_pos.y, v->view_pos.z);
/* make a vector to the current view position */
v->to_sun[0] = l->fg_sunpos.x - (v->view_pos.x + scenery.center.x);
v->to_sun[1] = l->fg_sunpos.y - (v->view_pos.y + scenery.center.y);
v->to_sun[2] = l->fg_sunpos.z - (v->view_pos.z + scenery.center.z);
- printf("Vector to sun = %.2f %.2f %.2f\n",
- v->to_sun[0], v->to_sun[1], v->to_sun[2]);
+ /* printf("Vector to sun = %.2f %.2f %.2f\n",
+ v->to_sun[0], v->to_sun[1], v->to_sun[2]); */
/* Derive the LOCAL aircraft rotation matrix (roll, pitch, yaw) */
MAT3_SET_VEC(vec, 0.0, 0.0, 1.0);
MAT3_SET_VEC(v->local_up, 1.0, 0.0, 0.0);
MAT3mult_vec(v->local_up, v->local_up, UP);
- printf(" Local Up = (%.4f, %.4f, %.4f)\n",
- v->local_up[0], v->local_up[1], v->local_up[2]);
+ /* printf("Local Up = (%.4f, %.4f, %.4f)\n",
+ v->local_up[0], v->local_up[1], v->local_up[2]); */
/* Alternative method to Derive local up vector based on
* *geodetic* coordinates */
MAT3_SET_VEC(vec, 0.0, 0.0, 1.0);
MAT3mult_vec(forward, vec, VIEW);
- printf("Forward vector is (%.2f,%.2f,%.2f)\n", forward[0], forward[1],
- forward[2]);
+ /* printf("Forward vector is (%.2f,%.2f,%.2f)\n", forward[0], forward[1],
+ forward[2]); */
MAT3rotate(TMP, v->view_up, v->view_offset);
MAT3mult_vec(v->view_forward, forward, TMP);
map_vec_onto_cur_surface_plane(v->local_up, v0, v->to_sun,
v->surface_to_sun);
MAT3_NORMALIZE_VEC(v->surface_to_sun, ntmp);
- printf("Surface direction to sun is %.2f %.2f %.2f\n",
- v->surface_to_sun[0], v->surface_to_sun[1], v->surface_to_sun[2]);
-
+ /* printf("Surface direction to sun is %.2f %.2f %.2f\n",
+ v->surface_to_sun[0], v->surface_to_sun[1], v->surface_to_sun[2]); */
/* printf("Should be close to zero = %.2f\n",
MAT3_DOT_PRODUCT(v->local_up, v->surface_to_sun)); */
/* $Log$
-/* Revision 1.6 1997/12/22 04:14:32 curt
-/* Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
+/* Revision 1.11 1998/01/27 00:47:58 curt
+/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+/* system and commandline/config file processing code.
/*
+ * Revision 1.10 1998/01/19 19:27:09 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.9 1998/01/13 00:23:09 curt
+ * Initial changes to support loading and management of scenery tiles. Note,
+ * there's still a fair amount of work left to be done.
+ *
+ * Revision 1.8 1997/12/30 22:22:33 curt
+ * Further integration of event manager.
+ *
+ * Revision 1.7 1997/12/30 20:47:45 curt
+ * Integrated new event manager with subsystem initializations.
+ *
+ * Revision 1.6 1997/12/22 04:14:32 curt
+ * Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
+ *
* Revision 1.5 1997/12/18 04:07:02 curt
* Worked on properly translating and positioning the sky dome.
*