World Wind v1.4 API Specification

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:10, 9 June 2005 (edit)
Nosilleg (Talk | contribs)
(added back Cat:Dev)
← Previous diff
Revision as of 19:28, 22 June 2005 (edit) (undo)
143.232.86.153 (Talk)
(Final-Preliminary 1.4 API Spec)
Next diff →
Line 1: Line 1:
'''Key Interfaces that will be defined in the Plugin API''' '''Key Interfaces that will be defined in the Plugin API'''
-==IRenderable==+*'''namespace WorldWindSDK'''
-*Methods+**'''public interface IRenderable'''
-**void Dispose()+***'''Methods'''
-**<s>void Initialize(AppContext appContext)</s>+****void Dispose();
-**void Render(AppContext appContext)+****void Initialize();
-**<s>void Update(AppContext appContext)</s> Replaced by Event Handlers to the Camera (and other objects)+****void Render(ICamera camera);
-*Properties+***'''Properties'''
-**bool Disposed{get;}+****IRenderableList ChildRenderables{get;set;}
-**<s>bool Initialized{get;}</s> should be private...+****bool Disposed{get;}
-**Hashtable MetaData{get;set;}+****bool Initialized{get;}
-**string Name{get;} //should this be "set" as well?+****Hashtable MetaData{get;set;}
-**byte Opacity{get;set;}+****string Id{get;set;}
-**Vector3 Orientation{get;set;}+****byte Opacity{get;set;}
-**Vector3 Position{get;set;}+****Quaternion Orientation{get;set;}
-**bool Visible{get;set;} //used to be "IsOn", perhaps this shouldn't be "Visible" because being "Visible" doesn't mean that an object is actually in the View Frustum.+****IRenderable ParentRenderable{get;set;}
- +****Vector3 Position{get;set;}
-==IInteractive==+****bool Visible{get;set;} //used to be "IsOn"
-//perhaps there are interfaces in .Net already for this...similar to JAVA KeyListener and MouseListener ?+**'''public interface IRenderableList'''
-*Methods+***'''Methods'''
-**void OnKeyDown(KeyEventArgs e)+****void Add(IRenderable renderable);
-**void OnKeyUp(KeyEventArgs e)+****void Clear();
-**void OnMouseDown(MouseEventArgs e)+****void Insert(int index, IRenderable renderable);
-**void OnMouseEnter(EventArgs e) //??+****IRenderable RemoveAt(int index);
-**void OnMouseLeave(EventArgs e)+****IRenderable RemoveId(string Id);
-**void OnMouseMove(MouseEventArgs e)+***'''Properties'''
-**void OnMouseUp(MouseEventArgs e)+****int Count{get;}
-**void OnMouseWheel(MouseEventArgs e)+****IRenderableList ParentRenderableList{get;set;}
- +****bool ShowOnlyOneLayer{get;set;}
-==ICamera==+***'''Indexers'''
-* Vector3 Eye{get;set;}+****IRenderable this[int index] {get;set;}
-* Vector3 LookAt{get;set;}+**'''public interface IInteractive''' //perhaps there are interfaces in .Net already for this...similar to JAVA KeyListener and MouseListener ?
-* Vector3 Up{get;set;} //could be just {0, 0, 1} with Quaternion rotations applied afterwards+***'''Methods'''
-* Quaternion EyeOrientation{get;set;} // Bank, Heading, and Tilt should be calculated from this+****void OnKeyDown(KeyEventArgs e);
-* Quaternion LookAtOrientation{get;set} // Heading and Tilt should should be calculated from this+****void OnKeyUp(KeyEventArgs e);
-* Angle Fov{get;set;}+****void OnMouseDown(MouseEventArgs e);
- +****void OnMouseEnter(EventArgs e);
-==IWorld==+****void OnMouseLeave(EventArgs e);
-* double Flattening{get;}+****void OnMouseMove(MouseEventArgs e);
-* double EquatorialRadius{get;}+****void OnMouseUp(MouseEventArgs e);
-* double PolarRadius{get;}+****void OnMouseWheel(MouseEventArgs e);
- +**public delegate void CameraEvent(object sender, System.EventArgs e);
-==RenderableList <class>==+**'''public interface ICamera'''
-*Methods+***'''Methods'''
-**void Add(IRenderable renderable)+****void SetupCamera(IAppContext appContext);
-**void Dispose()+***'''Events'''
-**void Initialize(AppContext appContext)+****event CameraEvent OnCameraMove;
-**void Remove(string name)+***'''Properties'''
-**void Render(AppContext appContext)+****Vector3 Eye{get;set;}
-**void Update(AppContext appContext)+****Vector3 LookAt{get;set;}
-*Properties+****Vector3 Up{get;set;} //could be just {0, 0, 1} with Quaternion rotations applied afterwards
-**ArrayList ChildRenderables{get;set;}+****Quaternion EyeOrientation{get;set;} // Bank, Heading, and Tilt should be calculated from this
-**bool Disposed{get;}+****Quaternion LookAtOrientation{get;set;} // Heading and Tilt should should be calculated from this
-**bool Initialized{get;}+****Angle Fov{get;set;}
-**Hashtable MetaData{get;set;}+**'''public interface ITerrainAccessor'''
-**string Name+***'''Methods'''
-**byte Opacity{get;set;}+****double GetElevationAt(double lat, double lon, double targetSamplesPerDegree);
-**bool Visible{get;set;}+****double[,] GetElevationArray(double north, double south, double west, double east, int samples);
- +**'''public interface IWorld'''
-==GUIHelper <class>==+***'''Methods'''
-* string[] .Menus.GetTopLevel()+****Angle GetLatitudeFromCartesian(Vector3 cartesianPoint);
-* string[] .Menu[item].GetChildren()+****Angle GetLongitudeFromCartesian(Vector3 cartesianPoint);
-* .Menus[item].Insert(string text, method to call...)+****double GetAltitudeFromCartesian(Vector3 cartesianPoint);
-* .IconBar.Count+****Angle GetViewRangeFromCartesian(Vector3 cartesianPoint);
-* .IconBar.Add(Bitmap icon, int position, method to call...)+***'''Properties'''
-* methods to get/set each WWSetting (sticking each property get/set '''only''' in the Class might cumbersome. What is best way to get all names and types?)+****double EquatorialRadius{get;}
- +****double Flattening{get;}
-==AppContext <class>==+****double PolarRadius{get;}
-*Direct3D.Device Direct3D_Device+****ITerrainAccessor TerrainAccessor{get;}
-*int ScreenWidth+**'''public interface ICameraManager'''
-*int ScreenHeight+***'''Methods'''
-*...+****void AddCamera(ICamera camera);
- +****ICamera RemoveCamera(int index);
-One issue that has always bothered me was whether to exclusively make the camera "focus" on a "World" or whether to make it focus on a "RenderableObject". Of course, you cannot really define what a view range is if you focus on something like the International Space Station, but perhaps someone '''would''' want to focus on that...+***'''Events'''
 +****event CameraEvent OnCameraMove;
 +***'''Properties'''
 +****int Count{get;}
 +***'''Indexers'''
 +****ICamera this[int index] {get;}
 +**'''interface IAppContext'''
 +***'''Properties'''
 +****Microsoft.DirectX.Direct3D.Device Device3d{get;}
 +****Microsoft.DirectX.DirectSound.Device DeviceSound{get;}
 +****Microsoft.DirectX.Direct3D.Font DefaultDrawingFont{get;set;}
 +****IRenderable RootRenderable{get;set;} //top level IRenderable for which all IRenderables will be children of
 +****ICameraManager CameraManager{get;set;} //all IRenderables dependant on camera view position and angles should subscribe to the OnCameraMove event
 +****System.Windows.Forms.Control ParentControl{get;}
 +****IWidget ParentWidget{get;}
 +****Hashtable ExtendableObjects {get;set;} //use to save "objects" that are not explicitly defined in IAppContext
 +**'''public interface IWidget'''
 +***'''Methods'''
 +**** Under Construction
 +***'''Properties'''
 +**** Under Construction
 +**'''public interface IWigdetCollection'''
 +***'''Methods'''
 +**** Under Construction
 +***'''Properties'''
 +**** Under Construction
