-The Globals are used to access global information within the engine. For example, you can get textures by name, because the globals stores indices for all of the textures that have been created. This makes it easier to keep track of engine resources. There are also some useful utility functions.
VB.NET
' TV Variables Public Globals As TVGlobals ' Create new TVGlobals Object Globals = New TVGlobals
C#
// Declare the TV Objects. public TVGlobals Globals; // Create any other components after TV init. Globals = new TVGlobals();
C++
//todo
| Method | Description |
|---|---|
| Colorkey | Converts a CONST_TV_COLORKEY to an integer. |
| CreateWindowHandle | Creates a new Window Handle that can be used with the engine. |
| DecodeRGBA | Decodes an integer-coded-color to a TVColor Structure. |
| DestroyWindowHandle | Destroys a formerly created window handle. |
| GetActor | Returns the actor object with the specified name. |
| GetActorFromEntityID | Returns the actor object with the specified entity-ID. |
| GetActorFromID | Returns the actor object with the specified engine-ID. |
| GetCamera | Returns the camera object with the specified name. |
| GetCameraFromID | Returns the camera object with the specified engine-ID. |
| GetDataSourceFromFilePart | Returns a Data-ID-String based on a file part that can be used instead of a file path. |
| GetDataSourceFromMemory | Returns a Data-ID-String based on a memory address that can be used instead of a file path. |
| GetIndex | Returns the internal index of the TVGlobals object. |
| GetLandscape | Returns the landscape object with the specified name. |
| GetLandscapeFromID | Returns the landscape object with the specified engine-ID. |
| GetLight | Returns the light object with the specified name. |
| GetMat | Returns the material index with the specified name. |
| GetMesh | Returns the mesh object with the specified name. |
| GetMeshFromEntityID | Returns the mesh object with the specified entity-ID. |
| GetMeshFromID | Returns the mesh object with the specified engine-ID. |
| GetMiniMesh | Returns the mini-mesh object with the specified name. |
| GetMiniMeshFromID | Returns the mini-mesh object with the specified engine-ID. |
| GetNode | Returns the node object with the specified name. |
| GetNodeFromID | Returns the node object with the specified engine-ID. |
| GetParticleSystem | Returns the particlesystem object with the specified name. |
| GetParticleSystemFromID | Returns the particlesystem object with the specified engine-ID. |
| GetRenderSurface | Returns the rendersurface object with the specified name. |
| GetRenderSurfaceFromID | Returns the rendersurface object with the specified engine-ID. |
| GetShader | Returns the shader object with the specified name. |
| GetShaderFromID | Returns the shader object with the specified engine-ID. |
| GetTex | Returns the texture index with the specified name. |
| GetViewport | Returns the viewport object with the specified name. |
| GetViewportFromID | Returns the viewport object with the specified engine-ID. |
| Quaternion | Creates a new TV_3DQUATERNION. |
| RGBA | Creates a new Integer-Coded-Color with per-channel value between 0 and 1 (float). |
| RGBA256 | Creates a new Integer-Coded-Color with per-channel value between 0 and 255 (byte). |
| SetIndex | Sets the internal index (use with caution). |
| SetUserClipPlane | Sets a user defined clipplane. |
| TVColor | Creates a new TV_COLOR. |
| TVPlane | Creates a new TV_PLANE. |
| Vector | Creates a new TV_3DVECTOR. |
| Vector2 | Creates a new TV_2DVECTOR. |
| Vector3 | Creates a new TV_3DVECTOR. |
| Vector4 | Creates a new TV_4DVECTOR. |