ObjectGuiMesh Class
This class allows to render GUI onto an arbitrary mesh. Unlike ObjectGui, it can be used to create non-flat displays positioned in the world. If the mesh contains several surfaces, the same GUI will be rendered on each of them. Note that the GUI will be rendered according to the UV mapping of surfaces.
The following samples demonstrate the ObjectGuiMesh class usage:
ObjectGuiMesh Class
This class inherits from ObjectMembers
ObjectGuiMesh (string mesh, string name)
Constructor. Creates a new mesh GUI object with given properties.Arguments
- string mesh - Name of the mesh, to which GUI will be added.
- string name - Path to the folder with GUI skin (the RC file and textures).
float getControlDistance ()
Returns the distance, at which the GUI becomes controllable.Return value
Distance in units.Gui getGui ()
Returns a Gui instance associated with the object.Return value
GUI associated with the object.string getMeshName ()
Returns the name of the original mesh file.Return value
Name of the mesh file.int getMouseShow ()
Returns a value indicating if the mouse cursor is rendered in the mesh GUI object.Return value
1 if the cursor is rendered; otherwise, 0.int getScreenHeight ()
Returns the screen height of the mesh GUI object.Return value
Height in pixels.int getScreenWidth ()
Returns the screen width of the mesh GUI object.Return value
Width in pixels.void setControlDistance (float distance)
Sets a distance, at which the GUI becomes controllable.Arguments
- float distance - New distance in units.
void setMouseShow (int show)
Sets a value indicating if the mouse cursor should be rendered in the mesh GUI object. The default is 1.Arguments
- int show - Positive number to render the mouse cursor; otherwise, 0.
void setScreenSize (int width, int height)
Sets screen dimensions of the mesh GUI object.Arguments
- int width - New width in pixels.
- int height - New height in pixels.
Last update: 2017-07-03
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)