Changes between Version 3 and Version 4 of ossimPlanetAPI


Ignore:
Timestamp:
Feb 4, 2008, 11:17:02 AM (16 years ago)
Author:
mlucas17
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ossimPlanetAPI

    v3 v4  
    6868to a Planet Object.  The ossimPlanet_LayerPtr is the native pointer to a Planet layer.   
    6969
     70{{{
    7071   typedef void*        ossimPlanet_StatePtr;
    7172   typedef void*        ossimPlanet_PlanetPtr;
     
    7576   typedef const char*  ossimPlanet_ConstStringType;
    7677   typedef char*        ossimPlanet_StringType;
     78}}}
    7779   
    7880The context type determines how much you want the API to manage and handle.  There are 3 ways you probably would like to use the library. 
     
    8284 * CASE 3 - ossimPlanet_VIEWER_CONTEXT option is typical of a full command line application that all you are concerned about is scripting and running a full screen or windowed planet.  This will interface into osg::Viewer and will create a render window for you.
    8385
     86{{{
    8487 typedef enum ossimPlanet_ContextType
    8588 {
     
    9699      ossimPlanet_TRUE  = 1
    97100   };
     101}}}
    98102
    99103=== Setup and Initialization ===
     
    101105
    102106'''ossimPlanet_addOpenSceneGraphLibraryPath''' Will add the passed in path to OpenSceneGraph's Library path.  This will be used mainly for finding OpenSceneGraph plugins.  If this needs to be setup it should be done before you call ossimPlanet_init and start adding layers to planet.
    103    
     107 
     108{{{ 
    104109  /**
    105110    * @param path Path to add to the Library search path.
     
    109114   OSSIMPLANET_DLL void ossimPlanet_addOpenSceneGraphLibraryPath(ossimPlanet_ConstStringType path,
    110115                                                                 ossimPlanet_BOOL insertFrontFlag);
     116}}}
    111117
    112118
    113119'''ossimPlanet_addOpenSceneGraphDataPath''' Adds the passed in path to OpenSceeGraph's data path.  This allows one to give relative path naming to data that is loaded.  For example:  if you have a font called arial.ttf and it's located in /fonts then you can add /fonts to the search path and you can load a font by just the name "arial.ttf".  The /fonts will be prepended.  If this needs to be setup it should be done before you call ossimPlanet_init and start adding layers to planet.
    114120
     121{{{
    115122  /**
    116123    * @param path Path to add to the Data search path.
     
    120127   OSSIMPLANET_DLL void ossimPlanet_addOpenSceneGraphDataPath(ossimPlanet_ConstStringType path,
    121128                                                              ossimPlanet_BOOL insertFrontFlag);
     129}}}
    122130   
    123131'''ossimPlanet_loadOssimPreferenceFile''' exposes the OSSIM core engines preference loading from a file.
    124132
     133{{{
    125134   /**
    126135    * @param preferenceFile The preference file to load.
    127136    */
    128137   OSSIMPLANET_DLL void ossimPlanet_loadOssimPreferenceFile(ossimPlanet_ConstStringType preferenceFile);
     138}}}
    129139
    130140'''ossimPlanet_setOssimPreferenceNameValue''' Allows you access to the OSSIM core engine's preference variables and you can set them.
     141
     142{{{
    131143   /**
    132144    * @param name The name of the preference variable.
     
    135147   OSSIMPLANET_DLL void ossimPlanet_setOssimPreferenceNameValue(ossimPlanet_ConstStringType name,
    136148                                                                ossimPlanet_ConstStringType value);
     149}}}
    137150
    138151'''ossimPlanet_addOssimPlugin'''     Adds an ossim core plugin.  If this is a directory then all files in the directoy that are plugins are added
     152
     153{{{
    139154   /**
    140155    * @param path Path to add to the OSSIM Plugin search path.
     
    144159   OSSIMPLANET_DLL void ossimPlanet_addOssimPlugin(ossimPlanet_ConstStringType path,
    145160                                                   ossimPlanet_BOOL insertFrontFlag);
     161}}}
     162
    146163
    147164'''ossimPlanet_addOssimElevation''' Add elevation to the OSSIM core system.
     165{{{
    148166   /**
    149167    * @param path Path to add to the Elevation.
     
    151169   OSSIMPLANET_DLL void ossimPlanet_addOssimElevation(ossimPlanet_ConstStringType path);
    152170
    153 
     171}}}
    154172
    155173'''ossimPlanet_addGeoid''' Elevation data is typically relative to mean sea level.  The geoid grids will be used to shift the Mean Sea Level to ellipsoidal heights.
    156174
     175{{{
    157176   /**
    158177    * @param path Path to add to the Geoid search path.
     
    165184                                             ossimByteOrder byteOrder,
    166185                                            ossimPlanet_BOOL insertFrontFlag);
     186}}}
    167187
    168188'''ossimPlanet_init''' Used to initialize the system.  This is typically called one time.  It initializes internal registries.
    169189
     190{{{
    170191 void ossimPlanet_init();
     192}}}
    171193
    172194'''ossimPlanet_initWithArgs''' Allows one to init by passing command line arguments.  This is typically used by command line applications.
    173195
     196{{{
    174197   /**
    175198    * @param argc A pointer to an integer.
     
    177200    */
    178201   OSSIMPLANET_DLL void ossimPlanet_initWithArgs(int* argc, char** argv[]);
     202}}}
    179203
    180204'''ossimPlanet_setTracePattern''' Allows you to set the trace on and off for various classes in the system.  If you want to trace all ossim classes then do ossimPlanet_setTracePattern("ossim.*");
    181205
    182206'''ossimPlanet_setTracePattern''' Allows you to set the trace on and off for various classes in the system.  This is in the format of a regular expression.  Some of the special characters found in the regular expression are:
     207{{{
    183208   /**
    184209    * ^        Matches at beginning of a line
     
    202227    */
    203228   OSSIMPLANET_DLL void ossimPlanet_setTracePattern(ossimPlanet_ConstStringType pattern);
     229}}}
    204230
    205231'''ossimPlanet_finalize''' Allows for cleanup.  It will cleanup wen the last finalize is called. So if multiple calls to init occur then the same number of finalizes need to occur.
    206232
     233{{{
    207234 void ossimPlanet_finalize();
     235}}}
    208236
    209237'''ossimPlanet_microSecondSleep''' Gives access to a microsecond sleep.
     238{{{
    210239   /**
    211240    * @param microSeconds Specify how many microseconds to sleep.
    212241    */
    213242   OSSIMPLANET_DLL void ossimPlanet_microSecondSleep(ossimPlanet_SizeType microSeconds);
    214    
     243}}}
     244
    215245
    216246'''ossimPlanet_milliSecondSleep''' Gives access to a millisecond sleep.
     247
     248{{{
    217249   /**
    218250    * @param milliSeconds Specify how many microseconds to sleep.
    219251    */
    220252   OSSIMPLANET_DLL void ossimPlanet_milliSecondSleep(ossimPlanet_SizeType milliSeconds);
     253}}}
    221254
    222255
    223256'''ossimPlanet_secondSleep''' Gives access to a seconds sleep.
    224257
     258{{{
    225259   /**
    226260    * @param seconds Specify how many microseconds to sleep.
    227261    */
    228262   OSSIMPLANET_DLL void ossimPlanet_secondSleep(ossimPlanet_SizeType seconds);
     263}}}
    229264
    230265=== State Interface ===
     
    234269'''ossimPlanet_newState'''  will return an internal class that contains all the needed state information.  It will basically create a self contained manager for view, layers, manipulator, ... etc.  This Will be the main pointer that all API calls operate on.  Note: Currently there can be only 1 view assigned per state.
    235270
     271{{{
    236272    /**
    237273    * @param contextType This specifies the type of context you would like to create.  @see ossimPlanet_contextType.
     
    241277   OSSIMPLANET_DLL ossimPlanet_StatePtr ossimPlanet_newState(ossimPlanet_ContextType type);
    242278   
     279}}}
    243280   
    244281'''ossimPlanet_deleteState''' will delete the passed in state and set the pointer back to 0.
    245282
     283{{{
    246284 /**
    247285 * @param state This is the state to delete.
    248286 */
    249287 OSSIMPLANET_DLL void ossimPlanet_deleteState(ossimPlanet_StatePtr state);
     288}}}
    250289
    251290=== View Interface ===
     
    257296'''ossimPlanet_setSceneDataToView''' is used to set the Planet layers to the view once you finish setting it up.  Typically, you initialize the layers to default values and then call this API to tie it to the view.
    258297
     298{{{
    259299   /**
    260300    * @param state The state to modify.
    261301    */
    262302   OSSIMPLANET_DLL void ossimPlanet_setSceneDataToView(ossimPlanet_StatePtr state);
     303}}}
    263304
    264305'''setViewportToCurrentGlSettings''' will assume that a Gl context is created and that the Viewport is set.  It will use GL calls to get the current Viewport values and set to the internal structures associated with the passed in state.  This is used when you are manipulating the Viewport through GL calls.  If this is the case then you can call this before rendering the planet.
     
    266307'''ossimPlanet_setViewManipulator''' Allows one to set a manipulator for the view.  For now, we only support manipulator type ossimPlanetManipulator.
    267308
     309{{{
    268310   /**
    269311    * @param state The state to modify.
     
    279321    */
    280322   OSSIMPLANET_DLL void setViewportToCurrentGlSettings(ossimPlanet_StatePtr state);
     323}}}
    281324
    282325'''ossimPlanet_setViewManipulator''' will set your current state view manipulator.
     326{{{
    283327   /**
    284328    *  Only support ossimPlanetManipulator type for now.
     
    297341   OSSIMPLANET_DLL void setViewportToCurrentGlSettings(ossimPlanet_StatePtr state);
    298342   
     343}}}
     344
    299345'''setProjectionMatrixToCurrentGlSettings''' This will assume that a Gl context is created and that the Projection Matrix is set.  It will use GL calls to get the current Projection Matrix values and set to the internal structures associated with the passed in state.  This is used when you are manipulating the Projection Matrix through  GL calls.  If this is the case then you can call this before rendering the planet.
    300346
     347{{{
    301348   /**
    302349    * @param state State to modify.
    303350    */
    304351   OSSIMPLANET_DLL void setProjectionMatrixToCurrentGlSettings(ossimPlanet_StatePtr state);
     352}}}
    305353   
    306354'''setModelViewMatrixToCurrentGlSettings''' This will assume that a Gl context is created and that the ModelView Matrix is set.  It will use GL calls to get the current ModelView Matrix values and set to the internal structures associated with the passed in state.  This is used when you are manipulating the ModelView Matrix through GL calls.  If this is the case then you can call this before rendering the planet.
    307355
     356{{{
    308357   /**
    309358    * @param state State to modify.
    310359    */
    311360   OSSIMPLANET_DLL void setModelViewMatrixToCurrentGlSettings(ossimPlanet_StatePtr state);
     361}}}
    312362
    313363'''ossimPlanet_setProjectionMatrixAsPerspective''' will allow one to set the perspective.
    314364
     365{{{
    315366   /**
    316367    * @param state The state to modify.
     
    325376                                                                     double near,
    326377                                                                     double far);
     378}}}
    327379
    328380'''ossimPlanet_setProjectionMatrixAsFrustum''' is identical to using the  glFrustum call.
    329381
     382{{{
    330383   /**
    331384    * @param state The state to modify.
     
    341394                                                                 double bottom, double top,
    342395                                                                 double zNear, double zFar);
     396}}}
    343397
    344398'''ossimPlanet_setProjectionMatrixAsOrtho''' is identical to the glOrtho call and creates and orthographic projection.
    345399   
     400{{{
    346401   /**
    347402    * @param state The state to modify.
     
    357412                                                               double bottom, double top,
    358413                                                               double zNear, double zFar);
     414}}}
    359415   
    360416'''ossimPlanet_setProjectionMatrixAsOrtho2D''' will set to a 2D orthographic projection. See OpenGL glOrtho2D documentation for further details.
     417{{{
    361418   /**
    362419    * @param state The state to modify.
     
    369426                                                                 double left, double right,
    370427                                                                 double bottom, double top);
     428}}}
    371429
    372430'''ossimPlanet_setProjectionMatrixAsRowOrderedArray'''  assumes a 4x4 array or 16 consecutive values.  The values are stored row ordered.  This means that the first 4 values are for the first row and the second four values are for the second row, ... etc.