1
0
Fork 0
Commit graph

3165 commits

Author SHA1 Message Date
david
8d9b59314a More cleanups. Removed the pui-* commands, and added a pass-through
property to indicate when mouse events should be offset to PUI and the
panel first.
2002-03-26 17:14:48 +00:00
david
94bd81c1de Updated Melchior's entry with other stuff he's done. 2002-03-26 17:10:51 +00:00
david
dd628e0cfc First draft of a quick overview of XML syntax, not specific to
property lists.
2002-03-26 17:08:42 +00:00
david
298ddbe30a Added Melchior (but I cannot remember what else he has contributed). 2002-03-26 16:12:12 +00:00
david
5b2df63f54 Patches from Melchior Franz:
The first hunk might not be necessary, but the light_coverage property
was the only one that wasn't explicitly defaulted, which is unfair.  ;-)
   The second hunk adds the missing initialization to the init routine.
This is necessary, because (unlike the material entries from material.xml)
the generated light entries don't get the light coverage set. Yet
obj.cxx:795 reads this information out fot every leaf, although not needed
in the case of lights. Avoiding this isn't worth the trouble.
   The last hunk sets the missing normal_index. The POINTS branch in
gen_leaf was always called with this int_list empty, which made the normals
handling use data garbage.
2002-03-26 16:10:53 +00:00
david
db7013c83a More work on the configurable mouse. Mouse motion is now configurable
as well as mouse clicks.  You must configure with --with-new-mouse to
get this.
2002-03-26 13:45:44 +00:00
david
4536c246da Setting offset or tilt always sets goal-offset or goal-tilt as well. 2002-03-26 13:44:43 +00:00
david
bdca06f9ba Commented out cout statements that were not in the std namespace. 2002-03-26 13:44:21 +00:00
david
ee44d3042f I missed committing this one. 2002-03-26 03:14:20 +00:00
curt
0a035c7f36 Oops, in the latest property manager rewrite, a typo crept in on
somewhat of a global scale.  This commit should fix all these up.
2002-03-26 02:38:11 +00:00
david
e82d7d5a64 Ensure that all entries in the FGAircraftModel::Animation structure
are initialized (reported by Melchior Franz).
2002-03-25 22:01:13 +00:00
david
b3d5d24d81 Patch from Melchior Franz:
It seems that the airport database was changed some day and the End?Flags
changed from floats to strings. The database definition, though, was not
adapted and still created number entries. Reading out these flags led to
access to memory, that was never initialized. While it didn't cause crashes
during normal use, it actually caused one when I ran fgfs in ddd. Seems,
that the concerned memory region wasn't zeroed out then and hence uncovered
the bug.

Of course, the runways.mk4 database has to be re-created with the new
definitions.
2002-03-25 20:05:34 +00:00
david
de9682e32a Patch from Erik Hofman:
This patch gets F8 working again.
2002-03-25 19:37:49 +00:00
david
780b4a813e Minor patch from David Megginson:
Fix FGViewer::update so that pitch offset and goal pitch offset work
together nicely (the offset was snapping to 90/-90 when only one of
the two was changed).


Viewer improvements from Jim Wilson:

These files get the 3d cockpit working and fix a few issues in the viewer
code.
XYZ offsets are now defined as follows: X -left/right+ (along wing axis), Y
-up/down+ perpendicular to the aircraft, Z is -in/out+ the aircraft's body axis.
I've also done some cleaning up of unused and mostly unusable interfaces,
added commentary to the *.hxx, combined together some duplicate code and
eliminated a couple unecessary operations.  I also moved what was left of the
"protected" zone to "private" since we aren't subclassing this anymore.
2002-03-25 14:32:13 +00:00
david
cf7f245b32 Fixed a small typo. 2002-03-25 14:30:29 +00:00
david
67e61c89ce Support for assigning custom mouse cursors to mouse modes. 2002-03-25 12:58:26 +00:00
david
9709dcb307 First steps towards configurable mouse input. Soon, this new code
(mainly in src/Input/input.cxx) will make src/GUI/mouse.cxx obsolete
and bring the mouse into the same input system as the joystick and
keyboard.  This is just preliminary work allowing, covering mouse
clicks (no motion yet), and it actually crashes on a middle or right
click.

