Classes | |
| struct | playback_t |
Defines | |
| #define | MAX_ROTATE_RATE f64(360.0) |
| #define | MAX_OBJS 10000 |
| #define | LINUX_SCHED_NAV |
Functions | |
| PCENUM_DEFINE (extern, TYPE(InteractionMode),) | |
| void | testRayIntersection2 (void) |
| This is just code for testing terrain interaction stuff. | |
| void | nav_init (void) |
| Initialize navigation configuration and install Navigation EventQueue handlers (which runs in the EventQueue thread). | |
| channel_t * | navigationOverlay (void) |
| XCC_STATIC_C (EHReturn, client_nav_event_handler(const VGIS_Event *event, int mouse[2], vgis_boolean_t alreadyHandled, void *callback_data)) | |
| This is effectively the main loop of the navigation code when the VGIS application is running as a view client or overview. | |
| XCC_STATIC_C (EHReturn, server_nav_event_handler(const VGIS_Event *event0, int mouse[2], vgis_boolean_t alreadyHandled, void *callback_data)) | |
| This is effectively the event handler that implements navigation code when VGIS is running as a view server or as a stand alone view. | |
| XCC_STATIC_C (EHReturn, server_nav_event_handler_finish(const VGIS_Event *event, int mouse[2], vgis_boolean_t alreadyHandled, void *callback_data)) | |
| void | normalize_weights () |
| void | modify_layer (int layer, int multiplier) |
Variables | |
| vgis_boolean_t | _logViewPosition = 0 |
| vgis_boolean_t | _logViewPositionOnce = 0 |
| f64_t | flyingTime |
| volatile int | flyingEnabled |
| f64_t | flyingSpeed = 1000 |
| vector3d_t | flyingSpeedTrans |
| vector3d_t | flyingSpeedRot |
| InteractionMode | interactionMode = ORBIT_MODE |
| int | _debugMinLevel = 0 |
| vector4d_t | intersection0 |
| vector4d_t | intersection1 |
| volatile char | _debugRayIntersection = 0 |
| volatile char | _debugAdjustDistance = 0 |
| volatile char | _debugUseAdjustDistance = TRUE |
| volatile char | _debugSkipWOMode = FALSE |
| char | freeHold = 0 |
| int | markertype = -1 |
| char | texturefile [256] |
| char | texturepathfile [256] |
| channel_t * | navigationChannel = NULL |
| channel_t * | _navigationOverlay = NULL |
NAVIGATION INTERFACE
On all platforms 'o', 'f' and 'w' switch between Orbit, Fly and Walk modes.
Orbit mode:
Fly mode:
Navigation modes can be customized using configuration files discussed here.
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Initialize navigation configuration and install Navigation EventQueue handlers (which runs in the EventQueue thread).
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
This is just code for testing terrain interaction stuff. Ideally this function probably belongs elsewhere.... |
|
||||||||||||
|
mark end of frame for navigation display lists |
|
||||||||||||
|
This is effectively the event handler that implements navigation code when VGIS is running as a view server or as a stand alone view. This code runs in the EventQueue handler thread. Only navigation code code should go here. Other code for selection, object manipulation, etc., or code specific to other VGIS applications should go in their own event handlers. Only if you need new functionally that truely is navigation functionality (i.e. view manipulation), then consider putting it in here and added called functions and provide a reasonable API for others to use. See [F1]. Footnotes:
There remains the possibility that due to other network and different machines execution speeds, that the two view client computers may get out of sync after arbitrary interactions. The only complete solution is to have a completely distributed scene graph. This is a whole, huge effort that would require pretty much rewritting all of VGIS...
view.log file The purpose of the view.log file is to record continuous flight paths or sequence of discrete view points that can be later played back. This is especially needed when doing performance tests where you need a reproducable set of view points. The current mechanism has theoretical problems though for this purpose though (see below). Read view.log: SHFT-P - (P for "playback") read and process the file 'view.log' from the current directory Write view.log: CTRL-SHFT-F5 - append the current view matrix to the view.log followed by 'pause' SHFT-F5 - toggles the continuous appending of the current view matrix to 'view.log' In the view.log text file valid lines are: exit -This causes VGIS to exit pause -This causes the navigation thread to pause at the current viewpoint until the space key is pressed <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> <float> -First <float> is timestamp. Currently ignored. Remaining 16 floats are view matrix.
return if render thread isn't up and running yet Initialize nasty static variables... debugging stuff. Occasionally, various bugs manifest themselves by generating NaN's in view matrix. This code just trys to help catch these cases make local copy of view for manipulation by this code (see [F2] & [F5]) open Display Lists for 3D navigation cues and widgets get time change handle optional local_view point logging Alter render LOD behavior to best suit current navigation mode. --This is deprecated by any paged object databases later than version 2_0 but I'm too chicken to remove it quite yet. (Original LOD behavior is found in lod.c:tlod_evaluate_obj revision 1.8.) compute tracked handheld cursors handle events ALL the following XXXX_handler calls and many of their subfunctions should be moved outside of this function into other libraries. (see [F1]) debugging trick (should move this somewhere else...) handle automatic mode switching handle mode switch execute current mode send view data, etc. to clients get view data, etc. from server perform hacked up thread scheduling stuff... for the momment I keep this nasty stuff in this function. Ideally it should be moved to the EventQueue thread loop. This is only a modularity issue. I'll try to do this soon. Do NOT try copying this stuff to other Event Handlers. They all run in one thread so it's enough to have this junk here.. update global view 'view' with all parts of local view that were changed by all the above event handler code... |
|
||||||||||||
|
This is effectively the main loop of the navigation code when the VGIS application is running as a view client or overview. This code runs in the EventQueue handler thread. get view client data compute tracked handheld cursors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
written by Dimitri van Heesch,
© 1997-2001