Commit Graph

3674 Commits

Author SHA1 Message Date
James Turner
70f334e1a3 Fix GCC warnings about signed/unsigned compare. 2013-02-08 12:58:02 +00:00
James Turner
279b53a705 Move BufferedLogCallback to its own class.
Reduces includes in logstream.hxx, which is included by everyone and hence needs to be lightweight.
2013-02-08 12:58:02 +00:00
James Turner
a72a3ce5f3 Fix stderr log filtering.
Thanks to Stuart for pointing this out!
2013-02-08 12:58:02 +00:00
Thomas Geymayer
979aea5212 Add SGMisc::seek helper 2013-02-08 12:12:15 +01:00
James Turner
34d3c63384 Fix bucketBoxTest linkage. 2013-02-07 17:53:34 +00:00
James Turner
cf4af2692b Fix property tests static linkage. 2013-02-07 17:51:42 +00:00
James Turner
d335ca5a8d A couple more tests fixes. 2013-02-07 17:48:58 +00:00
James Turner
9cac2c1457 Fix math test linkage. 2013-02-07 17:42:00 +00:00
James Turner
523b992b4c Windows logging tweaks.
Restore the freopen calls, though I am unsure exactly what they achieve.
2013-02-07 17:23:31 +00:00
Christian Schmitt
02be490466 Missing headers 2013-02-07 18:20:57 +01:00
James Turner
45ae3978f6 Fix handling of ZSTREAM_END result from zlib.
Avoid getting stuck when ZSTREAM_END occurs with no more bytes written out.
2013-02-07 13:01:56 +01:00
James Turner
f983194d7e Buffered log-callback.
Allow a particular set of log messages to be retained indefinitely, for (presumably) later display somehow, such as in the GUI.
2013-02-07 13:01:56 +01:00
James Turner
ab8373b989 Rewrite logging code.
Support multiple backends, and make it thread-safe. Use an internal thread to push log entries to backends, to avoid blocking the submitting thread for any time.
2013-02-07 13:01:56 +01:00
Thomas Geymayer
4bef2c48eb Remove debug output 2013-02-07 10:10:38 +01:00
Thomas Geymayer
21e2a769eb Fix PropertyObject bug and interface improvements.
- Fix overwriting of parent node if PropertyObject::node() is
   called for a non-existing node.
 - Prevent implicit conversion from const char* and
   SGPropertyNode*
2013-02-07 01:25:55 +01:00
Stuart Buchanan
fd8369142a Building performance improvements.
Use sensible LoD range of 10km and gradual fade-out to 20km rather
than fixed 20km+ LoD range.  Also make deeper quad-tree to make
culling easier.
2013-02-06 21:53:57 +00:00
Thomas Geymayer
5dea221ad5 Expose reloading Canvas placements 2013-02-06 01:19:24 +01:00
James Turner
235c29913a Make the knob mouse-wheel direction configurable.
Add a global setting to control the mouse-wheel direction of the knob; a future commit will expose this in the FG GUI.
2013-02-03 17:21:50 +00:00
James Turner
0870407f65 Add 'release' bindings to knob animation.
Currently this fires on button release, but also after any mouse-wheel movement (since they are sent as buttons). This feels slightly wrong, but can't decide how a spring-loaded know would work, when interacting via the mouse-wheel. Comments welcome.
2013-02-03 17:11:05 +00:00
James Turner
e8156c6bd9 Knob animation: shifted mode binding.
As part of this, pass the osgGA GUIEventAdapter down into the pick callbacks, which seems reasonable to me. If anyone can foresee issues with this, please let me know and I can adjust the API.
2013-02-03 16:33:30 +00:00
Thomas Geymayer
e7f9486aa1 Nasal String wrapper and allow adding methods to string objects.
- Add nasal::String for wrapping Nasal string data and accessing
   string methods (which eg. could be exposed to Nasal)
 - Allow adding functions from C/C++ which are callable on
   Nasal strings.
