SetBoundingBoxReference
The transformationMatrix has 12 double values: _11, _12, _13, _21, _22, _23,
_31, _32, _33, _41, _42, _43.
The startVector is the leftundernear vector and the endVector is the
rightupperfar vector, in all cases values are doubles (64 bit).
Syntax
public const string EngineDLL = @"engine.dll";[DllImport(EngineDLL, EntryPoint = "SetBoundingBoxReference")] public static extern void SetBoundingBoxReference(Int64 owlInstance, out double transformationMatrix, out double startVector, out double endVector);
Property owlInstance
Size: 64 bit / 8 byte (value)Property transformationMatrix
Size: 64 bit / 8 byte (reference)Property startVector
Size: 64 bit / 8 byte (reference)Property endVector
Size: 64 bit / 8 byte (reference)
Example
Here you can find code snippits that show how the API call SetBoundingBoxReference can be used.
using Engine; static void Main(string[] args) { Int64 model = Engine.x86_64.CreateModel(); if (model != 0) { // // Classes // Int64 classBox = Engine.x86_64.GetClassByName(model, "Box"); // // Datatype Properties (attributes) // Int64 propertyLength = Engine.x86_64.GetPropertyByName(model, "length"), propertyWidth = Engine.x86_64.GetPropertyByName(model, "width"), propertyHeight = Engine.x86_64.GetPropertyByName(model, "height"); // // Instances (creating) // Int64 instanceBox = Engine.x86_64.CreateInstance(classBox, (string) null); double length = 2.8, width = 1.3, height = 1.4; Engine.x86_64.SetDatatypeProperty(instanceBox, propertyLength, ref length, 1); Engine.x86_64.SetDatatypeProperty(instanceBox, propertyWidth, ref width, 1); Engine.x86_64.SetDatatypeProperty(instanceBox, propertyHeight, ref height, 1); double[] transformationMatrix = new double[12], startVector = new double[3], endVector = new double[3]; Engine.x86_64.SetBoundingBoxReference(instanceBox, out transformationMatrix[0], out startVector[0], out endVector[0]); Engine.x86_64.UpdateInstance(instanceBox); System.Diagnostics.Debug.Assert(endVector[0] == 2.8); length = 4.1; Engine.x86_64.SetDatatypeProperty(instanceBox, propertyLength, ref length, 1); System.Diagnostics.Debug.Assert(endVector[0] == 2.8); Engine.x86_64.UpdateInstance(instanceBox); System.Diagnostics.Debug.Assert(endVector[0] == 4.1); // // The resulting model can be viewed in 3D-Editor.exe // Engine.x86_64.SaveModel(model, "c:\\created\\myFile.bin"); Engine.x86_64.CloseModel(model); } }