GetPerimeter
Note: internally the call does not store its results, any optimization based on known
dependencies between instances need to be implemented on the client.
Note: due to internal structure using already calculated vertex buffer/index buffer does not
give any performance benefits, in opposite to GetVolume and GetArea
Syntax
public const string enginedll = @"engine.dll"; [DllImport(enginedll, EntryPoint = "GetPerimeter")] public static extern double GetPerimeter(Int64 owlInstance);
Property owlInstance
Size: 64 bit / 8 byte (value)
Example (based on pure API calls)
Here you can find code snippits that show how the API call GetPerimeter can be used.
using RDF; // include at least engine.cs within your solution ... static void Main(string[] args) { Int64 model = RDF.engine.CreateModel(); if (model != 0) { // // Classes // Int64 classBox = RDF.engine.GetClassByName(model, "Box"); // // Datatype Properties (attributes) // Int64 propertyLength = RDF.engine.GetPropertyByName(model, "length"), propertyWidth = RDF.engine.GetPropertyByName(model, "width"), propertyHeight = RDF.engine.GetPropertyByName(model, "height"); // // Instances (creating) // Int64 instanceBox = RDF.engine.CreateInstance(classBox, (string) null); double length = 2.8, width = 1.3, height = 1.4; RDF.engine.SetDatatypeProperty(instanceBox, propertyLength, ref length, 1); RDF.engine.SetDatatypeProperty(instanceBox, propertyWidth, ref width, 1); RDF.engine.SetDatatypeProperty(instanceBox, propertyHeight, ref height, 1); double perimeter = RDF.engine.GetPerimeter(instanceBox); // // The resulting model can be viewed in 3D-Editor.exe // RDF.engine.SaveModel(model, "c:\\created\\myFile.bin"); RDF.engine.CloseModel(model); } }