The configuration loader class Configurationloader loads the XML file that holds the star-related parameters from the specified path, reading the data to construct a list of the object and its associated rendered sub-objects and return. The class diagram for this class is shown below.
The main methods that the class contains are basically static, and the functions are described as follows:
public static double parsedouble (string s) parses the string s into double digits
private static bool Parsebool (string booleanstring) parses the string s into bool type
public static void Xmlvalidationcallback (object sender, ValidationEventArgs args) XML file when validation of a callback delegate event (severity: critical, Strict, Violent).
public static World Load (string filename, cache cache) function is a key function in this class, mainly from the specified path such as "Bin\x86\debug\config\earth.xml" The file loads an XML file that holds the relevant parameters of the planet, reads data from it to construct the planet object and returns.
private static Renderableobjectlist Getrenderablesfromlayerdirectory (String layerdirectory, World Parentworld, Cache Cache) function to go back from the specified layer directory to the list of Parentworld objects associated with the specified parent planet. Called by the related functions in this class and in the Renderableobjectlist class. Internally called its overloaded form public static renderableobjectlist Getrenderablefromlayerfile (String layerfile, World Parentworld, Cache Cache, bool Enablerefresh), overloaded form content more, need to look closely.
public static bool Islayeron (Renderableobject RO) Sets whether the specified Render object layer is turned on or off
private static Renderableobjectlist Addchildlayerset (XPathNodeIterator iter, World Parentworld, Renderableobjectlist Parentrenderable, Cache cache) Add a Sublayer collection to the list of rendered sub-objects
private static Imagetileservice Getimagetileservicefromxpathnodeiterator (XPathNodeIterator iter) returns the image Tile service object corresponding to the specified node
private static Imagestore Getimagestorefromxpathnodeiterator (string name, XPathNodeIterator imageaccessoriter, Renderableobjectlist parentrenderable, Cache cache) returns the image storage object corresponding to the specified node
private static void Addquadtilelayersfromxpathnodeiterator (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable, Cache cache) Add a four-tree tile layer from the specified node to the list of rendered sub-objects
private static TimeSpan getcacheexpiration (XPathNodeIterator iter) returns the buffer expiration time interval
private static void Addextendedinformation (XPathNodeIterator iter, renderableobject renderable) Add extension information
public static string getrenderablepathstring (Renderableobject renderable) to add a render path string that internally calls the quasi-named function private static string Getrenderablepathstring (Renderableobject renderable)
private static void Addimagelayersfromxpathnodeiterator (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable) Add an image layer from the specified node to the list of rendered sub-objects
private static void Addscreenoverlays (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable , cache cache) Add a screen overlay layer (ps:overlays: overlay, Chrome, package inlay)
private static void Addscreenoverlaystoicon (XPathNodeIterator iter, World Parentworld, icon icon, cache cache) Add Screen overlay layer to I Con icon
private static System.Drawing.Color GetColor (XPathNodeIterator iter) returns the color of the element specified by the XPathNodeIterator node iterator
private static Microsoft.DirectX.Direct3D.FontDescription Getdisplayfont (XPathNodeIterator iter) Returns the font description structure object for the display font specified by the XPathNodeIterator node iterator
private static void Addtiledplacenameset (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable) Add a Tiledplacenameset object to the list of rendered sub-objects that have been sliced into tiles by a place name collection
private static void Addtiledwfsplacenameset (XPathNodeIterator iter, World Parentworld, Renderableobjectlist Parentrenderable, cache cache) adds a Tiledwfsplacenameset object to the list of rendered sub-objects that have been sliced into tiles by a place name collection
private static void AddIcon (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable, Cache Cache) Adds an icon object specified by the XPathNodeIterator node iterator to the list of rendered sub-objects
private static void Addpathlist (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable) Adds an PathList path list object specified by the XPathNodeIterator node iterator to the list of rendered sub-objects
private static void Addlinefeature (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable) Adds an Linefeature Linetype feature object specified by the XPathNodeIterator node iterator to the list of rendered sub-objects
private static void Addpolygonfeature (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable Adds an Polygonfeature Polygon feature object specified by the XPathNodeIterator node iterator to the list of rendered sub-objects
private static void Addmodelfeature (XPathNodeIterator iter, World Parentworld, Renderableobjectlist parentrenderable) Add an Modelfeature model feature object specified by the XPathNodeIterator node iterator to the list of rendered sub-objects
private static terrainaccessor[] Getterrainaccessorsfromxpathnodeiterator (XPathNodeIterator iter, string cachedirectory) Gets the terrain accessor object from the element pointed to by the specified XPathNodeIterator node iterator
static string Getinnertextfromfirstchild (XPathNodeIterator iter) Gets the inner text string of the first child element from the element pointed to by the specified XPathNodeIterator node iterator
WorldWind Source Analysis Series: Configure the Loader class Configurationloader