LIBXEARTH(3)                                                     LIBXEARTH(3)



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,
  Position                *yret
  );





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

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

  Resources


  pprroojjTTyyppee       might be mmeerrccaattoorr or oorrtthhooggrraapphhiicc.

  vviieewwPPoossTTyyppee    might be ffiixxeedd, ssuunnrreell, or oorrbbiitt.

  vviieewwLLaatt        is the view latitude.

  vviieewwLLoonn        is the view longitude.

  ppeerriioodd         is the orbital period.

  iinncclliinn         is the orbital inclination.

  vviieewwRRoott        is the view rotation.

  vviieewwMMaagg        is the view magnification.

  ssttaarrFFrreeqq       is the star frequency,

  bbiiggSSttaarrss       displays big stars.

  ddaayy            defines the day percentage.

  nniigghhtt          defines the night percentage.

  tteerrmmiinnaattoorr     see _x_e_a_r_t_h.

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

  nnuummCCoolloorrss      defines the number of colors used.

  xxGGaammmmaa         defines the xxggaammmmaa of the display.

  ttiimmee           defines the _u_n_i_x time (ttiimmee__tt) of the earth.

  sshhiiffttXX         defines the horizontal shift.

  sshhiiffttYY         defines the vertical shift.

  ccoommppuutteeSSuunnPPooss  computes the sun position.

  ddooSShhaaddee        does a day/night rendering.

  ddooSSttaarrss        displays stars instead of a dark space.

  ddooGGrriidd         displays the position vertices.

  ggrriiddBBiigg        displays a big grid.

  ggrriiddSSmmaallll      displays a small grid.

  Constraint resources


  llaattiittuuddee       defines the latitude of the child.

  lloonnggiittuuddee      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
  xxeeaarrtthh((11))


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 expo-
  sures.


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