Commit Graph
185 Commits
Author SHA1 Message Date
Thomas Geymayer 948db69cc9 interpolate without values is used to abort interpolating -> no warning 2013-07-04 19:46:27 +02:00
James Turner e5bca74b9d std::string namespace fixes. 2013-06-27 10:14:08 +01:00
Thomas Geymayer 9bfa6ac1a1 Restructure Canvas/PropertyBasedElement
Nodes inside the osg scenegraph now hold a strong reference to
the according canvas element. Canvas elements in turn now only
hold a weak reference to the according node. This simplifies
for example the canvas::Group as it does not need to keep a
list of children on its own anymore. This is now stored inside
the scenegraph (as it was already before).

The restructuring will also allow to use a canvas::Group for
the canvas gui inside FlightGear and share for example the
handling of stacking based on z-index.
2013-06-08 11:28:49 +02:00
Thomas Geymayer 2a6c50c893 More helper methods for Canvas and PropertyBasedElement. 2013-06-02 21:19:37 +02:00
Thomas Geymayer 2fe9ad595f Canvas: bug fixing and add some helpers. 2013-05-31 19:07:55 +02:00
Thomas Geymayer e53c71543a Move and rework pow to math/SGMisc 2013-04-28 15:43:02 +02:00
Thomas Geymayer 5c5e2a0f2f Remove debug output (and shorten test names) 2013-04-26 00:13:35 +02:00
Thomas Geymayer 9e9cc7859c Interpolation system tweaking and add helpers to SGPropertyNode to interpolate its value 2013-03-17 23:48:01 +01:00
Thomas Geymayer 8898f5fe52 Tweak interpolator and allow passing list of interpolation steps 2013-03-16 16:36:20 +01:00
Thomas Geymayer 40be69ae8e Remove unecessary dependency from libSimGearCore on libSimGearScene. 2013-03-16 12:19:23 +01:00
Thomas Geymayer 17eec81071 Fix headless build 2013-03-16 10:35:30 +01:00
Thomas Geymayer c9bbbd18ec New interpolation/animation system.
Inspired by jQuery.animate() properties can be interpolated using
different easing functions and specifying an animation duration.
Additionally animations can be chained to get table-based
animations like with the current SGInterpolator, or also create
looped animations or other more complicated curves.

Currently this system is not used yet, but it is intended to
replace SGInterpolator and allow more advanced animations of
eg. also colors, for example, for the canvas.
2013-03-15 23:37:17 +01:00
Thomas Geymayer e08eda18d5 CMake: Create list of libs for testing only once 2013-03-15 23:21:38 +01:00
James Turner 1a5467aec8 Collect properties from expression/condition trees.
Initial ground-work to support efficient updating of condition/expression results; allow collecting all the dependent property values from the hierarchy, so they can be observed. Also add a very small test-case for this.
2013-03-11 16:53:52 +00:00
Thomas Geymayer 79ae0da927 Fix some warnings 2013-03-07 00:17:45 +01:00
James Turner cf4af2692b Fix property tests static linkage. 2013-02-07 17:51:42 +00: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
Thomas Geymayer 50688e1159 Rename simgear::Rect to SGRect and make interface more similar to SGBox 2012-12-13 23:37:21 +01:00
Thomas Geymayer 8417fea3bf Overload Rect::contains and add compound assignment operators to PropertyObject 2012-12-13 00:30:11 +01:00
Thomas Geymayer 229837b14c Fix some compiler warnings. size_t/int/unsigned conversions and extra ';' 2012-11-29 20:20:40 +01:00
ThorstenB d226709836 Change logging class for tie/untie messages.
It's enough to see them in "general".
2012-11-23 20:44:17 +01:00
Thomas Geymayer 8b6f50d0cc SGPropertyNode::fireCreatedRecursive: don't fire for node itself by default 2012-11-21 11:58:07 +01:00
Thomas Geymayer 904d714d6d Get Canvas/PropertyBasedElement by name 2012-11-18 16:27:05 +01:00
Thomas Geymayer 45ac5cb2fa Canvas cleanup and restructuring
- Add some methods for easier using the Canvas from C++
 - Add some documentation to Nasal