2013-01-31 19:07:33 +01:00
James Turner
53b9fd2110 Support preview mode in the model loader.
This makes fgviewer / fgfs --viewer mode useful with models containing Rembrandt light volumes.
2013-01-31 16:46:02 +00:00
James Turner
4d4e474464 Initial prototype of knob animation. 2013-01-31 00:15:09 +00:00
James Turner
a58b41e7d2 Pick animation moved to its own file.
Preparatory work for adding more pick animations which will share some
internals with this code.
2013-01-30 21:51:41 +00:00
Mathias Froehlich
4db05e97c5 spt: The bucket size case is already handled above. 2013-01-29 07:01:58 +01:00
Mathias Froehlich
3a668232c8 spt: Introduce a third layer of paged nodes. 2013-01-29 07:01:50 +01:00
Eric van den Berg
d2622a5d86 added some physical constants to constants.h
goes with fgfs merge request #38
2013-01-28 16:56:07 +00:00
James Turner
d11db8a67a Prepare for optionally embedded SimGear. 2013-01-26 15:31:17 +01:00
James Turner
98b6102e56 State-machine correctness tweaks. 2013-01-25 12:05:16 +01:00
James Turner
0db8613a21 StateMachine tweaks. 2013-01-25 09:29:31 +01:00
James Turner
94a6cb2cff Tolerate lack of C99 in MSVC. 2013-01-23 16:01:46 +01:00
James Turner
5b92575ed3 Fix state-machine test linkage with static libs.
Thanks to Thomas for the catch.
2013-01-22 20:56:57 +01:00
Thomas Geymayer
47b02c0480 Missing include 2013-01-22 19:20:41 +01:00
James Turner
691be54ca2 Keep Linux happy. 2013-01-22 18:53:51 +01:00
James Turner
22ea8ebe25 State-machine structure, initial work. 2013-01-22 18:08:44 +01:00
James Turner
bd71635c49 Add left/right Nasal library functions. 2013-01-22 18:06:50 +01:00
James Turner
830bc3eac3 More native math functions in Nasal. 2013-01-22 18:06:50 +01:00
Mathias Froehlich
2d72bf4308 spt: Put the sea level textured tiles also under a transform node. 2013-01-20 15:33:25 +01:00
Mathias Froehlich
f4e694afa7 spt: Consistently return references in the loader. 2013-01-20 15:33:25 +01:00
Mathias Froehlich
55610bae70 spt: Use SGBox to build up the bounding spheres for the tiles. 2013-01-20 15:33:25 +01:00
Mathias Froehlich
08351e0df2 bucket: Make no bucket cross the 0 and 180 deg longitude border.
Change the bucket tiling at the poles not to cross the
0deg longitude and not to cross the 180deg longitude line.
This lets some special cases disappear for the buckets as well
as for the hierarchical level of detail spt loader.
Also change the last degree tiles from spanning 360 degrees to
12 degrees. Before we had 8 nested rings which neither helps
scenery paging nor culling. With that change the chunks are
about the same order of size than any other tile. Also the
tile shapes are much more friendly for culling and paging.
Also in presence of the current scenery, this polar tiles contain
as of today just totally broken geometry which tells me that
also the scenery generation process did not like these rings
for the tile shapes.

The impact on the current scenery is low. With this change the
polar regions do no longer load the tiles that are available
in the current scenery builds. The last degree tiles are broken
in this scenery version anyway. The next degree that is changed
will really loose some tiles that were sensible as of today.
All these areas are replaced with sea tiles by the old paging
structure. So, you will have at least ground below you when you
fly there. A hopefully comming soon scenery rebuild will
use this new tiling structure and thus will be the first one
providing closed polar caps.
2013-01-20 15:33:25 +01:00
Torsten Dreyer
7489771ad2 Bump version to 2.11.0 2013-01-17 19:22:07 +01:00
Thomas Geymayer
ea8023e51f Canvas: Provide sane default bounding box (For Image & Text) 2013-01-09 12:11:19 +01:00
Thomas Geymayer
8a9693a28e Fix canvas mouse intersection test
Bounding box of drawables use other coordinate frame
then bounding sphere of MatrixTransform...
2013-01-05 00:44:19 +01:00
Thomas Geymayer
724fba4af9 canvas::Element: parse full 3x3 matrix
This doesn't change any existing behaviour but allows specifying
full 3x3 matrix to eg. perform a perspective transform needed
for some HUDs.
2013-01-01 14:18:39 +01:00
Thomas Geymayer
beca1cbf96 Allow nasal::Ghost to only wrap classes by their shared pointers
This removes support for exposing and managing classes by just
raw pointers as this made lifetime management of instances
from C++ to Nasal and especially the other way round nearly
impossible. Always using smart pointers saves us from a lot
of headaches.
2012-12-29 17:49:22 +01:00
James Turner
b74d2ae9fa Notify all requests on name lookup failures.
Since there's no active request during a name lookup failure, explicitly fail all sent and queued requests, so the Request subclasses can take regular failure action.
2012-12-29 14:36:38 +00:00
James Turner
ec82a0154b Expose the current members of a subsystem group. 2012-12-28 14:54:00 +00:00
James Turner
0ea8dbea10 Add SGPath to the Nasal conversion helpers. 2012-12-28 14:53:31 +00:00
James Turner
a131f44247 OS-X specific sleep helper, more stable. 2012-12-23 23:30:40 +00:00