Commit Graph

4034 Commits

Author SHA1 Message Date
James Turner
e973e406a3 Fix some SVN errors/crashes. 2013-11-15 11:47:36 +00:00
bcoconni
c64776029e Removed the 'using::std' instructions from the headers as per James Turner request.
Also took this opportunity to add a check in XMLVisitor::savePosition() against a null pointer.
2013-11-14 22:07:29 +00:00
bcoconni
5d7d0a922d Added the ability to access the file name and position (line, column) from which the XML visitor is getting its data 2013-11-14 22:07:29 +00:00
Christian Schmitt
c2c96c4219 apt_signs: lower the log level for apt.dat syntax errors. Nobody seems to care... 2013-11-14 18:41:20 +01:00
James Turner
3e9ed08c53 Reset: use ref-counting to own subsystems.
Change the subsystem-group and manager code to use shared-ptr references
to subsystems, instead of holding a raw pointer. Hence the manager becomes
the owning ref to most subsystems.
2013-11-12 23:12:45 +00:00
James Turner
b7df9026c0 Reset: Terrasync root can change, can be shutdown. 2013-11-12 23:04:13 +00:00
James Turner
6527c6357b Reset: clean event-manager shutdown 2013-11-12 22:23:19 +00:00
James Turner
fad333256c Reset: DeletionManager can be uninstalled 2013-11-12 22:23:14 +00:00
James Turner
8753811fe1 Remove exceptions on missing texture names 2013-11-12 22:23:09 +00:00
James Turner
237752ff62 String case conversion, UTF-8 conversion. 2013-11-12 22:17:12 +00:00
Thomas Geymayer
743244a69c CanvasElement: ensure parent pointer can not become invalid. 2013-11-10 17:12:50 +01:00
Thomas Geymayer
9f89737986 track-to animation: fix "short" and "long" tracking. 2013-11-10 11:14:50 +01:00
Thomas Geymayer
508a5c5f66 track-to animation: 2dof rotation for slave object.
Slave objects can now rotate around two axis to always track the
target - even when it is outside the plane perpendicular to the
lock-axis of the root object. This allows for example animating
levers with non-parallel axis of rotation connected with a rod.
2013-11-08 00:51:18 +01:00
James Turner
d84394efa0 Tweak HTTP code to always sleep.
Check explicitly for the 'no channels' case and
sleep instead, to avoid busy-waiting. (This is a work-
around, the underlying issue still be be traced)
2013-11-06 15:11:46 -08:00
James Turner
dd613d48bc Reset: pin ctor and dtor of event manager. 2013-11-05 05:21:57 +00:00
James Turner
2e8e500d4f Reset: commands can be removed 2013-11-05 05:21:52 +00:00
James Turner
48f866dcc6 TerraSync: avoid assert on missing file 2013-11-05 05:17:57 +00:00
Thomas Geymayer
ec4d3e4f9b Make new gcc happy (include cmath) 2013-11-04 10:48:26 +01:00
Thomas Geymayer
38ddfab1e0 Canvas: improved clipping and new property clip-frame.
- Update clipping rect if canvas view or texture size
   changes.
 - Add new property "clip-frame" to specify coordinate
   frame for "clip" coordinates. Coordinates can be
   global, relative to the parent or relative to the
   element itself.
2013-11-03 20:12:45 +01:00
Thomas Geymayer
353b7e4438 SGPropertyNode: extract enum value with getValue 2013-11-03 20:11:06 +01:00
Thomas Geymayer
7076c9a0ff HTTP: finish core request before calling any callback. 2013-10-28 20:34:11 +01:00
James Turner
2f42a8714c Terrasync: don't busy wait when no requests are running. 2013-10-28 14:51:52 +00:00
Thomas Geymayer
fdf6fc32ff HTTPFileRequest: create directory if it does not exist 2013-10-28 12:38:39 +01:00
Thomas Geymayer
f2188b33c6 HTTP: Rename urlretrieve/urlload to save/load. 2013-10-27 23:38:46 +01:00
Thomas Geymayer
f93fead8f2 io: refactor and improve HTTP modules.
- refactor code used multiple times spread over sg/fg into
   one single location.
 - allow aborting requests.
 - Provide two common request types:
  * FileRequest: Save response into file
  * MemoryRequest: Keep resonse in memory (std::string)
 - extend HTTP::Client interface:
  * urlretrieve: Save url to file (shortcut for making a
                 FileRequest)
  * urlload: Get respons into memory (shortcut for making
             a MemoryRequest)
2013-10-27 19:05:49 +01:00
Thomas Geymayer
050f3791cc New class simgear::Map extending std::map interface. 2013-10-27 19:05:49 +01:00
James Turner
94326fd964 Windows logging changes
- can log to the debugger (MSVC output window) via OutputDebugStr
- logging to the console is optional, triggered by new
  requestConsole hook()
