### Cache Global Variables for Performance (C#)
Source: https://space928.github.io/Omsi-Extensions/articles/examples/basic-cli
This example shows how to efficiently cache top-level global variables from the OMSIHook library outside of a loop for optimized performance. Cached variables include player vehicle, time, map, and weather.
```csharp
// Cache global variables for faster access
var playerVehicle = omsi.Globals.PlayerVehicle;
var time = omsi.Globals.Time;
var map = omsi.Globals.Map;
var weather = omsi.Globals.Weather;
```
--------------------------------
### Basic Event Handling
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
Demonstrates the basic usage of OMSIHook event handlers in a C# .NET application.
```APIDOC
## Basic Usage of OMSIHook Events
This section shows how to subscribe to various events provided by the OMSIHook library.
### Method
Event Subscription
### Endpoint
N/A
### Parameters
None
### Request Example
```csharp
OmsiHook.OmsiHook omsi = new();
omsi.OnMapChange += Omsi_OnMapChange;
omsi.OnMapLoaded += Omsi_OnMapLoaded;
omsi.OnActiveVehicleChanged += Omsi_OnActiveVehicleChanged;
omsi.OnOmsiExited += Omsi_OnOmsiExited;
omsi.OnOmsiGotD3DContext += Omsi_OnOmsiGotD3DContext;
omsi.OnOmsiLostD3DContext += Omsi_OnOmsiLostD3DContext;
```
### Response
No direct response, event handlers are invoked when events occur.
```
--------------------------------
### Event Descriptions
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
Detailed descriptions of each event provided by OMSIHook and their respective event arguments.
```APIDOC
## Event Descriptions
This section details each event available in the OMSIHook library.
### _MapChange_ Event
- **Description**: Triggered any time the current map has changed.
- **Handler Signature**: `Omsi_OnMapChange(object? sender, OmsiMap e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (OmsiMap): A reference to the new `OmsiMap` object or `null`.
### _MapLoaded_ Event
- **Description**: Triggered any time a map is loaded or unloaded.
- **Handler Signature**: `Omsi_OnMapLoaded(object? sender, bool e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (bool): `true` if the event is for a map loading, `false` if for unloading.
### _ActiveVehicleChanged_ Event
- **Description**: Triggered any time a player changes vehicle.
- **Handler Signature**: `Omsi_OnActiveVehicleChanged(object? sender, OmsiRoadVehicleInst e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (OmsiRoadVehicleInst): A reference to the current player vehicle instance.
### _OmsiExited_ Event
- **Description**: Triggered upon OMSI exiting.
- **Handler Signature**: `Omsi_OnOmsiExited(object? sender, EventArgs e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (EventArgs): Not used for this event.
### _OmsiGotD3DContext_ Event
- **Description**: Triggered upon OMSI's Direct3D context being initialised.
- **Handler Signature**: `Omsi_OnOmsiGotD3DContext(object? sender, EventArgs e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (EventArgs): Not used for this event.
### _OmsiLostD3DContext_ Event
- **Description**: Triggered upon OMSI's Direct3D context being lost.
- **Handler Signature**: `Omsi_OnOmsiLostD3DContext(object? sender, EventArgs e)`
- **Parameters**:
- `sender` (object): The current OMSIHook object.
- `e` (EventArgs): Not used for this event.
```
--------------------------------
### C# .NET: OMSIHook OmsiGotD3DContext Event Handler
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
An example of a C# .NET event handler for the `OnOmsiGotD3DContext` event in OMSIHook. This event is fired when OMSI's Direct3D context is successfully initialized. The handler receives the OMSIHook object, and the EventArgs object is unused.
```csharp
void Omsi_OnOmsiGotD3DContext(object? sender, EventArgs e)
{
// Handle D3D context initialized logic here
// 'e' is not used for this event
}
```
--------------------------------
### C# .NET: OMSIHook MapChange Event Handler
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
Example of a C# .NET event handler for the `OnMapChange` event in OMSIHook. This function is triggered whenever the current map in OMSI changes. It receives the OMSIHook object and a reference to the new `OmsiMap` object, which can be null if no map is loaded.
```csharp
void Omsi_OnMapChange(object? sender, OmsiMap e)
{
// Handle map change logic here
// 'e' can be null if no map is loaded
}
```
--------------------------------
### Property Declaration: StartTime (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiSound.StartTime
Declares the public uint property 'StartTime' in C# for OmsiHook. This property is used to get and set the start time, represented as an unsigned 32-bit integer.
```csharp
public uint StartTime { get; set; }
```
--------------------------------
### Example OPL File Configuration
Source: https://space928.github.io/Omsi-Extensions/articles/building-native-plugins
This snippet shows a sample `.opl` file used to configure Omsi plugins. It specifies the DLL to load and lists the Omsi variables, string variables, and system variables the plugin will access, along with any triggers it will use. The `[dll]` tag is mandatory.
```ini
[dll]
OmsiHookPluginNE.dll
[varlist]
1
door_0
[stringvarlist]
3
INEO_DataTransferVehicleNumber
INEO_DataTransferDelay
INEO_DataTransferPassengerCount
[systemvarlist]
4
Time
Day
Month
Year
[triggers]
1
bus_doorfront0
```
--------------------------------
### Initialize OmsiHook and Attach to OMSI (C#)
Source: https://space928.github.io/Omsi-Extensions/articles/examples/basic-cli
This code snippet demonstrates how to initialize an instance of the OmsiHook class and establish a connection to the OMSI game. It is a fundamental step for interacting with the OMSIHook library.
```csharp
OmsiHook.OmsiHook omsi = new();
omsi.AttachToOMSI().Wait();
```
--------------------------------
### Declare StartOffsetY Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPathSegment.StartOffsetY
The StartOffsetY property is a public float accessible for getting and setting its value. It is part of the OmsiHook library and is used to define an offset in the Y-axis for a starting point.
```csharp
public float StartOffsetY { get; set; }
```
--------------------------------
### Declare StartZ Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiFileSpline.StartZ
This C# code snippet declares the 'StartZ' property, which is a public float accessor. It is used to get and set the Z-coordinate value, likely for defining a starting point in a 3D space within the OmsiHook system. No external dependencies are noted for this basic property declaration.
```csharp
public float StartZ { get; set; }
```
--------------------------------
### OmsiHook Field: stnlinks_starting
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiTTBusstopListEntry.stnlinks_starting
Details about the `stnlinks_starting` field within the OmsiHook namespace.
```APIDOC
## Field stnlinks_starting
### Description
Represents an array of integers related to starting station links.
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```csharp
public int[] stnlinks_starting
```
### Returns
- **System.Int32[]** - An array of integers representing station links.
```
--------------------------------
### Define Public Integer Field 'start' in OmsiHook
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHolidays.start
This C# code defines a public integer field named 'start' within the OmsiHook namespace. It is part of the OmsiHook.dll assembly and is intended to represent an integer value, likely for starting points or status indicators. No specific dependencies are noted for this field definition.
```csharp
public int start
```
--------------------------------
### Configure Video Playback Constants in C#
Source: https://space928.github.io/Omsi-Extensions/articles/examples/video-demo
Sets up essential configuration constants for the video playback demo. This includes the path to the video file, the directory containing FFmpeg binaries, and the index of the Script Texture to be updated. Ensure FFmpeg binaries are compiled for Win32 with shared libraries.
```csharp
const string VIDEO_PATH = @"sample.mp4"; // Path/URL to the video file
const string FFMPEG_PATH = @"ffmpeg-shared\bin"; // Path to your FFmpeg binaries
const int ST_INDEX = 0; // The index of the Script Texture to replace
```
--------------------------------
### Tutorial_Created Property
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHumanBeingInst.Tutorial_Created
Details about the Tutorial_Created boolean property.
```APIDOC
## Tutorial_Created Property
### Description
Represents whether a tutorial has been created.
### Method
N/A (This is a property, not an endpoint)
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
#### Property Value
- **System.Boolean** (bool) - Indicates if the tutorial has been created.
```
--------------------------------
### Get and Set LastMoment Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPhysObjInst.LastMoment
The LastMoment property is a D3DVector used to store or retrieve the last moment value. It is accessible for both getting and setting its value.
```csharp
public D3DVector LastMoment { get; set; }
```
--------------------------------
### Declare Filename Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DMeshFileObject.Filename
This C# code snippet shows the declaration of the public string Filename property. It supports both getting and setting the filename, indicated by the { get; set; } syntax. This property is fundamental for managing file-related operations within OmsiHook.
```csharp
public string Filename { get; set; }
```
--------------------------------
### Property StartPnt
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiFileSpline.StartPnt
Documentation for the StartPnt property within OmsiHook.
```APIDOC
## Property StartPnt
### Description
Represents the starting point for a D3DVector.
### Method
GET, SET
### Endpoint
N/A (Property of a class)
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
```json
{
"StartPnt": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
}
```
### Response
#### Success Response (200)
- **StartPnt** (D3DVector) - The starting point vector.
#### Response Example
```json
{
"StartPnt": {
"x": 10.5,
"y": -5.2,
"z": 0.0
}
}
```
```
--------------------------------
### C# .NET: OMSIHook ActiveVehicleChanged Event Handler
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
An example of a C# .NET event handler for the `OnActiveVehicleChanged` event in OMSIHook. This event fires when the player switches vehicles. The handler receives the OMSIHook object and a reference to the `OmsiRoadVehicleInst` of the newly active vehicle.
```csharp
void Omsi_OnActiveVehicleChanged(object? sender, OmsiRoadVehicleInst e)
{
// Handle active vehicle changed logic here
// 'e' is the instance of the new active vehicle
}
```
--------------------------------
### Play OMSI Sound Trigger (C#)
Source: https://space928.github.io/Omsi-Extensions/articles/examples/triggers-sample
This C# code snippet shows how to use the OMSIHook library's SoundTrigger() method to play a sound file. It requires the sound's name as defined in sound.cfg and its file path.
```csharp
playerVehicle.SoundTrigger("ev_IBIS_Ansagen", @"..\..\MAN_NL_NG\Sound\Matrix_Ziel.wav");
```
--------------------------------
### OmsiSound Class Overview
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiSound
Provides an overview of the OmsiSound class, including its inheritance, namespace, assembly, and a list of its constructors and properties.
```APIDOC
## OmsiSound Class
Sound that is playable by OMSI.
### Inheritance
System.Object
OmsiObject
OmsiSound
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```csharp
public class OmsiSound : OmsiObject
```
### Constructors
#### OmsiSound()
- **Description**: Initializes a new instance of the `OmsiSound` class.
### Properties
- **BoolClass** (Type: unknown) - Description:
- **BufferSize** (Type: unknown) - Description:
- **CheckLoading** (Type: unknown) - Description:
- **Device** (Type: IDirectSound8*) - Description: Pointer to an IDirectSound8
- **Dir** (Type: unknown) - Description:
- **Failed** (Type: unknown) - Description:
- **FileName** (Type: unknown) - Description:
- **Flag_Viewpoint** (Type: unknown) - Description:
- **FreqVar** (Type: unknown) - Description:
- **FX_Hall** (Type: IDirectSoundFXWavesReverb8*) - Description: Pointer to an IDirectSoundFXWavesReverb8
- **FX_Hall_Gain** (Type: unknown) - Description:
- **FX_Hall_Time** (Type: unknown) - Description:
- **HasDir** (Type: unknown) - Description:
- **Important** (Type: unknown) - Description:
- **Int3D** (Type: IDirectSound3DBuffer*) - Description: Pointer to an IDirectSound3DBuffer
- **InternVars** (Type: unknown) - Description:
- **Is3D** (Type: unknown) - Description:
- **Loop** (Type: unknown) - Description:
- **MayPlay** (Type: unknown) - Description:
- **OnlyOne** (Type: unknown) - Description:
- **OnlyOne_Verbot** (Type: unknown) - Description: Only One _ Prohibition?
- **Pitch** (Type: unknown) - Description:
- **Playing** (Type: unknown) - Description:
- **Prev_Volume** (Type: unknown) - Description:
- **RefValue** (Type: unknown) - Description:
- **SampleRate** (Type: unknown) - Description:
- **SndPos** (Type: unknown) - Description:
- **SoundBuffer** (Type: IDirectSoundBuffer8*) - Description: Pointer to an IDirectSoundBuffer8
- **StartTime** (Type: unknown) - Description:
- **StartTrigSnd** (Type: unknown) - Description:
- **Stopped_TooFar** (Type: unknown) - Description:
- **Triggered** (Type: unknown) - Description:
- **TriggerList** (Type: unknown) - Description:
- **VolCurves** (Type: unknown) - Description:
- **VolDist** (Type: unknown) - Description:
- **VolFaktor** (Type: unknown) - Description:
- **VolVars** (Type: unknown) - Description:
```
--------------------------------
### Property Height
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTexture.Height
Gets the height of the texture.
```APIDOC
## Property Height
### Description
Gets the height of the texture.
### Method
GET
### Endpoint
/websites/space928_github_io_omsi-extensions/Property/Height
### Parameters
### Request Body
### Request Example
### Response
#### Success Response (200)
- **Height** (System.UInt32) - The height of the texture.
#### Response Example
{
"Height": 1024
}
```
--------------------------------
### Configure .NET Project for DNNE Plugin Exports (.csproj)
Source: https://space928.github.io/Omsi-Extensions/articles/building-native-plugins
This XML configuration snippet is for a .NET project's .csproj file. It sets the Platform Target to x86, enables dynamic loading and DNNE export generation, and configures build properties for DNNE integration with OMSI 2. It also includes a post-build target to copy generated DLLs, OPL, and runtime config files to the OMSI 2 plugins directory.
```xml
x86
true
true
true
low
false
true
win-x86
false
```
--------------------------------
### Constructor MemArray
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArray-2.-ctor
Documentation for the MemArray constructor.
```APIDOC
## Constructor MemArray
### Description
Initializes a new instance of the MemArray class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
#### Success Response (200)
Initializes the MemArray object.
#### Response Example
None
```
--------------------------------
### Get Humans List
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiGlobals.Humans
Retrieves a list of all human beings present in the Omsi scene.
```APIDOC
## Get Humans List
### Description
Retrieves a list of all human beings present in the Omsi scene.
### Method
GET
### Endpoint
/websites/space928_github_io_omsi-extensions/api/humans
### Parameters
#### Query Parameters
None
### Request Example
None
### Response
#### Success Response (200)
- **Humans** (OmsiHumanBeingInst[]) - An array of OmsiHumanBeingInst objects representing the humans in the scene.
#### Response Example
```json
{
"Humans": [
{
"name": "John Doe",
"id": "123e4567-e89b-12d3-a456-426614174000"
},
{
"name": "Jane Smith",
"id": "987e6543-e21b-32d1-a098-765432101234"
}
]
}
```
```
--------------------------------
### OmsiPartikel Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPartikel.-ctor
Documentation for the OmsiPartikel constructor.
```APIDOC
## OmsiPartikel()
### Description
Initializes a new instance of the OmsiPartikel class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
```
new OmsiPartikel()
```
### Response
#### Success Response (N/A)
Initializes an OmsiPartikel object.
#### Response Example
```json
{
"message": "OmsiPartikel object created"
}
```
```
--------------------------------
### OmsiHookD3D Method
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiRemoteMethods.OmsiHookD3D
Attempts to get the current D3D context from Omsi. This is a prerequisite for calling any graphics-related methods.
```APIDOC
## OmsiHookD3D
### Description
Attempts to get the current D3D context from Omsi. This method must be called successfully before any other graphics methods can be used.
### Method
`OmsiHookD3D()`
### Endpoint
N/A (This is a method call within the OmsiHook library, not a REST API endpoint)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response
- **System.Boolean** - Returns `true` if the D3D context was successfully obtained, otherwise `false`.
#### Response Example
```json
{
"success": true
}
```
```
--------------------------------
### KI_Target_Pos_Global Property
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHumanBeingInst.KI_Target_Pos_Global
Documentation for the KI_Target_Pos_Global property, used to get or set the global target position.
```APIDOC
## KI_Target_Pos_Global Property
### Description
Represents the global target position.
### Method
Get/Set
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
#### Success Response (200)
- **KI_Target_Pos_Global** (D3DVector) - The global target position.
#### Response Example
```json
{
"KI_Target_Pos_Global": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
}
```
```
--------------------------------
### OmsiString Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiString.-ctor
Documentation for the OmsiString constructor.
```APIDOC
## Constructor OmsiString
### Description
Initializes a new instance of the `OmsiString` class with a specified string.
### Method
Constructor
### Parameters
#### Request Body
- **s** (System.String) - Required - The string value for the OmsiString.
### Request Example
```json
{
"s": "example string"
}
```
### Response
#### Success Response (200)
An instance of the `OmsiString` class is created.
#### Response Example
```json
{
"message": "OmsiString created successfully"
}
```
```
--------------------------------
### CreateFromExisting Method
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTexture.CreateFromExisting
Initializes a D3DTexture from an existing IDirect3DTexture9. Allows for optional initialization for writing.
```APIDOC
## CreateFromExisting Method
### Description
Initialises this D3DTexture from an existing `IDirect3DTexture9`. Allows for optional initialization for writing.
### Method
`public async Task CreateFromExisting(uint address, bool initialiseForWriting = true)`
### Parameters
#### Path Parameters
- None
#### Query Parameters
- None
#### Request Body
- None
### Request Example
```json
{
"address": 123456789,
"initialiseForWriting": true
}
```
### Response
#### Success Response (200)
- **Task** (Task) - Indicates the completion of the asynchronous operation.
#### Response Example
```json
{
"status": "success"
}
```
```
--------------------------------
### Get Kacheln
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiMap.Kacheln
Retrieves the array of Kacheln (tiles) available in the OmsiHook system. Each Kachel represents a map tile.
```APIDOC
## GET /websites/space928_github_io_omsi-extensions/Kacheln
### Description
Retrieves an array of OmsiMapKachel objects representing the available map tiles.
### Method
GET
### Endpoint
/websites/space928_github_io_omsi-extensions/Kacheln
### Parameters
#### Query Parameters
None
### Request Example
```json
{}
```
### Response
#### Success Response (200)
- **Kacheln** (OmsiMapKachel[]) - An array of OmsiMapKachel objects.
#### Response Example
```json
{
"Kacheln": [
{
"property_name": "value",
"another_property": "another_value"
}
]
}
```
```
--------------------------------
### OmsiComplMapObj Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiComplMapObj.-ctor
Initializes a new instance of the OmsiComplMapObj class.
```APIDOC
## OmsiComplMapObj()
### Description
Initializes a new instance of the OmsiComplMapObj class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
#### Success Response (200)
N/A
#### Response Example
None
```
--------------------------------
### MemArrayString CopyTo Method (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArrayString
Copies the entire MemArrayString to a compatible one-dimensional array, starting at the specified index of the destination array.
```csharp
public void CopyTo(string[] array, int arrayIndex)
```
--------------------------------
### C# .NET: Subscribing to OMSIHook Events
Source: https://space928.github.io/Omsi-Extensions/articles/examples/event-sample
This snippet shows how to subscribe to various events provided by the OMSIHook library in C#. It demonstrates appending event handlers to the OMSIHook instance to react to map changes, vehicle changes, and OMSI application events. Ensure the OMSIHook library is correctly referenced in your project.
```csharp
OmsiHook.OmsiHook omsi = new();
omsi.OnMapChange += Omsi_OnMapChange;
omsi.OnMapLoaded += Omsi_OnMapLoaded;
omsi.OnActiveVehicleChanged += Omsi_OnActiveVehicleChanged;
omsi.OnOmsiExited += Omsi_OnOmsiExited;
omsi.OnOmsiGotD3DContext += Omsi_OnOmsiGotD3DContext;
omsi.OnOmsiLostD3DContext += Omsi_OnOmsiLostD3DContext;
```
--------------------------------
### Get ScreenRect Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiProgMan.ScreenRect
Retrieves the ScreenRect property, which returns an OmsiObjBlackRect object representing a rectangle on the screen. This property is read-only.
```csharp
public OmsiObjBlackRect ScreenRect { get; }
```
--------------------------------
### OmsiComplObj Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiComplObj.-ctor
Documentation for the OmsiComplObj constructor.
```APIDOC
## Constructor OmsiComplObj
### Description
Initializes a new instance of the OmsiComplObj class.
### Method
```
public OmsiComplObj()
```
### Endpoint
N/A (Constructor)
### Parameters
None
### Request Example
N/A
### Response
#### Success Response (Constructor)
Initializes an OmsiComplObj object.
#### Response Example
N/A
```
--------------------------------
### Get Property Count - C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArrayBase-1.Count
Retrieves the count of a property. This is a read-only property returning an integer. It does not have explicit dependencies mentioned beyond the OmsiHook context.
```csharp
public int Count { get; }
```
--------------------------------
### Property Alpha_Initial
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPartikelEmitter.Alpha_Initial
Documentation for the Alpha_Initial property.
```APIDOC
## Property Alpha_Initial
### Description
Represents the initial alpha value.
### Method
N/A (Property)
### Endpoint
N/A (Property)
### Parameters
N/A (Property)
### Request Example
N/A (Property)
### Response
#### Success Response (200)
- **Alpha_Initial** (System.Single) - The initial alpha value.
#### Response Example
```json
{
"Alpha_Initial": 0.5
}
```
```
--------------------------------
### C# MemArray CopyTo Method
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArray-2
Copies the entire MemArray to a compatible one-dimensional array, starting at the specified index. This is useful for bulk data transfer.
```csharp
public void CopyTo(Struct[] array, int arrayIndex)
```
--------------------------------
### OmsiConstBlock Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiConstBlock.-ctor
Documentation for the OmsiConstBlock constructor.
```APIDOC
## OmsiConstBlock()
### Description
Constructor for the OmsiConstBlock class.
### Method
constructor
### Endpoint
N/A
### Parameters
None
### Request Example
N/A
### Response
#### Success Response (N/A)
N/A
#### Response Example
N/A
```
--------------------------------
### Property Prepared_For_Ode
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiMapKachel.Prepared_For_Ode
Documentation for the 'Prepared_For_Ode' property.
```APIDOC
## Property Prepared_For_Ode
### Description
Represents whether the object is prepared for Ode.
### Method
N/A (This is a property)
### Endpoint
N/A (This is a property)
### Parameters
N/A
### Request Example
N/A
### Response
#### Success Response (200)
- **Prepared_For_Ode** (System.Boolean) - Indicates if the object is prepared for Ode.
#### Response Example
```json
{
"Prepared_For_Ode": true
}
```
```
--------------------------------
### CamPosDiff Property Declaration (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiWeather.CamPosDiff
The CamPosDiff property is declared in C# and is of type D3DVector. It allows for getting and setting the camera position difference.
```csharp
public D3DVector CamPosDiff { get; set; }
```
--------------------------------
### MemArrayBase Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArrayBase-1.-ctor
Documentation for the constructor of the MemArrayBase class.
```APIDOC
## MemArrayBase()
### Description
Constructor for the MemArrayBase class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
None
```
--------------------------------
### DriverMatrix Property Declaration (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiVehicleInst.DriverMatrix
This snippet shows the C# declaration for the DriverMatrix property. It is of type D3DMatrix and supports both getting and setting its value.
```csharp
public D3DMatrix DriverMatrix { get; set; }
```
--------------------------------
### Declare AI_Scheduled_TourEntry Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiVehicleInst.AI_Scheduled_TourEntry
This C# code snippet shows the declaration of the AI_Scheduled_TourEntry property. It is of type System.Int32 and is accessible for getting and setting its value.
```csharp
public int AI_Scheduled_TourEntry { get; set; }
```
--------------------------------
### Initialize OmsiBoolClass Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiBoolClass.-ctor
This snippet shows the declaration of the default constructor for the OmsiBoolClass. It takes no arguments and is used to create a new instance of the OmsiBoolClass. No specific dependencies are mentioned.
```java
public OmsiBoolClass()
```
--------------------------------
### Declare SndPos Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiSound.SndPos
This snippet shows the declaration of the SndPos property in C#. It is of type D3DVector and supports both getting and setting its value.
```csharp
public D3DVector SndPos { get; set; }
```
--------------------------------
### Declare Tutorial_Created Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHumanBeingInst.Tutorial_Created
The Tutorial_Created property is a public boolean accessor that allows for setting and getting the creation status of a tutorial. It is part of the OmsiHook system, likely used to track tutorial progression or initialization.
```csharp
public bool Tutorial_Created { get; set; }
```
--------------------------------
### Declare and Use M_Vert Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPhysObjInst.M_Vert
This snippet shows the declaration of the public float M_Vert property, which can be get and set. It is of type System.Single.
```csharp
public float M_Vert { get; set; }
```
--------------------------------
### OmsiCoordSystem Constructor (Java)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiCoordSystem.-ctor
Initializes a new OmsiCoordSystem object. This constructor does not take any arguments and sets up the default coordinate system. No external dependencies are required for its basic instantiation.
```Java
public OmsiCoordSystem()
```
--------------------------------
### OmsiTimeTableMan Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiTimeTableMan.-ctor
Documentation for the OmsiTimeTableMan constructor.
```APIDOC
## Constructor OmsiTimeTableMan
### Description
Initializes a new instance of the OmsiTimeTableMan class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Get useEnvirReflx Field (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiMaterialProp.useEnvirReflx
Retrieves the value of the 'useEnvirReflx' boolean field. This field is part of the OmsiHook library and is used for environment reflection.
```csharp
public bool useEnvirReflx
```
--------------------------------
### Access stnlinks_starting Field (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiTTBusstopListEntry.stnlinks_starting
This C# code demonstrates how to access the public integer array field 'stnlinks_starting' within the OmsiHook namespace. This field is part of the OmsiHook.dll assembly and is used to store starting station links.
```csharp
public int[] stnlinks_starting
```
--------------------------------
### MemArrayList Item Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.MemArrayList-1
Gets or sets the element at the specified index in the MemArrayList. This property allows direct access to elements by their integer index.
```csharp
public T Item[int index] { get; set; }
```
--------------------------------
### Declare CharMatrix Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DMeshObject.CharMatrix
This snippet shows the declaration of the CharMatrix property in C#. It is of type D3DMatrix and can be accessed for getting and setting its value.
```csharp
public D3DMatrix CharMatrix { get; set; }
```
--------------------------------
### Constructor OmsiAnimSubMesh
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiAnimSubMesh.-ctor
Initializes a new instance of the OmsiAnimSubMesh class.
```APIDOC
## Constructor OmsiAnimSubMesh
### Description
Initializes a new instance of the `OmsiAnimSubMesh` class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
#### Success Response (200)
- **instance** (OmsiAnimSubMesh) - A new instance of OmsiAnimSubMesh.
#### Response Example
```javascript
// No direct example, instantiation is implicit
const mesh = new OmsiAnimSubMesh();
```
```
--------------------------------
### Declare AI_Blinker_R Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiVehicleInst.AI_Blinker_R
This C# code snippet declares the AI_Blinker_R property, which is of type System.Single. This property is accessible for getting and setting its value.
```csharp
public float AI_Blinker_R { get; set; }
```
--------------------------------
### OmsiHook Field: start_day
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiMapSeason.start_day
Details about the `start_day` field within the OmsiHook namespace.
```APIDOC
## Field start_day
### Description
Represents the starting day of an event or period.
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```csharp
public short start_day
```
### Returns
- **Type**: `System.Int16` (short)
- **Description**: The numerical representation of the starting day.
```
--------------------------------
### Constructor D3DTransformObject
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTransformObject.-ctor
Documentation for the D3DTransformObject constructor.
```APIDOC
## Constructor D3DTransformObject
### Description
Initializes a new instance of the D3DTransformObject class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
```json
{
"example": "D3DTransformObject()"
}
```
### Response
#### Success Response (Constructor)
Initializes a D3DTransformObject.
#### Response Example
```json
{
"example": "D3DTransformObject object created"
}
```
```
--------------------------------
### Declare Device Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiSound.Device
This C# code snippet declares the 'Device' property, which is a pointer to an IDirectSound8. It allows for getting and setting the device pointer.
```csharp
public IntPtr Device { get; set; }
```
--------------------------------
### Declare C# Property Z_F
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPhysObj.Z_F
This snippet shows the declaration of the public float property Z_F in C#. It allows for getting and setting float values.
```csharp
public float Z_F { get; set; }
```
--------------------------------
### OmsiCamera Constructor
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiCamera.-ctor
Details the OmsiCamera constructor which initializes a new OmsiCamera object.
```APIDOC
## OmsiCamera Constructor
### Description
Initializes a new instance of the OmsiCamera class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
```json
{
"constructor": "OmsiCamera()"
}
```
### Response
#### Success Response (200)
- **instance** (OmsiCamera) - A newly created OmsiCamera object.
#### Response Example
```json
{
"instance": "OmsiCamera object"
}
```
```
--------------------------------
### Declare Blinker Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPathSegment.Blinker
This snippet shows the declaration of the 'Blinker' property in C#. It is of type short (System.Int16) and supports both getting and setting its value.
```csharp
public short Blinker { get; set; }
```
--------------------------------
### Constructor OmsiHOF
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHOF.-ctor
Documentation for the OmsiHOF constructor.
```APIDOC
## Constructor OmsiHOF
### Description
Initializes a new instance of the OmsiHOF class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
None
### Response Example
None
```
--------------------------------
### Constructor OmsiFreeTexInst
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiFreeTexInst.-ctor
Initializes a new instance of the OmsiFreeTexInst class.
```APIDOC
## Constructor OmsiFreeTexInst
### Description
Initializes a new instance of the OmsiFreeTexInst class.
### Method
CONSTRUCTOR
### Endpoint
N/A
### Parameters
None
### Request Example
N/A
### Response
#### Success Response (N/A)
N/A
#### Response Example
N/A
```
--------------------------------
### Declare Alpha_Variation Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPartikelEmitter.Alpha_Variation
This snippet shows the declaration of the 'Alpha_Variation' property in C#. It is a public float property with a get and set accessor, indicating it can be read from and written to.
```csharp
public float Alpha_Variation { get; set; }
```
--------------------------------
### Declare TempAlpha Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPartikel.TempAlpha
The TempAlpha property is a public float accessor in C# for OmsiHook. It allows for getting and setting a single-precision floating-point value.
```csharp
public float TempAlpha { get; set; }
```
--------------------------------
### Constructor OmsiVisu_OBB
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiVisu_OBB.-ctor
This section details the constructor for the OmsiVisu_OBB class.
```APIDOC
## Constructor OmsiVisu_OBB
### Description
Initializes a new instance of the OmsiVisu_OBB class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
None
### Response
#### Success Response (200)
An initialized OmsiVisu_OBB object.
#### Response Example
None
```
--------------------------------
### KMCounter_Init Property Declaration (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiMovingMapObjInst.KMCounter_Init
This snippet shows the declaration of the KMCounter_Init property in C#. It is a public property that can be get and set, with a data type of double.
```csharp
public double KMCounter_Init { get; set; }
```
--------------------------------
### Field x_path_Start
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiTTStnLink.x_path_Start
Details about the x_path_Start field within the OmsiHook namespace.
```APIDOC
## Field x_path_Start
### Description
Represents the starting path coordinate.
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```csharp
public float x_path_Start
```
### Returns
- **Type**: System.Single
- **Description**: The value of the starting path coordinate.
```
--------------------------------
### Declare Human_Main_Matrix Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHumanBeingInst.Human_Main_Matrix
This C# code snippet shows the declaration of the 'Human_Main_Matrix' property. It is of type 'D3DMatrix' and is accessible for both getting and setting its value.
```csharp
public D3DMatrix Human_Main_Matrix { get; set; }
```
--------------------------------
### OmsiTTBusstop Struct
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiTTBusstop
Details about the OmsiTTBusstop structure, its namespace, assembly, syntax, and fields.
```APIDOC
## Struct OmsiTTBusstop
### Description
Represents a bus stop in the Omsi simulation, likely used for tracking and managing bus stop data.
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```
public struct OmsiTTBusstop
```
### Fields
* **dist** (any) - Distance to the bus stop.
* **dist_relPath** (any) - Relative path distance.
* **IDCode_formal** (any) - Formal ID code for the bus stop.
* **IDCode_real** (any) - Real ID code for the bus stop.
* **index** (any) - Index of the bus stop.
* **index_alternatives** (any) - Alternative indices for the bus stop.
* **index_ownList** (any) - Indicates if the bus stop is in its own list.
* **invalid** (any) - Flag indicating if the bus stop is invalid.
* **kachel** (any) - Tile information for the bus stop.
* **name** (any) - Name of the bus stop.
* **name_zusatz** (any) - Supliment / Addition to the bus stop name.
* **pathIndex** (any) - Path index for the bus stop.
* **preset_Aussteiger** (any) - Preset dropouts for the bus stop.
* **trackEntry** (any) - Track entry information.
* **x_path** (any) - X-path coordinate.
```
--------------------------------
### Declare UA_R_Vec Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiHumanBeing.UA_R_Vec
This snippet shows the C# declaration for the UA_R_Vec property. It is a public property that allows getting and setting a D3DVector object.
```csharp
public D3DVector UA_R_Vec { get; set; }
```
--------------------------------
### Sichtwinkel_Render Property Declaration (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiCamera.Sichtwinkel_Render
Declares the 'Sichtwinkel_Render' property, which is of type System.Single and is used to set the Field of View. It allows for both getting and setting the value.
```csharp
public float Sichtwinkel_Render { get; set; }
```
--------------------------------
### Constructor OmsiPhysObjInst
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPhysObjInst.-ctor
Initializes a new instance of the OmsiPhysObjInst class.
```APIDOC
## Constructor OmsiPhysObjInst
### Description
Initializes a new instance of the OmsiPhysObjInst class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
```json
{
"example": "new OmsiPhysObjInst()"
}
```
### Response
#### Success Response (200)
- **OmsiPhysObjInst** (object) - An instance of the OmsiPhysObjInst class.
#### Response Example
```json
{
"example": "// An instance of OmsiPhysObjInst is created"
}
```
```
--------------------------------
### Get Texture Address (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTexture.TextureAddress
Retrieves the memory address of the native IDirect3DTexture9 object. This property is read-only and returns a System.UInt32 value representing the address.
```csharp
public uint TextureAddress { get; }
```
--------------------------------
### Constructor OmsiPathPointBasic
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPathPointBasic.-ctor
Details the declaration and usage of the OmsiPathPointBasic constructor.
```APIDOC
## Constructor OmsiPathPointBasic
### Description
Initializes a new instance of the `OmsiPathPointBasic` class.
### Method
Constructor
### Endpoint
N/A
### Parameters
N/A
### Request Example
N/A
### Response
#### Success Response (Constructor)
Creates an instance of `OmsiPathPointBasic`.
#### Response Example
```java
OmsiPathPointBasic instance = new OmsiPathPointBasic();
```
```
--------------------------------
### Constructor OmsiPathGroup
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiPathGroup.-ctor
Documentation for the OmsiPathGroup constructor.
```APIDOC
## Constructor OmsiPathGroup
### Description
Initializes a new instance of the `OmsiPathGroup` class.
### Method
Constructor
### Endpoint
N/A
### Parameters
None
### Request Example
```json
{}
```
### Response
#### Success Response
Initializes an `OmsiPathGroup` object.
#### Response Example
```json
{}
```
```
--------------------------------
### Get Texture Height - C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTexture.Height
Retrieves the height of the texture. This property is read-only and returns an unsigned 32-bit integer representing the texture's height.
```csharp
public uint Height { get; }
```
--------------------------------
### OmsiAnimSubMeshInst Class Documentation
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiAnimSubMeshInst
Details about the OmsiAnimSubMeshInst class, its inheritance, namespace, assembly, and syntax.
```APIDOC
## Class OmsiAnimSubMeshInst
A mesh within a complex mmap object. This represents a single [mesh] tag in a cfg file.
### Inheritance
System.Object
OmsiObject
OmsiAnimSubMeshInst
### Inherited Members
OmsiObject.IsNull
OmsiObject.Equals(Object)
OmsiObject.GetHashCode()
### Namespace
OmsiHook
### Assembly
OmsiHook.dll
### Syntax
```csharp
public class OmsiAnimSubMeshInst : OmsiObject
```
### Constructors
* **OmsiAnimSubMeshInst()**: Default constructor.
```
--------------------------------
### Get OmsiHook 'ident' Property (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.WrappedOmsiClasses.OmsiCriticalSectionObject.ident
Retrieves the 'ident' property, which is a public uint. This property is read-only and returns an unsigned 32-bit integer representing an identifier.
```csharp
public uint ident { get; }
```
--------------------------------
### Create D3DTexture from Existing Texture (C#)
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.D3DTexture.CreateFromExisting
Initializes a D3DTexture from an existing IDirect3DTexture9. It takes the memory address of the texture and a boolean to determine if writing is allowed. This method is asynchronous and returns a Task.
```csharp
public async Task CreateFromExisting(uint address, bool initialiseForWriting = true)
```
--------------------------------
### Declare PercipVec Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiWeather.PercipVec
This snippet shows the declaration of the PercipVec property in C#. It is of type D3DVector and supports both getting and setting its value. No external dependencies are required for this declaration.
```csharp
public D3DVector PercipVec { get; set; }
```
--------------------------------
### Declare PAI_Mode Property in C#
Source: https://space928.github.io/Omsi-Extensions/api/OmsiHook.OmsiVehicleInst.PAI_Mode
This C# code snippet shows the declaration of the public PAI_Mode property. It is of type OmsiPAIM and supports both getting and setting its value.
```csharp
public OmsiPAIM PAI_Mode { get; set; }
```