The following group of functions allow for the OpenVSP GUI to be manipulated through the API. Click here to return to the main page. More...
Functions | |
| void | vsp::InitGUI () |
| void | vsp::StartGUI () |
| void | vsp::EnableStopGUIMenuItem () |
| void | vsp::DisableStopGUIMenuItem () |
| void | vsp::StopGUI () |
| void | vsp::PopupMsg (const std::string &msg) |
| void | vsp::UpdateGUI () |
| bool | vsp::IsGUIBuild () |
| void | vsp::Lock () |
| void | vsp::Unlock () |
| bool | vsp::IsEventLoopRunning () |
| void | vsp::ScreenGrab (const std::string &fname, int w, int h, bool transparentBG, bool autocrop=false) |
| void | vsp::VectorScreenGrab (const std::string &fname, int filetype=VEC_SVG, bool autocrop=false, bool scaletopage=false, double pagewidth=4.0, double pageheight=3.0, int pageunits=LEN_IN) |
| void | vsp::SetViewAxis (bool vaxis) |
| void | vsp::SetShowBorders (bool brdr) |
| void | vsp::SetGeomDrawType (const std::string &geom_id, int type) |
| void | vsp::SetGeomWireColor (const std::string &geom_id, int r, int g, int b) |
| void | vsp::SetGeomDisplayType (const std::string &geom_id, int type) |
| int | vsp::GetGeomDrawType (const std::string &geom_id) |
| int | vsp::GetGeomDisplayType (const std::string &geom_id) |
| std::vector< vec3d > | vsp::GetGeomDisplayTessPnts (const std::string &geom_id, int surf_index) |
| vec3d | vsp::GetGeomWireColor (const std::string &geom_id) |
| std::string | vsp::GetGeomMaterialName (const std::string &geom_id) |
| void | vsp::AddMaterial (const std::string &name, const vec3d &ambient, const vec3d &diffuse, const vec3d &specular, const vec3d &emissive, const double &alpha, const double &shininess) |
| std::vector< std::string > | vsp::GetMaterialNames () |
| int | vsp::GetNumLights () |
| std::string | vsp::FindLight (int index) |
| std::vector< std::string > | vsp::GetLightIDVec () |
| void | vsp::SetBackground (double r, double g, double b) |
| void | vsp::SetAllViews (int view) |
| void | vsp::SetView (int viewport, int view) |
| void | vsp::FitAllViews () |
| void | vsp::ResetViews () |
| void | vsp::SetWindowLayout (int r, int c) |
| void | vsp::SetGUIElementDisable (int e, bool state) |
| void | vsp::SetGUIScreenDisable (int s, bool state) |
| void | vsp::SetGeomScreenDisable (int s, bool state) |
| void | vsp::HideScreen (int s) |
| void | vsp::ShowScreen (int s) |
|
extern |
Set the visualization material the specified geometry
| [in] | name | string Material name |
| [in] | ambient | vec3d Ambient color RGB triple on scale [0, 255] |
| [in] | diffuse | vec3d Diffuse color RGB triple on scale [0, 255] |
| [in] | specular | vec3d Specular color RGB triple on scale [0, 255] |
| [in] | emissive | vec3d Emissive color RGB triple on scale [0, 255] |
| [in] | shininess | double Shininess exponent on scale [0, 127] |
| [in] | alpha | double Transparency factor on scale [0, 1] |
|
extern |
Disable Stop GUI Menu Item from the OpenVSP GUI.
This reverses the operation of EnableStopGUIMenuItem.
|
extern |
Enable Stop GUI Menu Item from the OpenVSP GUI.
Typically used for the blocking-mode OpenVSP GUI from the API.
This will add a "Stop GUI" option to the file pulldown menu and will also cause the exit button on the window frame to have the same effect. When selected, these options will stop the OpenVSP GUI event loop, returning control to the API program. OpenVSP will not terminate, the model will remain in memory and will be responsive to subsequent API calls.
|
extern |
Get the ID of a light, so that its Parms can be reached the way any other container's are. A light has an ActiveFlag, a position and ambient, diffuse and specular strengths, all in Parm group "Light_Parm".
| [in] | index | int Light index |
|
extern |
Fit contents to all viewports
|
extern |
Get the points of one surface of a Geom as its display type sets them. In Bezier display these are the points of its tessellation, patch by patch and row by row. In the degen display types they are the points of the surface's DegenGeom preview, row by row, from which the plate and camber displays are drawn too; a surface without a preview, such as a propeller's disk, gives none. The surfaces include the symmetric copies, numbered as for the Geom's other surface queries. The points reflect the last Update, which makes the tessellation of the display type that is set.
| [in] | geom_id | string Geom ID |
| [in] | surf_index | int Index of the surface, from 0 to the total number of surfaces - 1 |
|
extern |
Get the display type of the specified geometry
| [in] | geom_id | string Geom ID |
|
extern |
Set the visualization material the specified geometry
| [in] | geom_id | string Geom ID |
| [in] | name | string Material name |
Get the draw type of the specified geometry
| [in] | geom_id | string Geom ID |
|
extern |
Get the name of the visualization material applied to the specified geometry
| [in] | geom_id | string Geom ID |
|
extern |
Get the wireframe color of the specified geometry. The color components are returned in the X, Y and Z members of the vector as red, green and blue over the range [0, 255].
| [in] | geom_id | string Geom ID |
|
extern |
Get the IDs of the lights, in the order of their indexes.
|
extern |
Get the names of all visualization materials
|
extern |
Get the number of lights in the model. The count is fixed: a model always has the same lights, each one either active or not.
|
extern |
Hide an OpenVSP GUI screen
| [in] | s | int GUI_VSP_SCREEN enum for screen |
|
extern |
Low level routine that should be called to set up GUI before running StartGUI()
|
extern |
Test if the OpenVSP GUI event loop is running.
|
extern |
Test if the current OpenVSP build includes graphics capabilities.
|
extern |
Obtain the lock on the OpenVSP GUI event loop. This will prevent the interactive GUI from updating or accepting user input until the lock is released – thereby allowing longer-time commands including analyses to execute without the chance of the OpenVSP state changing during execution.
|
extern |
|
extern |
Reset views of all viewports
|
extern |
Capture the specified screen and save to file. Note, VSP_USE_FLTK must be defined
| [in] | fname | string Output file name |
| [in] | w | int Width of screen grab |
| [in] | h | int Height of screen grab |
| [in] | transparentBG | bool Transparent background flag |
| [in] | autocrop | bool Automatically crop transparent background flag |
|
extern |
Set the view of all viewports
| [in] | view | int CAMERA_VIEW enum |
|
extern |
Set the background color
| [in] | r | double Red 8-bit unsigned integer (range: 0-255) |
| [in] | g | double Green 8-bit unsigned integer (range: 0-255) |
| [in] | b | double Blue 8-bit unsigned integer (range: 0-255) |
|
extern |
Set the display type of the specified geometry. Refused for a Clone that has an original, which is shown the way its original is.
| [in] | geom_id | string Geom ID |
| [in] | type | int Display type enum (i.e. DISPLAY_BEZIER) |
|
extern |
Set the draw type of the specified geometry
| [in] | geom_id | string Geom ID |
| [in] | type | int Draw type enum (i.e. GEOM_DRAW_SHADE) |
|
extern |
Set whether geom screen is disabled
| [in] | s | int GUI_GEOM_SCREEN enum for geom screen |
| [in] | state | bool True to disable geom screen |
|
extern |
Set the wireframe color of the specified geometry
| [in] | geom_id | string Geom ID |
| [in] | r | int Red component of color [0, 255] |
| [in] | g | int Green component of color [0, 255] |
| [in] | b | int Blue component of color [0, 255] |
|
extern |
Set whether all instances of GUI device type are disabled
| [in] | e | int GDEV enum for GUI device type |
| [in] | state | bool True to disable GUI device type |
|
extern |
Set whether screen is disabled
| [in] | s | int GUI_VSP_SCREEN enum for screen |
| [in] | state | bool True to disable screen |
|
extern |
Toggle viewing the border frame
| [in] | brdr | bool True to show the border frame, false to hide the border frame |
|
extern |
Set the view of a particular viewports
| [in] | viewport | int Viewport to set view |
| [in] | view | int CAMERA_VIEW enum |
|
extern |
Toggle viewing the axis
| [in] | vaxis | bool True to show the axis, false to hide the axis |
|
extern |
Set the rows and columns of the window layout
| [in] | r | int Number of viewport rows |
| [in] | c | int Number of viewport columns |
|
extern |
Show an OpenVSP GUI screen
| [in] | s | int GUI_VSP_SCREEN enum for screen |
|
extern |
Launch the interactive OpenVSP GUI. In a multi-threaded environment, this must be called from the main thread only. This starts the GUI event loop. It will also show the main screen and screens displayed when StopGUI() was previously called.
|
extern |
Stop OpenVSP GUI event loop and hide screens. Keep OpenVSP running and in memory.
|
extern |
Release the lock on the OpenVSP GUI event loop.
|
extern |
Tell OpenVSP that the GUI needs to be updated.
|
extern |
Write the main window as a vector drawing, of every viewport of the layout, without the background, in the file type given, SVG or PDF. The file name is used as given; no extension is added. A pixel of the window is a point on the page, or with scaletopage the window is scaled, its aspect kept, to fit a page of the width and height given, in millimeters, centimeters, meters or inches; without scaletopage the page arguments are ignored. With autocrop the page is cropped to what is drawn, at the same scale. Textures and 3D backgrounds are left out. The drawing reflects the model as of the last Update. It needs the GUI to be running, and does nothing otherwise. Note, VSP_USE_FLTK must be defined
| [in] | fname | string Output file name |
| [in] | filetype | int File type enum (i.e. VEC_SVG) |
| [in] | autocrop | bool Crop the page to what is drawn flag |
| [in] | scaletopage | bool Scale the window to fit the page flag |
| [in] | pagewidth | double Page width |
| [in] | pageheight | double Page height |
| [in] | pageunits | int Page length unit enum, LEN_MM to LEN_IN (i.e. LEN_IN) |