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 snippets 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); } }