Thomas Geymayer [Sat, 8 Jun 2013 09:28:49 +0000 (11:28 +0200)]
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.
Thomas Geymayer [Mon, 3 Jun 2013 21:39:11 +0000 (23:39 +0200)]
Canvas: clear event listeners on destroy
Removing all event listeneres on destroying a canvas
prevents circular references due to Nasal event listeners
keeping a reference to the canvas in their closure.
Also fix event handling with direct children of the root
group and add some more helpers to the Canvas.
Thomas Geymayer [Sun, 28 Apr 2013 21:46:21 +0000 (23:46 +0200)]
Extend locked-track animation to support a slave element.
This allows tracking elements while at the same time changing the
rotation of both animated elements to fill the available distance
to the target element. This allows for example animating gear
scissors or other connected objects like gear doors and their
actuators/arms (possibly connected to the gear strut).
Thomas Geymayer [Fri, 19 Apr 2013 22:22:37 +0000 (00:22 +0200)]
Canvas: rework style setter system.
Style setters are now only setup once for each element type and
not for each element instance as before. A static map holds the
setters for each element type. Also an animation type is stored
which will later allow to animate properties of Canvas elements
without specifying and animation type.
James Turner [Sat, 13 Apr 2013 13:40:55 +0000 (14:40 +0100)]
Restructure to avoid ordering issues.
Create a pick group for each object, instead of a single one. This
can be optimised in the future but this structure is backwards-
compatible with existing usage, which is more important.
James Turner [Fri, 5 Apr 2013 08:13:58 +0000 (09:13 +0100)]
Support for proxy pick objects.
Pick, knob and slider animations support additional object-names,
which are always invisible and untransformed (in the case of knobs/
sliders). These objects act to extend the hover/pick area, making small
switches and knobs more usable. (Especially for users with smaller
screens / windows).
Thomas Geymayer [Mon, 1 Apr 2013 11:22:28 +0000 (13:22 +0200)]
Ensure every scenery model has own SGModelData.
This makes Nasal unload hooks of scenery objects working again.
Previously the same SGModelData instance was used for all objects
which never got destroyed and therefore was not able to call any
unload callback.
Thomas Geymayer [Fri, 15 Mar 2013 22:37:17 +0000 (23:37 +0100)]
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.
James Turner [Mon, 11 Mar 2013 16:53:52 +0000 (16:53 +0000)]
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.
Thomas Geymayer [Sun, 3 Mar 2013 22:39:26 +0000 (23:39 +0100)]
cppbind: refactor to_nasal for better name lookup.
Using template parameter dependent name lookup it is
now possible to create to_nasal_helper overloads
for custom types and having them used for automatic
type conversion with binding methods/member on
nasal::Ghost objects.
Thomas Geymayer [Sun, 3 Mar 2013 18:26:25 +0000 (19:26 +0100)]
cppbind: rework to allow binding nearly everything.
It is now possible to register all types of member function
and free functions as methods for nasal::Ghost objects.
The return value and arguments are converte automatically
to the required types.
Also usage is simplified by removing replacing the old
method and method_func with a single method function
which only needs a name for the method and something
callable.
James Turner [Sun, 3 Mar 2013 16:06:51 +0000 (16:06 +0000)]
Look for MSVC 3rdparty deps differently.
Check for the 3rdparty dir in the parent of build dir, not the parent of the source dir. For the recommended build layout, this is the same location, but for super-builds using fgmeta it's not (and the source tree should not be touched).
If this causes anyone issues, please let me know, since it's possible more flexibility is needed to set the path explicitly.