Pyramid

This class represents the concept Pyramid.

Class

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

Example

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

int64_t model = CreateModel();

if (model) {
    //
    //  Classes
    //
    int64_t classPyramid = GetClassByName(model, "Pyramid");

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

    //
    //  Instances (creating)
    //
    int64_t myInstancePyramid = CreateInstance(classPyramid, nullptr);

    double  length = 2.8,
            height = 1.4;

    SetDatatypeProperty(myInstancePyramid, propertyLength, &length, 1);
    SetDatatypeProperty(myInstancePyramid, propertyHeight, &height, 1);

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