[[Category:Dev]] [[Category:Dev]]

Revision as of 19:28, 22 June 2005

Key Interfaces that will be defined in the Plugin API

  • namespace WorldWindSDK
    • public interface IRenderable
      • Methods
        • void Dispose();
        • void Initialize();
        • void Render(ICamera camera);
      • Properties
        • IRenderableList ChildRenderables{get;set;}
        • bool Disposed{get;}
        • bool Initialized{get;}
        • Hashtable MetaData{get;set;}
        • string Id{get;set;}
        • byte Opacity{get;set;}
        • Quaternion Orientation{get;set;}
        • IRenderable ParentRenderable{get;set;}
        • Vector3 Position{get;set;}
        • bool Visible{get;set;} //used to be "IsOn"
    • public interface IRenderableList
      • Methods
        • void Add(IRenderable renderable);
        • void Clear();
        • void Insert(int index, IRenderable renderable);
        • IRenderable RemoveAt(int index);
        • IRenderable RemoveId(string Id);
      • Properties
        • int Count{get;}
        • IRenderableList ParentRenderableList{get;set;}
        • bool ShowOnlyOneLayer{get;set;}
      • Indexers
        • IRenderable this[int index] {get;set;}
    • public interface IInteractive //perhaps there are interfaces in .Net already for this...similar to JAVA KeyListener and MouseListener ?
      • Methods
        • void OnKeyDown(KeyEventArgs e);
        • void OnKeyUp(KeyEventArgs e);
        • void OnMouseDown(MouseEventArgs e);
        • void OnMouseEnter(EventArgs e);
        • void OnMouseLeave(EventArgs e);
        • void OnMouseMove(MouseEventArgs e);
        • void OnMouseUp(MouseEventArgs e);
        • void OnMouseWheel(MouseEventArgs e);
    • public delegate void CameraEvent(object sender, System.EventArgs e);
    • public interface ICamera
      • Methods
        • void SetupCamera(IAppContext appContext);
      • Events
        • event CameraEvent OnCameraMove;
      • Properties
        • Vector3 Eye{get;set;}
        • Vector3 LookAt{get;set;}
        • Vector3 Up{get;set;} //could be just {0, 0, 1} with Quaternion rotations applied afterwards
        • Quaternion EyeOrientation{get;set;} // Bank, Heading, and Tilt should be calculated from this
        • Quaternion LookAtOrientation{get;set;} // Heading and Tilt should should be calculated from this
        • Angle Fov{get;set;}
    • public interface ITerrainAccessor
      • Methods
        • double GetElevationAt(double lat, double lon, double targetSamplesPerDegree);
        • double[,] GetElevationArray(double north, double south, double west, double east, int samples);
    • public interface IWorld
      • Methods
        • Angle GetLatitudeFromCartesian(Vector3 cartesianPoint);
        • Angle GetLongitudeFromCartesian(Vector3 cartesianPoint);
        • double GetAltitudeFromCartesian(Vector3 cartesianPoint);
        • Angle GetViewRangeFromCartesian(Vector3 cartesianPoint);
      • Properties
        • double EquatorialRadius{get;}
        • double Flattening{get;}
        • double PolarRadius{get;}
        • ITerrainAccessor TerrainAccessor{get;}
    • public interface ICameraManager
      • Methods
        • void AddCamera(ICamera camera);
        • ICamera RemoveCamera(int index);
      • Events
        • event CameraEvent OnCameraMove;
      • Properties
        • int Count{get;}
      • Indexers
        • ICamera this[int index] {get;}
    • interface IAppContext
      • Properties
        • Microsoft.DirectX.Direct3D.Device Device3d{get;}
        • Microsoft.DirectX.DirectSound.Device DeviceSound{get;}
        • Microsoft.DirectX.Direct3D.Font DefaultDrawingFont{get;set;}
        • IRenderable RootRenderable{get;set;} //top level IRenderable for which all IRenderables will be children of
        • ICameraManager CameraManager{get;set;} //all IRenderables dependant on camera view position and angles should subscribe to the OnCameraMove event
        • System.Windows.Forms.Control ParentControl{get;}
        • IWidget ParentWidget{get;}
        • Hashtable ExtendableObjects {get;set;} //use to save "objects" that are not explicitly defined in IAppContext
    • public interface IWidget
      • Methods
        • Under Construction
      • Properties
        • Under Construction
    • public interface IWigdetCollection
      • Methods
        • Under Construction
      • Properties
        • Under Construction
Personal tools