gh_utils LibraryDescriptiongh_utils is the module that provides various utility functions. Number of functions: 60
gh_utils.get_platformDescriptionReturns the platform: Windows (1), OSX (2) or Linux (3). LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.get_platform_nameDescriptionReturns the platform name: Windows xx-bit, OS X 10.x, Linux xx-bit, Raspberry Pi. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.is_64bitDescriptionChecks if the host application is a 64-bit or a 32-bit application. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.randomDescriptionReturns a random floating point number between 0.0 and 1.0. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.get_elapsed_timeDescriptionGets the elapsed time since the start of the current scene. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.traceDescriptionWrites a trace in the log file and in the debug window. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.open_urlDescriptionOpen an URL in the default browser. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.raycast_get_rayDescriptionGets a 3D ray from a screen position (mouse for example). LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.raycast_cast_rayDescriptionCasts a ray in the 3D scene and returns collision information (with a mesh). LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.webcam_createDescriptionCreates a new webcam object (Windows only). A max of 8 webcams can be created. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.webcam_killDescriptionKills a webcam object (Windows only). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.webcam_startDescriptionInitializes a webcam (Windows only). LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.webcam_stopDescriptionStops a webcam (Windows only). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.webcam_get_nameDescriptionGets the webcam name, for example: 'Microsoft LifeCam Studio' (Windows only). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.webcam_grab_frameDescriptionUpdates the webcam (Windows only). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.webcam_get_frame_sizeDescriptionGets the size of a frame (Windows only). LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.webcam_update_textureDescriptionUpdates a texture pixmap with the current webcam frame (Windows only). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.font_createDescriptionCreates a new font. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.font_set_viewport_infoDescriptionSets the viewport information. You have to call this function when the window is resized. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.font_renderDescriptionRenders (draws) a text. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.font_render3dDescriptionRenders (draws) a text at a 3D position. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.thread_sleepDescriptionAllows to pause the current thread. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.get_demo_dirDescriptionGets the directory of the current scene file. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.get_host_app_dirDescriptionGets the directory of GLSL Hacker. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.get_scripting_libs_dirDescriptionGets the directory of GLSL Hacker common librairies (Lua and Python) used by demos. The defaulkt location is GLSLHacker/libs/ LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.drop_files_get_num_filesDescriptionWindows only - Returns the number of files that have been dropped on the application. This function is useful in a DRAG_N_DROP script. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.drop_files_get_file_by_indexDescriptionWindows only - Returns the name of a particular file that has been dropped on the application. This function is useful in a DRAG_N_DROP script. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.set_progress_bar_percentDescriptionSets the progress bar size in percent of the current window width. Coupled with gh_renderer.display_progress_bar(), these functions can be used in an INIT script to draw a progress bar while loading data. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.set_progress_bar_captionDescriptionSets the caption (or title) of the progress bar. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.do_screenshotDescriptionDoes a screenshot and write it to a file (JPEG file). LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.exe_scriptDescriptionExecutes a script. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.grid_createDescriptionCreates a grid object. LanguagesLua - Python ParametersThis function has no input parameter(s). Return ValuesCode sample
gh_utils.grid_set_geometry_paramsDescriptionSets grid sizes and subdivisions. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.grid_set_lines_colorDescriptionSets grid color. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.grid_set_main_lines_colorDescriptionSets the color of main lines. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.grid_set_main_x_axis_colorDescriptionSets the color of the main X axis. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.grid_set_main_z_axis_colorDescriptionSets the color of the main Z axis. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.tripod_visualizer_camera_renderDescriptionDraws in a viewport the tripod of a camera. Useful to visualize the current orientation of the camera. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.shared_variable_createDescriptionCreates a named shared variables. Shared variables allow to pass values between two windows or between Lua and Python scripts. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.shared_variable_killDescriptionDestroys a shared variable. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.shared_variable_is_existDescriptionChecks if a shared variable exists. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.shared_variable_set_value_4fDescriptionSets a 4D value. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.shared_variable_get_value_4fDescriptionGets a 4D value. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.shared_variable_set_value_strDescriptionSets a string value. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.shared_variable_get_value_strDescriptionGets a string value. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.dylib_loadDescriptionLoads a dynamic library. Check the forum for more information about loading dynamic libraries LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.dylib_unloadDescriptionunloads a dynamic library. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_startDescriptionCalls the start function of a dynamic library. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_stopDescriptionCalls the stop function of a dynamic library. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_frameDescriptionCalls the frame function of a dynamic library. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_resizeDescriptionCalls the frame function of a dynamic library. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_set_messageDescriptionSets a message. Allows to communicate with the dylib. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.dylib_set_messageDescriptionGets a message. Allows to communicate with the dylib. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.ftgl_font_texture_loadDescriptionLoads a font texture from a true type font (TTF) file. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.ftgl_font_createDescriptionCreates a font object from a font texture. LanguagesLua - Python ParametersReturn ValuesCode sample
gh_utils.ftgl_font_add_text2dDescriptionAdds a 2D text in a font. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.ftgl_font_clearDescriptionClears all 2D texts in a font. Useful with dynamic texts LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.ftgl_font_renderDescriptionRenders a 2D font. LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.ftgl_font_killDescriptionKills a font (TERMINATE script) LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
gh_utils.ftgl_font_texture_killDescriptionKills a font texture (TERMINATE script) LanguagesLua - Python ParametersReturn ValuesThis function has no return value(s). Code sample
2013-2015 Geeks3D. All Rights Reserved. .:- G3D Network -:. |