Cube

This class represents the concept Cube.

Class

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

Example

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

int64_t model = CreateModel();

if (model) {
    //
    //  Classes 
    //
    int64_t classCube = GetClassByName(model, "Cube");

    //
    //  Datatype Properties (attributes)
    //
    int64_t propertyLength = GetPropertyByName(model, "length");

    //
    //  Instances (creating)
    //
    int64_t myInstanceCube = CreateInstance(classCube, nullptr);

    double  length = 1.8;
        
    SetDatatypeProperty(myInstanceCube, propertyLength, &length, 1);

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