2012-11-09 00:05:11 +01:00
Thomas Geymayer 183d3749f0 Fix SGPropertyNode tests 2012-11-07 09:31:56 +01:00
ThorstenB 3fe513f9e0 Fix property find_last_child/addChild.
Initial "addChild" should have index #0 (not #1).
Also extend test cases.
(Test case shows addChild(append=false) isn't working as expected!?)
2012-11-07 00:53:32 +01:00
Thomas Geymayer b99f53fda3 Refactor Canvas and add some helpers.
- Refactor Canvas from FlightGear and fix lazy rendering with
   recursive canvases.
 - New classes PropertyBasedElement and PropertyBasedManager for
   creating subsystems controlled by the property tree.
 - New method parseColor to parse CSS 3 conformant color strings
   (only basic color schemes supported)
 - New Rect class representing a rectangle.
2012-11-04 14:12:05 +01:00
Thomas Geymayer 5330dc34bc Helper for property controlled subsystems
- Subsystem which manages a list of elements which
   are controlled through the property tree.
 - Fix a ShivaVG compiler warning.
 - Add some helper functions to trigger property removed/add
   events for a whole property tree.
2012-10-29 16:11:35 +01:00
Thomas Geymayer e24e3c0612 Add method SGPropertyNode::addChildren to create multiple children at once 2012-10-14 17:26:52 +02:00
Thomas Geymayer f5cc151618 Extend addChild to allow using first unused index 2012-10-13 15:07:18 +02:00
ThorstenB 27131b43cb Add convenience method for tiedPropertyLists 2012-09-16 17:58:44 +02:00
James Turner 47d88bcfa7 Standardise SimGear libraries, for static vs shared.
Always create only two SimGear libraries: SimGearCore and SimGearStatic, regardless of whether we're building static or shared. This requires an updated to FindSimGear.cmake module, for the static configuration.
2012-09-16 16:04:08 +01:00
James Turner e288549c9e Make dependent template lookups explicit.
Clang (in Xcode 4.4) is being strict about dependent lookup rules, so apply the recommended fix-it.
2012-07-31 00:57:09 +01:00
ThorstenB 51a17a7a0f Suppress unnecessary "failed alias" warnings
when requested alias matches existing alias anyway (identical aliases can
be created on repeated sim resets)
2012-07-07 16:05:02 +02:00
Frederic Bouvier cc37713a66 Remove redundant inclusion of math/SGMath.hxx 2012-05-05 11:19:20 +02:00
ThorstenB 44db6d9e44 Move vector property templates to separate header file.
Fixes the "weirdness" with MSVC complaining about incomplete class specs,
since forward declarations (SGMathFwd.hxx) are used in props.hxx only.
Only the few extended (vector) property templates require including the
full SGMath.hxx (with MSVC) - and these are used in few places.
2012-05-05 00:07:07 +02:00
ThorstenB 6e662fe4d6 Ganael Laplanche: fix include dependencies for FreeBSD support 2012-05-04 23:24:10 +02:00
ThorstenB 77909577e4 Error messages when installing property aliases fails. 2012-04-05 20:03:07 +02:00
ThorstenB f1c2afacc4 Revert "Try to fix MSVC template instantiation issue with SGVec dependencies."
This reverts commit 8aed0e75df.
2012-02-24 22:00:58 +01:00
ThorstenB 8aed0e75df Try to fix MSVC template instantiation issue with SGVec dependencies. 2012-02-24 21:47:00 +01:00
Torsten Dreyer 441dc41715 Don't untie a property when loading from xml
executing the fgcommand loadxml implicitely untied every previously
tied property if a property type was given in the property element.
That made it impossible to autosave aircraft data for tied properties.
This patch should fix this. It adds an inconsitency, though:
if a property with a given type is read in which has been tied to
before and the property types do not match, the property type in the
xml file will be ignored.
2012-02-15 14:54:02 +01:00
ThorstenB 68625e48b9 Fix compiler warning / test issue. 2012-01-02 23:04:40 +01:00
Torsten Dreyer aef8f13290 Use of copy-constructors
explicitly initialize the base class in a copy-constructor instead
of implicitly calling the default constructor.
2011-12-25 20:11:06 +01:00
Erik Hofman f28e472f59 Throw a warning even is NDEBUG is defined 2011-12-19 15:34:11 +01:00
James Turner 75afee59c3 Get all the tests linking with shared-simgear, and duplicate the awkward core functions into a new file, pending a proper cleanup. 2011-11-28 23:22:43 +00:00
ThorstenB 7a52c2fa71 cmake: add option to disable building tests 2011-11-26 16:39:40 +01:00
James Turner 24c047c94e Remove the remaining Makefiles from the code. 2011-11-01 09:28:26 +00:00
James Turner d36e13e8ed Make tiedpropertylist quieter. 2011-10-30 07:55:44 +00:00
James Turner 2e9896a9ab Enhancements to property-object support, add a default ctor and some typedefs. 2011-10-30 07:55:29 +00:00