Matrix

This class represents the concept Matrix.

Class

class Mathematics
class Matrix
   property coordinates
      range double (64 bit), cardinality [0, 12]
   property _11
      range double (64 bit), cardinality [0, 1]
   property _12
      range double (64 bit), cardinality [0, 1]
   property _13
      range double (64 bit), cardinality [0, 1]
   property _21
      range double (64 bit), cardinality [0, 1]
   property _22
      range double (64 bit), cardinality [0, 1]
   property _23
      range double (64 bit), cardinality [0, 1]
   property _31
      range double (64 bit), cardinality [0, 1]
   property _32
      range double (64 bit), cardinality [0, 1]
   property _33
      range double (64 bit), cardinality [0, 1]
   property _41
      range double (64 bit), cardinality [0, 1]
   property _42
      range double (64 bit), cardinality [0, 1]
   property _43
      range double (64 bit), cardinality [0, 1]

subClasses 
      class InverseMatrix
      class MatrixMultiplication    

Example

Here you can find code snippits that show how the API call Matrix 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);
}