GetObjectProperty

This function gets the value(s) of a certain objectProperty in the context of an instance. The value of card gives the actual card of the value list. The list value of integers is a list of handles to instances, this list has a length as givin in the value card.

Syntax

//   Visual Studio for Windows
public:
__int64 __declspec(dllexport) __stdcall GetObjectProperty(
            __int64        owlInstance,
            __int64        rdfProperty,
            __int64        ** value,
            __int64        * card
        );

//   Linux, OS-X and non-Visual Studio Windows solutions
public:
int64_t GetObjectProperty(
            int64_t        owlInstance,
            int64_t        rdfProperty,
            int64_t        ** value,
            int64_t        * card
        );    

Property owlInstance

Size: 64 bit / 8 byte (value)
...

Property rdfProperty

Size: 64 bit / 8 byte (value)
...

Property value

Size: 64 bit / 8 byte (reference)
...

Property card

Size: 64 bit / 8 byte (reference)
the cardinality of the array as given or returned

Example

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

__int64 rdfModel = CreateModel();

if (rdfModel) {
    __int64 classCylinder = GetClassByName(rdfModel, "Cylinder"),
            classMatrix = GetClassByName(rdfModel, "Matrix"),
            classTransformation = GetClassByName(rdfModel, "Transformation");

    __int64 property_11 = GetPropertyByName(rdfModel, "_11"),
            property_12 = GetPropertyByName(rdfModel, "_12"),
            property_13 = GetPropertyByName(rdfModel, "_13"),
            property_21 = GetPropertyByName(rdfModel, "_21"),
            property_22 = GetPropertyByName(rdfModel, "_22"),
            property_23 = GetPropertyByName(rdfModel, "_23"),
            property_31 = GetPropertyByName(rdfModel, "_31"),
            property_32 = GetPropertyByName(rdfModel, "_32"),
            property_33 = GetPropertyByName(rdfModel, "_33"),
            property_41 = GetPropertyByName(rdfModel, "_41"),
            property_42 = GetPropertyByName(rdfModel, "_42"),
            property_43 = GetPropertyByName(rdfModel, "_43"),
            propertyHeight = GetPropertyByName(rdfModel, "height"),
            propertyMatrix = GetPropertyByName(rdfModel, "matrix"),
            propertyObject = GetPropertyByName(rdfModel, "object"),
            propertyRadius = GetPropertyByName(rdfModel, "radius"),
            propertySegmentationParts = GetPropertyByName(rdfModel, "segmentationParts");

    __int64 myInstanceCylinder = CreateInstance(classCylinder, nullptr),
            myInstanceMatrix = CreateInstance(classMatrix, nullptr),
            myInstanceTransformation = CreateInstance(classTransformation, nullptr);

    SetObjectProperty(myInstanceTransformation, propertyObject, &myInstanceCylinder, 1);
    SetObjectProperty(myInstanceTransformation, propertyMatrix, &myInstanceMatrix, 1);

    double  height = 2.8,
            radius = 1.3;
    __int64 segmentationParts = 36;

    SetDatatypeProperty(myInstanceCylinder, propertyHeight, &height, 1);
    SetDatatypeProperty(myInstanceCylinder, propertyRadius, &radius, 1);
    SetDatatypeProperty(myInstanceCylinder, propertySegmentationParts, &segmentationParts, 1);

    double  valueOne = 1.0,
            valueZero = 0.0,
            offsetX = 3.3,
            offsetY = -1.2,
            offsetZ = 0.5;
    SetDatatypeProperty(myInstanceMatrix, property_11, &valueOne, 1);
    SetDatatypeProperty(myInstanceMatrix, property_12, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_13, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_21, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_22, &valueOne, 1);
    SetDatatypeProperty(myInstanceMatrix, property_23, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_31, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_32, &valueZero, 1);
    SetDatatypeProperty(myInstanceMatrix, property_33, &valueOne, 1);
    SetDatatypeProperty(myInstanceMatrix, property_41, &offsetX, 1);
    SetDatatypeProperty(myInstanceMatrix, property_42, &offsetY, 1);
    SetDatatypeProperty(myInstanceMatrix, property_43, &offsetZ, 1);

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