Line3D

This class represents the concept Line3D.

Class

class GeometricItem
   relation material
      range Material, cardinality [0, 1]
class Curve
class Line3D
   property points
      range double (64 bit), cardinality [6, 6]
   property asOpenGL
      range bool, cardinality [0, 1]    

Example

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

using Engine;

public void CreateLine3D()
{
    Int64 model = Engine.x86_64.CreateModel();

    if (model != 0)
    {
        //
        //  Classes
        //
        Int64   classLine3D = Engine.x86_64.GetClassByName(model, "Line3D");

        //
        //  Datatype Properties (attributes)
        //
        Int64   propertyPoints = Engine.x86_64.GetPropertyByName(model, "points");

        //
        //  Instances (creating)
        //
        Int64   myInstanceLine3D = Engine.x86_64.CreateInstance(classLine3D, (string) null);

        double[]    points = { 0.0, 2.0, 0.0, 2.0, 1.0, 0.0 };
        
        Engine.x86_64.SetDatatypeProperty(myInstanceLine3D, propertyPoints, ref points[0], 6);

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