VisSim API

VisSim API


STRUCTURES


STUCTURE IFACE_SCENARIO_CENTER_TYPE
  • Reference: vissim.h

    This structure contains the lat/long coordinates (in radians) of the center of the simulation, obtained by calling iface::get_data(IFACEDATA_SCENARIO_CENTER, *)

    typedef struct {

       vector2d latlon;
    
    } iface_scenario_center_type;
    CLASSES


    CLASS GUI_TYPE
  • Reference: vissim.h
  • Library: libvsim

    This class is used to instantiate objects that will handle the graphics window and any gui dialogs.

    class gui_type {

    };
    CLASS CORRELATE
  • Reference: vissim.h
  • Library: libvsim

    This class is used to contain physical information about objects described by the "semobj_data" file.

    class correlate public dbl_llist {

    };
    CLASS SYMBOL_LUT_TYPE
  • Reference: vissim.h
  • Library: libvsim

    This class manages a double linked list of symbol_correlation_types.

    class symbol_lut_type : public dbl_llist_manager {

    };
    CLASS PLATFORM_MANAGER
  • Reference: vissim.h
  • Library: libvsim

    This class is used to manage a list of correlates.

    class platform_manager : public dbl_llist_manager {

    };
    CLASS LABELTYPE
  • Reference: vissim.h
  • Library: libvsim

    This class is used to hold a string for rendering.

    class labeltype : public dbl_llist {

    };
    CLASS LINETYPE
  • Reference: vissim.h
  • Library: libvsim

    This class is used to hold a line for rendering.

    class linetype : public dbl_llist {

    };
    CLASS VMEM_MANAGER
  • Reference: vissim.h
  • Library: libvsim

    This class handles the more frequently allocated data structures.

    class vmem_manager : public memman {

    };
    CLASS SYMBOL_CORRELATION_TYPE
  • Reference: vissim.h
  • Library: libvsim

    This class correlates simulation entities w/ visualization data.

    class symbol_correlation_type : public dbl_llist {

    };
    CLASS PLAT_STAT_TYPE
  • Reference: vissim.h
  • Library: libvsim

    This class maintains the state data for a platform/object.

    class plat_stat_type {

    };
    CLASS BASIC_RADAR_DATA_TYPE
  • Reference: vissim.h
  • Library: libvsim

    This class is an interface to represent a simple radar object.

    class basic_radar_data_type : public dbl_llist {

    };
    CLASS PLATFORM_DATA
  • Reference: vissim.h
  • Library: libvsim

    This class is an interface to the rendering library for this object/platform.

    class platform_data {

    };
    CLASS BASIC_PLATFORM
  • Reference: vissim.h
  • Library: libvsim

    This class is an interface to the simulation for this object/platform.

    class basic_platform : public dbl_llist {

    };
    CLASS IFACE
  • Reference: vissim.h
  • Library: libvsim

    This class is an interface to the simulation.

    class iface : public dbl_llist_manager {

    };

    FUNCTIONS


    This function converts latitude("d_lat"), longitude("d_lon") to strings ("lat" "lon") where "format" ranges from 1..4 and affects the format of the string.

    void deg_to_dms(double d_lat, double d_lon, char *lat, char *lon, int format);


    This function converts the strings "lat", "lon" into double precision numbers "d_lat", "d_lon".

    void dms_to_deg(char *lat, char *lon, double *d_lat, double *d_lon);


    This function converts meters "x", "y" to degrees "lat", "lon". It is assumed that init_earth() has been called.

    void xy_to_deg(double x, double y, double *lat, double *lon);


    This function converts degrees "lat", "lon" to meters "x", "y". It is assumed that init_earth() has been called.

    void deg_to_xy(double lat, double lon, double *x, double *y);


    This function converts meters "x", "y" to radians "lat", "lon". It is assumed that init_earth() has been called.

    void xy_to_rad(double x, double y, double *lat, double *lon);


    This function converts radians lat/lon to meters x,y. It is assumed that init_earth() has been called.

    void rad_to_xy(double lat, double lon, double *x, double *y);


    This function initializes the conversion routines between a flat earth model (meters x, y) and a round earth model (degrees lat, lon) with the center of the scenario ("center_lat", "center_lon"), and the earth radius ("earth_radius")

    void init_earth(double center_lat, double enter_lon, double earth_radius);


    This function reads in a setup file designed to initialize all the global variables used by the system. These values maybe overriden by parse_input().

    int parse_setup(char *filename);


    This function writes out a setup file based on the current state of the global variables used by the system.

    int write_setup(char *filename);


    This function parses in "rgb.txt" - a X11/Unix file that contains standardized color names and rgb values.

    void init_color_lut(char *filename);


    This function registers a loader function that allocates a platform_data object.

    void register_platform_data_loaderCB((void (*)(void))func);


    This function registers a parsing function that allows the programmer to parse custom additions to the startup .ini file.

    void register_setup_CB((void (*)(FILE *, char *))setupCB);


    This function registers a data dump function that allows the programmer to output custom additions to the startup .ini file as its being saved out.

    void register_setup_out_CB((void (*)(FILE *))setup_outCB);


    GLOBAL VARIABLES


    This variable contains the latitude in degrees for the center of the scenario.

    extern double CONVERT_ctrlat;


    This variable contains the longitude in degrees for the center of the scenario.

    extern double CONVERT_ctrlon;


    This variable contains the radius of the earth in meters.

    extern double CONVERT_EarthRadius;


    This variable is a memory manager for allocating/dealocating linetype and labeltype.

    extern vmem_manager vmemman;


    This variable contains the name for the terrain database.

    extern string_type terrain_name;


    This variable contains the distance of the camera to an attached object.

    extern double camera_dist;


    This variable contains the vertical difference between the camera to an attached object.

    extern double camera_height;


    This variable contains a rotation offset of the camera to the attached object in a clockwise rotation around the object's up vector.

    extern double camera_azimuth;


    This variable contains the rate of rotation for the camera around an attached object in an "orbit" mode.

    extern double camera_angular_velocity;


    This variable is a toggle flag for fog f/x for the "FOREGROUND", "MIDGROUND", "BACKGROUND".

    extern int local_game_fogflag[3];


    This variable contains the distance from the camera to the front plane of the fog f/x.

    extern double local_game_fog_start;


    This variable contains the distance from the camera to the back plane of the fog f/x.

    extern double local_game_fog_end;


    This variable contains the rgb color of the fog f/x.

    extern vector4uc local_game_fog_color;


    This variable contains the opengl version # to emulate (some systems lie about their versions and/or capabilities).

    extern int openglflag;


    This variable contains the distance to the camera's back plane.

    extern double backplane;


    This variable contains the name of the overlay file to use.

    extern string_type overlay_name;


    This variable contains alpha value of the overlay. Range is from 0..100 where 0 is full transparent and 100 is full color.

    extern int overlay_intensity;


    This variable contains the name of the index file for displaying digital maps.

    extern string_type map_indexname;


    This variable contains a rgb color blend with the digital maps.

    extern vector4uc tile_color;


    This variable contains the controller type (CONTROLMOUSE, CONTROLJOYSTICK, CONTROLKEYBOARD).

    extern int controller;


    This variable contains the speeds for each type of controller.

    extern vector3d controller_speed;


    This variable is a list of symbol correlations between simulation entities and graphical objects, and is usually setup by parse_setup().

    extern symbol_lut_type symbol_lut;


    This variable is a list of colors defined in "rgb.txt" and usually is setup by init_color_lut().

    extern binary_tree colortree;


    This variable contains the security level of the data being displayed, ranging (LEVEL_UNCLASS, LEVEL_SECRET, LEVEL_TOP_SECRET).

    extern unsigned int security_level;


    This variable is a flag that determines the source of the simulation data - shared memory or scramnet.

    extern int scramnet_flag;


    This variable contains the name of the semantic object input file

    extern string_type DATANAME_SEMOBJ;


    This variable contains the name of the setup .ini file

    extern string_type DATANAME_SETUP;