Box

This class represents the concept Box.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Solid
class Box
   property length
      range double (64 bit), cardinality [1, 1]
   property width
      range double (64 bit), cardinality [1, 1]
   property height
      range double (64 bit), cardinality [1, 1]    

Example

Here you can find code snippits that show how the API call Box can be used.

using Engine;

public void CreateBox()
{
    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   myInstanceBox = Engine.x86_64.CreateInstance(classBox, (string) null);

        double  length = 2.8,
                width = 1.3,
                height = 1.4;

        Engine.x86_64.SetDatatypeProperty(myInstanceBox, propertyLength, ref length, 1);
        Engine.x86_64.SetDatatypeProperty(myInstanceBox, propertyWidth, ref width, 1);
        Engine.x86_64.SetDatatypeProperty(myInstanceBox, propertyHeight, ref height, 1);

        //
        //  The resulting model can be viewed in 3D-Editor.exe
        //
        Engine.x86_64.SaveModel(model, "c:\\created\\myBox.bin");
        Engine.x86_64.CloseModel(model);
    }
}