setGlobalPlacement

The call setGlobalPlacement allows you to adjust the placement of a model. This is all done semantically, i.e. it can be seen as a derived call representing a small SDAI function adjust the origin of a model.

Syntax

public const string enginedll = @"engine.dll";

[DllImport(enginedll, EntryPoint = "setGlobalPlacement")]
public static extern Int64 x86_setGlobalPlacement(Int32 model, ref double origin, bool includeRotation);

[DllImport(enginedll, EntryPoint = "setGlobalPlacement")]
public static extern Int64 x64_setGlobalPlacement(Int64 model, ref double origin, bool includeRotation);

public static Int64 setGlobalPlacement(Int64 model, ref double origin, bool includeRotation)
		{
			if (IntPtr.Size == 4)
			{
				double _origin = (double)origin;
				var _result = x86_setGlobalPlacement((Int32)model, ref _origin, includeRotation);
				origin = _origin;
				return _result;
			}
			else
			{
				return x64_setGlobalPlacement(model, ref origin, includeRotation);
			}
		}

[DllImport(enginedll, EntryPoint = "setGlobalPlacement")]
public static extern Int64 x86_setGlobalPlacement(Int32 model, double[] origin, bool includeRotation);

[DllImport(enginedll, EntryPoint = "setGlobalPlacement")]
public static extern Int64 x64_setGlobalPlacement(Int64 model, double[] origin, bool includeRotation);

public static Int64 setGlobalPlacement(Int64 model, double[] origin, bool includeRotation)
		{
			if (IntPtr.Size == 4)
			{
				var _result = x86_setGlobalPlacement((Int32)model, origin, includeRotation);
				return _result;
			}
			else
			{
				return x64_setGlobalPlacement(model, origin, includeRotation);
			}
		}    

Property model

Size: 64 bit / 8 byte (value)
The handle to the model. The model handle is static during its existance. Several models can be opened simultaniously within one session. Different models are always independent, threads are allowed to be running on different models simultaniously.

Property origin

Size: 64 bit / 8 byte (reference)
???.

Property includeRotation

Size: 8 bit / 1 byte (value)
???.