The new mouse support is disabled by default until it become stable;
to try it out, you need to configure --with-new-mouse.
2002-03-23 23:16:13 +00:00
tony
d2156b5649 Updates. Includes property tree additions and fixes. Also Jon's first cut at
multi-fdm capability.  Thanks also to Erik for pointing out a couple of typos.
2002-03-23 00:29:21 +00:00
tony
464c060171 Fix for flaps problem. 2002-03-23 00:27:16 +00:00
david
da621105a0 Removed unused function fgFindNode (the version used now is in model.cxx). 2002-03-22 13:24:29 +00:00
david
343cea2812 Removed unused files. 2002-03-22 13:23:39 +00:00
david
fafc000d61 Initial revision of README describing the contents of the src/Main
directory.
2002-03-21 22:37:12 +00:00
david
825320e8bf Viewer update from Jim Wilson:
This patch renames the "goal" orientation offsets inputs/outputs to
conform with the naming of the new interface.
2002-03-21 20:59:43 +00:00
david
7b37a685b7 Minor updates to my own entry. 2002-03-21 16:32:46 +00:00
david
d594f21b43 Added Erik Hofman's sound contributions. 2002-03-21 16:29:50 +00:00
david
130d34d04f Added Jim Wilson. 2002-03-21 16:28:11 +00:00
david
b52123b88b Removed obsolete files. 2002-03-21 13:12:37 +00:00
curt
c032f841e2 more ( string == "" ) to ( string.empty() ) conversions. 2002-03-21 05:31:55 +00:00
andy
e45cb5d0aa Found by inspection a bug in the generation of orientation matrices
for fuselage Surface objects.  If the fuselage wasn't aligned perpendicular
to the Y axis, the matrix wouldn't be orthonormal.  Since all of, perhaps,
three aircraft have ever been built this way, it's doubtful I would have
found this as a bug report. :)
2002-03-21 03:35:52 +00:00
tony
8b621f2b1e Fix for the flaps problem. 2002-03-21 02:26:22 +00:00
tony
86e5f091bc Irix fix. 2002-03-21 01:45:49 +00:00
david
18a3df31b3 Model-loading patch from Dave Luff. 2002-03-20 22:40:11 +00:00
david
f65f1800c7 Use !strcmp for all property name comparisons. 2002-03-20 22:23:10 +00:00
david
d0d3b2bd7a Use !strcmp for all property string-value comparisons. 2002-03-20 22:15:22 +00:00
curt
e95429572c Converted if ( string == "" ) constructs to if ( string.empty() )
Fixed a warning in soundmgr.cxx.
2002-03-20 19:16:13 +00:00
david
4d4cd16012 Major viewer-code overhaul from Jim Wilson:
Description:

This update includes the new viewer interface as proposed by David M. and
a first pass at cleaning up the viewer/view manager code by Jim W.

Note that I have dropped Main/viewer_lookat.?xx and Main/viewer_rph.?xx and
modified the Makefile.am accordingly.


Detail of work:

Overall:
The code reads a little easier.  There are still some unnecessary bits in
there and I'd like to supplement the comments in the viewer.hxx with a tiny
bit on each interface group and what the groupings mean (similar but briefer
than what you emailed me the other day).  I tried not to mess up the style,
but there is an occasional inconsistency.  In general I wouldn't call it done
(especially since there's no tower yet! :)), but I'd like to get this out
there so others can comment, and test.

In Viewer:
The interface as you suggested has been implemented.  Basically everything
seems to work as it did visually.  There is no difference that I can see in
performance, although some things might be a tiny bit faster.

I've merged the lookat and rph (pilot view) code into the recalc for the
viewer.  There is still some redundancy between the two, but a lot has been
removed.  In some cases I've taken some code that we'd likely want to inline
anyway and left it in there in duplicate.  You'll see that the code for both
looks a little cleaner.  I need to take a closer look at the rotations in
particular.  I've cleaned up a little there, but I suspect more can be done
to streamline this.

The external declaration to the Quat_mat in mouse.cxx has been removed.  IMHO
the quat doesn't serve any intrinsic purpose in mouse.cxx, but I'm not about
to rip it out.  It would seem that there more conventional ways to get
spherical data that are just as fast.  In any case all the viewer was pulling
from the quat matrix was the pitch value so I modified mouse.cxx to output to
our pitchOffset input and that works fine.

I've changed the native values to degrees from radians where appropriate.
This required a conversion from degrees to radians in a couple modules that
access the interface.  Perhaps we should add interface calls that do the
conversion,  e.g. a getHeadingOffset_rad() to go along with the
getHeadingOffset_deg().

On the view_offset (now headingOffset) thing there are two entry points
because of the ability to instantly switch views or to scroll to a new view
angle (by hitting the numeric keys for example).   This leaves an anomaly in
the interface which should be resolved by adding "goal" settings to the
interface, e.g. a setGoalHeadingOffset_deg(), setGoalPitchOffset_deg(), etc.

Other than these two issues, the next step here will be to look at some
further optimizations, and to write support code for a tower view.  That
should be fairly simple at this point.  I was considering creating a
"simulated tower view" or "pedestrian view" that defaulted to a position off
to the right of whereever the plane is at the moment you switch to the tower
view.  This could be a fall back when we don't have an actual tower location
at hand (as would be the case with rural airports).

ViewManager:
Basically all I did here was neaten things up by ripping out excess crap and
made it compatible as is with the new interface.

The result is that viewmanager is now ready to be developed.  The two
preexisting views are still hardcoded into the view manager.  The next step
would be to design configuration xml (eg /sim/view[x]/config/blahblah) that
could be used to set up as many views as we want.  If we want to take the easy
way out, we might want to insist that view[0] be a pilot-view and have
viewmanager check for that.
2002-03-20 17:43:28 +00:00
curt
99fa3a6e79 Various Irix cleanups.
Float/Double clean ups for fg_sound.cxx
2002-03-20 15:57:31 +00:00
david
9dbb215b1d Added missing file from JSBSim CVS, with 'using namespace std;'
statement added for ANSI-conformant compilers.
2002-03-20 14:06:14 +00:00
david
25f68c0292 Irix fixes. 2002-03-20 13:59:34 +00:00
tony
775094f9af Updates. 2002-03-20 12:45:39 +00:00
tony
317d794f5c First commit of properties code. JSBSim now has a basic property tree all
under /fdm/jsbsim
2002-03-20 12:45:02 +00:00
david
0cc3bed841 Major property-manager rewrite, using const char * throughout
interface instead of string.  This will result in a lot more
efficiency later, once I add in a simple hash table for caching
lookups, since it will avoid creating a lot of temporary string
objects.  The major considerations for users will be that they cannot
use

  node->getName() == "foo";

any more, and will have to use c_str() when setting a string value
from a C++ string.
2002-03-19 17:12:13 +00:00
andy
47b2307356 Oops, "one third from the edge" means "one SIXTH from the center". 2002-03-19 00:02:18 +00:00
curt
a2acc953ae Somewhere along the line in the recent changes some std::cout were
inclueded in some of the files. Irix doesn't have cout in the std class,
so I changed it to "cout" and included SG_USING_NAMESPACE(std) at the
beginning of the files.
And some minor warning cleanups.
2002-03-18 19:46:24 +00:00
curt
586d7f127a White space tweaks. 2002-03-18 19:02:59 +00:00
curt
464f036f35 Here is a cleaned up hitlist that should solve the PLib conflict
and fixes a 'potential bug' if the FGFS View code were to change

I also consolidated the specialized IntersectLeaf()
as they really didn't gain us much outside of their having
'more direct access into the SSG controlled data'

I would like to see the fgCurrentElevation functions moved
out of hitlist.cxx.

The one obstacle is their being dependent on my PLib
auxillary functions

ssgGetEntityTransform()
ssgGetCurrentBSphere()

code has been run through astyle with the default options
2002-03-18 16:25:16 +00:00
curt
8138c82b58 Incorporated Norman's optimized line/geometry intersection code. 2002-03-17 00:38:24 +00:00
curt
3bf7269174 Initial revision. Things are just beginning to be stubbed in now. 2002-03-17 00:37:22 +00:00
curt
56d6ecbf83 Oops, fixing the ghosts of bugs past. :-) Good thing I remembered how I
fixed this when I made the mistake the first time.
The view code wasn't properly handling the transition across tile
boundaries so we'd get a 'flash' of the scene wrongly transformed for
one frame at every tile boundary crossing.  This is what
scenery.get_next_center() is for.
2002-03-17 00:36:39 +00:00
david
2c4eb0c56b Removed at CM's request. 2002-03-16 22:36:33 +00:00