Matrix

This class represents the concept Matrix.

Class

class Thing
class Mathematics
class Matrix
   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]
   property coordinates
      range double (64 bit), cardinality [0, 12]

subClasses 
      class InverseMatrix
      class MatrixByDistanceExpression
      class MatrixMultiplication    

Example (based on pure API calls)

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

using RDF;      //  include at least engine.cs within your solution

public void CreateMatrix()
{
    Int64 model = RDF.engine.CreateModel();

    if (model != 0)
    {
        //
        //  Classes
        //
        Int64   classCylinder = RDF.engine.GetClassByName(model, "Cylinder"),
                classMatrix = RDF.engine.GetClassByName(model, "Matrix"),
                classTransformation = RDF.engine.GetClassByName(model, "Transformation");

        //
        //  Object Properties (relations)
        //
        Int64   propertyMatrix = RDF.engine.GetPropertyByName(model, "matrix"),
                propertyObject = RDF.engine.GetPropertyByName(model, "object");

        //
        //  Datatype Properties (attributes)
        //
        Int64   property_41 = RDF.engine.GetPropertyByName(model, "_41"),
                property_42 = RDF.engine.GetPropertyByName(model, "_42"),
                property_43 = RDF.engine.GetPropertyByName(model, "_43"),
                propertyLength = RDF.engine.GetPropertyByName(model, "length"),
                propertyRadius = RDF.engine.GetPropertyByName(model, "radius"),
                propertySegmentationParts = RDF.engine.GetPropertyByName(model, "segmentationParts");

        //
        //  Instances (creating)
        //
        Int64   myInstanceCylinder = RDF.engine.CreateInstance(classCylinder, (string) null),
                myInstanceMatrix = RDF.engine.CreateInstance(classMatrix, (string) null),
                myInstanceTransformation = RDF.engine.CreateInstance(classTransformation, (string) null);

        RDF.engine.SetObjectProperty(myInstanceTransformation, propertyObject, ref myInstanceCylinder, 1);
        RDF.engine.SetObjectProperty(myInstanceTransformation, propertyMatrix, ref myInstanceMatrix, 1);

        double  length = 2.8,
                radius = 1.3;
        Int64   segmentationParts = 36;

        RDF.engine.SetDatatypeProperty(myInstanceCylinder, propertyLength, ref length, 1);
        RDF.engine.SetDatatypeProperty(myInstanceCylinder, propertyRadius, ref radius, 1);
        RDF.engine.SetDatatypeProperty(myInstanceCylinder, propertySegmentationParts, ref segmentationParts, 1);

        double  offsetX = 3.3,
                offsetY = -1.2,
                offsetZ = 0.5;
        RDF.engine.SetDatatypeProperty(myInstanceMatrix, property_41, ref offsetX, 1);
        RDF.engine.SetDatatypeProperty(myInstanceMatrix, property_42, ref offsetY, 1);
        RDF.engine.SetDatatypeProperty(myInstanceMatrix, property_43, ref offsetZ, 1);

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