Commit Graph

3846 Commits

Author SHA1 Message Date
Thomas Geymayer
2a6c50c893 More helper methods for Canvas and PropertyBasedElement. 2013-06-02 21:19:37 +02:00
Thomas Geymayer
7a8d796ac1 Move BlendFunc parsing to separate file for easier reuse. 2013-06-02 20:41:03 +02:00
Thomas Geymayer
8b3b71bce3 Support for parsing basic CSS color keywords. 2013-05-31 19:18:36 +02:00
Thomas Geymayer
83da4e9248 Canvas Image: fix updating while showing nested canvas. 2013-05-31 19:17:30 +02:00
Thomas Geymayer
2c879095d9 Canvas: add chainable helpers to Path for adding segments. 2013-05-31 19:16:42 +02:00
Thomas Geymayer
13344fbb62 Canvas: separate CSSBorder parsing from image. 2013-05-31 19:14:39 +02:00
Thomas Geymayer
2fe9ad595f Canvas: bug fixing and add some helpers. 2013-05-31 19:07:55 +02:00
Stuart Buchanan
0f798289f0 Use square textures for trees, with shrunk UV coordinates. 2013-05-19 21:29:58 +01:00
Thomas Geymayer
01104cc1d3 Canvas: Add local_pos to mouse event and fix transformation of event positions with multi-level nested canvases. 2013-05-13 00:34:09 +02:00
Thomas Geymayer
d61b5827fd Canvas: proper forwarding of dirty and visible flags within nested canvases. 2013-05-13 00:26:13 +02:00
Stuart Buchanan
d18cc81531 Avoid UV bleeding issues on trees by using a strip of textures. 2013-05-10 20:03:48 +01:00
Thomas Geymayer
c96d7ae226 Use simulation time for spin and timed animations 2013-05-10 01:11:46 +02:00
Thomas Geymayer
9535aef59b Extend SGPickCallback to allow passing more information to callbacks 2013-05-09 21:31:27 +02:00
Thomas Geymayer
82f6fca06f Add (optional) uv coordinates to SGPickCallback 2013-05-09 12:40:59 +02:00
Thomas Geymayer
627b36a53b Prevent timer endless loops 2013-05-06 23:26:45 +02:00
Thomas Geymayer
2af78a3874 Allow adding a contition to locked-track animation 2013-05-02 00:47:51 +02:00
Stuart Buchanan
7c7109edf4 Reduce the height of tree UV coordinates to work around mipmap issues. 2013-05-01 22:01:45 +01:00
Thomas Geymayer
0fa23b83e6 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).
2013-04-28 23:46:25 +02:00
Thomas Geymayer
e53c71543a Move and rework pow to math/SGMisc 2013-04-28 15:43:02 +02:00
Thomas Geymayer
fa64f7b6aa Work around MSVC linker bug with classes derived from i/ofstream 2013-04-27 23:44:32 +02:00
Thomas Geymayer
eaac3a64f8 Fix linker error for test 2013-04-26 23:48:25 +02:00
Thomas Geymayer
4eabc45dfc Fix animation tests for low precision floating point 2013-04-26 00:19:00 +02:00
Thomas Geymayer
5c5e2a0f2f Remove debug output (and shorten test names) 2013-04-26 00:13:35 +02:00
Thomas Geymayer
559a5d146a Add trackTo (locked-track) animation 2013-04-25 23:23:16 +02:00
Stuart Buchanan
df46c58cb8 Reduce the texture coords for trees.
Support winter, summer and snow textures on single texture sheet.
2013-04-20 21:05:55 +01:00
Thomas Geymayer
1f43132363 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.
2013-04-20 00:22:37 +02:00
Thomas Geymayer
17369a20de CanvaImage: Enable texture repeat for images 2013-04-15 21:09:41 +02:00
Thomas Geymayer
c83dae4c70 Comparison operators for SGSharedPtr 2013-04-13 16:21:04 +02:00
James Turner
c2f44a51c4 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.
2013-04-13 14:40:55 +01:00
Thomas Geymayer
3da44d1215 Nasal: add naVec_removelast. (Thanks to Philosopher) 2013-04-12 12:32:03 +02:00
James Turner
f6709e357f 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).
2013-04-05 17:12:58 +01:00
James Turner
45d5511fd7 Remove stray debug. 2013-04-02 18:10:09 +01:00
Thomas Geymayer
198c5d23fd nasal::Ghost tweaking to allow using with osg::oberser_ptr. 2013-04-01 13:35:41 +02:00
Thomas Geymayer
c41caeaf64 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.
2013-04-01 13:22:28 +02:00
Thomas Geymayer
b6c542b0e7 nasal::Ghost tweaking and to_nasal_helper for SGGeod. 2013-03-23 12:47:06 +01:00
Thomas Geymayer
2d62275a08 Fix uninitialized member.
Thanks to Chris for the catch.
2013-03-20 23:44:26 +01:00
Thomas Geymayer
971ea81861 cppbind: add from_nasal_helper to convert Nasal ghosts to C++ shared pointer 2013-03-19 18:36:55 +01: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
d2c03a6651 Fix pick-callbacks with no action.
Ensure pick animations work only to show a tooltip. Thanks to Emilian
for noticing I broke this
2013-03-12 21:14:31 +00:00
Thomas Geymayer
0a1e920659 Ensure canvas is updated before displaying image containing a canvas 2013-03-11 21:22:43 +01:00
James Turner
cd58df820e Standardise location (in XML) of hovered elements.
Hovered bindings are always direction children of the pick animation, since having different hovered behaviours per-action makes no sense.
2013-03-11 18:07:27 +00: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
0dcb64dca3 slider - fix shifted check while dragging 2013-03-10 23:10:26 +01:00
James Turner
b703102d9b Part of fixing bug 1055.
Add machinery to convert hateful legacy Windows encodings to UTF-8.
2013-03-10 13:38:29 +00:00
James Turner
3c2ef75b50 Tweaks for pick callback cursors. 2013-03-10 12:03:09 +00:00