packages icon



 LIBXEARTH(3)                                                   LIBXEARTH(3)
                              February 11, 1999



 NAME
      Earth - The earth widget class

 SYNOPSIS
      #include <Earth.h>

      extern void         XearthSetViewMag(
      Widget              self,
      float               view_mag
      );

      extern void         XearthSetViewRot(
      Widget              self,
      float               view_rot
      );

      extern void         XearthSetViewLat(
      Widget              self,
      float               view_lat
      );

      extern void         XearthSetViewLon(
      Widget              self,
      float               view_lon
      );

      extern void         XearthChildGetLatitude(
      Widget              child,
      float               *latitude
      );

      extern void         XearthChildGetLongitude(
      Widget              child,
      float               *longitude
      );

      extern void         XearthChildSetLatitude(
      Widget              child,
      float               latitude
      );

      extern void         XearthChildSetLongitude(
      Widget              child,
      float               longitude
      );

      extern int          XearthGetXY(
      Widget              self,
      float               latitude,
      float               longitude,
      Position       *xret,



                                    - 1 -           Formatted:  June 30, 2022






 LIBXEARTH(3)                                                    LIBXEARTH(3)
                              February 11, 1999



      Position       *yret
      );


 DESCRIPTION
      Earth is the reentrant version of the well known xearth. Is is a
      constraint widget ant manages visibility of its children according
      their geographical positions.

      XearthGetXY() returns 1 if position is visible, otherwise zero.

    Resources
      projType       might be mercator or orthographic.

      viewPosType    might be fixed, sunrel, or orbit.

      viewLat        is the view latitude.

      viewLon        is the view longitude.

      period         is the orbital period.

      inclin         is the orbital inclination.

      viewRot        is the view rotation.

      viewMag        is the view magnification.

      starFreq       is the star frequency,

      bigStars       displays big stars.

      day            defines the day percentage.

      night          defines the night percentage.

      terminator     see xearth.

      mono           displays the earth in monochrome (even on color
                     displays).

      numColors      defines the number of colors used.

      xGamma         defines the xgamma of the display.

      time           defines the unix time (time_t) of the earth.

      shiftX         defines the horizontal shift.

      shiftY         defines the vertical shift.




                                    - 2 -          Formatted:  June 30, 2022






 LIBXEARTH(3)                                                   LIBXEARTH(3)
                              February 11, 1999



      computeSunPos  computes the sun position.

      doShade        does a day/night rendering.

      doStars        displays stars instead of a dark space.

      doGrid         displays the position vertices.

      gridBig        displays a big grid.

      gridSmall      displays a small grid.

    Constraint resources
      latitude       defines the latitude of the child.

      longitude      defines the longitude of the child.

 NOTES TO IMPLEMENTORS
      To make the code reentrant and to interface correctly with the code of
      xearth (to respect the original code), We've had to create some kind
      of structures (t_map_scan_input, t_map_scan_output, etc...). The
      simplest thing is to understand well the meaning of these structures.
      Be careful, when a Resize() occurs, we have to call the correct
      reallocation methods because we've tried to limit them. By example,
      when the resource XtNtime changes, we don't realloc the rendermap nor
      the XImage (because XtNwidth and XtNheight hasn't changed).

      Not all the resources are deeply implemented (but almost all the most
      interesting ones). You have to know that there is some big problems
      with XtRfloat!!! On a 32 bit system, you can't pass them trough a
      XtSetValues and the best thing you've got to do (to be portable) is to
      pass them in using XtRString (and by example XtVaTypedArg). There is
      also another method by implementing public procedures (as in
      XawScrollbar for the thumb resource). It's what it has been done.


 SEE ALSO
      xearth(1)


 TODO
      XearthDrawLine() to draw lines on the earth surface. We have to find a
      way to keep a context concerning these lines to correctly redraw them
      on exposures.


 AUTHORS
      Kirk Lauritz Johnson <tuna@cag.lcs.mit.edu> - original author of
      xearth.  Martin Gall (mgall@capmedia.fr) - widget version.





                                    - 3 -          Formatted:  June 30, 2022