WorldWind Study Series 7: load/unload plugins

Source: Internet
Author: User

The original plan today is to fully understand the load/unload plugins. However, when analyzing this function, it is found that the load/unload plugins are not as simple as imagined, and its implementationCodeThere are many key knowledge points worth further study. Therefore, the Department is summarized in two separate sections. This is mainly to pave the way for tomorrow's in-depth study. The preparation is divided into two parts: Basic knowledge of world wind plugin, and demonstration of plug-in demo to help you strengthen your confidence.

Basic World Wind plugin knowledge

WorldWind is attractive not only because it is an open source 3D software, but also because it is an open source 3D framework. Many of my friends want to develop WorldWind Based on it. I used to learn WorldWind for this purpose, because it is three-dimensional and open-source (that is, free ). But the reason I have given is that WorldWind has a sound design framework that makes you feel refreshed. Its biggest advantage is its framework idea, which supports unlimited extension plug-ins. (For its architecture, I will summarize the series at the end, because this is a highlight of WW and it is worth learning !)

Far away, WorldWind supports dynamic loading of plug-ins. All you need to do is write a plug-in, or even a simple *. the CS plug-in file allows you to easily execute your functions in a 3D environment.

The idea of plug-ins is mainly applied in WW, which can be implemented in two ways: add-on and plugin.

What does add-on mean? Google translates it into "APPEND ". In this way, we can look at WorldWind: its core framework is better than a pair of human bone racks; its various functions are like "attaching" meat to the human bone shelf; the data accessed by various functions is like the blood in the human body's blood vessels. What will a person do if there is no blood? What will a person look like if there is no meat ?? What will a person do without bones ??? Imagine what add-on is! Back to WW reality, add-on is Earth, moon, etc. (such as 1), flags of the world, Landmark, etc. (2 ).


Figure 1: Figure 2:

"It seems that all functions are added-on ?" Yes, plugin can be considered as an add-on method, but plugins are more powerful. You can simply install the plug-ins from the sources you trust. plugins use C #, the code written by VB or J # is loaded and compiled by WorldWind at startup, allowing the plug-in developer to not modifySource codeIn this case, you can add new features for ww.

How to install? This question is what the WW client user should ask. Does it make sense for developers? Of course, I don't know what the user needs for development! I also talked to a netizen last night. I need to familiarize myself with the WW function first.

Add-on storage location: Under "C: \ Program Files \ NASA \ World Wind 1.4 \ add-ons" and sub-folders.

Put add-on in the add-ons folder. If it is a star (such as earth or Moon), put it on the outer layer. Place Earth (such as the national flag of the World) in the earth folder.After copying the image, restart ww.

Plugins installation: copy the developed plugin to "C: \ Program Files \ NASA \ World Wind 1.4 \ plugins" and load it into WW through load/unload.

Note: The plug-in is loaded from the outside, and the plug-in inside WW is used. External plug-ins can be uninstall (not unload), but internal plug-ins cannot. (This will be detailed later)

Plug-in official download: http://worldwindcentral.com/wiki/Add-on_Launchpad

Demonstrate plug-in demo to help you strengthen your confidence

Please refer to Region. Please refer to http://sourceforge.net/projects/nasa-exp/develop. Net version WW latest update submitted is, the update frequency is still very high.
If you cannot access a foreign network, see the following excerpt to update the information: "NASA
WorldWind ammianus committed revision 4087 to the NASA WorldWind SVN repository, changing 1 files.
2009-5 5 13:27:03 UTC by ammianus ". Even if it is not updated, it has a lot of knowledge worth learning.

The plug-in demo I am working on today has a very simple function. It just helps you build and learn WW information. Copy the plugindescendant folder (which contains plugindescendant. CS) to "C: \ Program Files \ NASA \ World Wind 1.4 \ plugins". You can load the plugin! As follows:

Open the load/unload dialog window and find the plugindescendant plug-in already exists!

It is gray. Select it and click the Load button to load it. It turns green!

You can use this plug-in. If the option box is selected, the plug-in is automatically loaded at the next startup.

Sorry, the above text is wrong. It helps you strengthen your confidence!

References: http://worldwindcentral.com/wiki/Add-on_Launchpad

 

See WW lite plug-in framework: http://www.cnblogs.com/wuhenke/archive/2011/05/06/2039419.html

 

Other parts of this series:

WorldWind Learning Series 6: Analysis of rendering process

WorldWind Learning Series 5: Full parsing of plug-in loading process

WorldWind Series 4: Function Analysis-show Planet axis, show position, show cross hairs

WorldWind Learning Series 3: Simple Function Analysis-process and copy and paste coordinates on the keyboard of the main form

WorldWind Series 3: Function Analysis-screenshot function and "About" form Analysis

WorldWind Series 2: capture the thief

WorldWind Series 2: capture the thief first capture the King Article 1

WorldWind Series 1: getting started

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.