2013-10-26 21:04:16 +01:00
James Turner
f26f3b606d Fix handling of SGPath::rename
Windows handling of ::rename differs from POSIX when the new name
exists. Check for this case on Windows and remove the file manually.
(This allows a work-around in SVNDirectory to be removed)
2013-10-26 21:03:00 +01:00
Thomas Geymayer
7cbfa76be4 cppbind: automatic conversion of SGReferenced derived pointers. 2013-10-26 01:04:16 +02:00
James Turner
d896e71ae9 Add total bytes downloaded tracking. 2013-10-24 23:35:44 +01:00
Thomas Geymayer
ca79d99ec4 canvas::Element: add getter for parent element. 2013-10-23 17:11:03 +02:00
James Turner
95f77ef81d Ooops, fix INSTALL rule.
We need the rule, just not the export, for now.
2013-10-23 14:18:39 +01:00
James Turner
c4e7d26b70 Comment out Cmake export experiments for now.
This is breaking CMake 2.6, so commenting out for the moment, until
I understand how to support this portably.
2013-10-22 13:42:59 +01:00
James Turner
ea49a1a07b Fix GPS activation on Windows.
Bug 1190, fix route-manager -> GPS activation on Windows
(and probably a couple of unrelated issues).
SGPropertyChangeCallback was missing a suitable copy-constructor,
leading to incorrect behaviour on compilers where the operation
is not elided. Such as MSVC.
2013-10-22 00:42:31 +01:00
James Turner
784223c67f Fix Dir warnings on Windows.
Test result of GetLastError so we don't log a warning in the
'nothing matched' case. Makes early startup logging much
more pleasant, especially when scanning aircraft dirs.
2013-10-21 23:51:19 +01:00
James Turner
77aa2c9a9d Smoother download rate from HTTP
Crude filtering (low pass) of the download rate, over a 400msec
time window.
2013-10-21 23:08:55 +01:00
James Turner
48145fb234 Fail HTTP request with missing/illegal protocols.
Instead of throwing, run the failure handler for requests with
either a missing spec or something other than http:// (eg, https
or ftp)
2013-10-20 23:20:49 +01:00
James Turner
49730cadee Placement can contain multiple nodes.
- Allow placement to have multiple children added.
- Remove legacy position setting APIs, enforce use of SGGeod
2013-10-20 20:44:42 +01:00
Thomas Geymayer
0b197501e1 Add SGPropertyNode::setValueReadOnly.
Helper to set value of relative node and mark
read only. Use eg. for exposing configuration
and build values to the property tree.
2013-10-20 12:03:41 +02:00
James Turner
8b0c246a7b Avoid a divide-by-zero on malformed BTG files.
Encountered while testing v850 airports; some airports
generate materials with no tris, and hence no indices.
This causes a divide-by-zero when computing the index stride.

Detect this, and convert the BTG reader to throw exceptions
in error conditions, and to catch this and report the
appropriate result code.
2013-10-17 20:13:50 +01:00
James Turner
9c4face1ae Fix float-int conversion bug caught by Clang 2013-10-17 20:13:49 +01:00
James Turner
952e2e6631 Fix unused-var warnings from Clang. 2013-10-17 20:13:49 +01:00
James Turner
4766910413 Terraysnc: don't block requests when inactive.
Add the same check for data files so we don't block when terrasync is
disabled.
2013-10-17 17:29:06 +01:00
James Turner
3c2f97a8d2 Re-order install(EXPORT ) lines.
Certain cmake builds/versions complain when a dependent target is
exported but dependencies are not. Export SimGearCore before
SimGearScene.
2013-10-17 17:12:02 +01:00
James Turner
f75730f165 Initial work on syncing non-scenery data.
This is some initial pieces to synchronise other pieces of base
data than scenery via the sync mechanism. An additional sync slot is
added to avoid scenery or other data blocking each other.
2013-10-17 16:39:29 +01:00
James Turner
b596e62a61 Remove some iostream debugging.
Accidentally committed this debug stuff, remove it.
2013-10-17 16:35:36 +01:00
James Turner
1349d48339 Export SimGear config to cmake.
Experimenting with this, should make FindSimGear module unecessary,
and avoid mis-matched SG/FG cmake settings in the future.
2013-10-17 16:10:18 +01:00
James Turner
d69ea5fda6 Kill off EMBEDDED_SIMGEAR 2013-10-17 16:09:39 +01:00
Thomas Geymayer
9b68062ba7 Add helper to get osg::Node path as string. 2013-10-17 13:28:54 +02:00
Thomas Geymayer
b217019723 Nasal: do not print invalid elements for error backtraces. 2013-10-16 23:33:06 +02:00