createIndexedLineSet

Syntax

createIndexedLineSet(Nodes:length[3], LineSequences:integer[][][, Color:integer]) → any

The method createIndexedLineSet creates an indexed line set in the window of the scene.

Parameters

  • The parameter Nodes is a two-dimensional array of data type length which sets the positions of the Nodes, which follow, in space.

  • The parameter LineSequences is an array of arrays of data type integer which sets the sequence of lines which follow. Each inner array contains a sequence of node indexes which set the line.

  • The optional parameter Colors of data type any sets the color.

Return Value

The return value has the data type any and specifies the created graphic, compare the method _3D.getGraphic.

Example

var Nodes: real[3, 8]
var Faces: any[6]
var LineSequences: any[6]
var Colors: integer[6]
var Color: integer
var tmpArray: integer[4]
var GraphicGroup := .Modelle.Modell._3D.holeGrafik("deco")

Nodes[1, 1] := 1;   Nodes[2, 1] := 1;   Nodes[3, 1] := 1
Nodes[1, 2] := 1;   Nodes[2, 2] := 1;   Nodes[3, 2] := -1
Nodes[1, 3] := 1;   Nodes[2, 3] := -1;  Nodes[3, 3] := 1
Nodes[1, 4] := 1;   Nodes[2, 4] := -1;  Nodes[3, 4] := -1
Nodes[1, 5] := -1;  knoten[2, 5] := 1;   Nodes[3, 5] := 1
Nodes[1, 6] := -1;  Nodes[2, 6] := 1;   Nodes[3, 6] := -1
Nodes[1, 7] := -1;  Nodes[2, 7] := -1;  Nodes[3, 7] := 1
Nodes[1, 8] := -1;  Nodes[2, 8] := -1;  Nodes[3, 8] := -1

tmpArray[1] := 1
tmpArray[2] := 2
tmpArray[3] := 4
tmpArray[4] := 3
Faces[1]  := tmpArray
print tmpArray -- ^[1, 2, 4, 3]

tmpArray[1] := 5
tmpArray[2] := 6
tmpArray[3] := 8
tmpArray[4] := 7
Faces[2]  := tmpArray

tmpArray[1] := 1
tmpArray[2] := 3
tmpArray[3] := 7
tmpArray[4] := 5
Faces[3]  := tmpArray

tmpArray[1] := 2
tmpArray[2] := 4
tmpArray[3] := 8
tmpArray[4] := 6
Faces[4]  := tmpArray

tmpArray[1] := 1
tmpArray[2] := 5
tmpArray[3] := 6
tmpArray[4] := 2
Faces[5]  := tmpArray

tmpArray[1] := 3
tmpArray[2] := 7
tmpArray[3] := 8
tmpArray[4] := 4
Faces[6]  := tmpArray

Colors[1] := makeRGBValue(255,255,0)
Colors[2] := makeRGBValue(255,0,255)
Colors[3] := makeRGBValue(0,0,255)
Colors[4] := makeRGBValue(0,255,0)
Colors[5] := makeRGBValue(255,0,0)
Colors[6] := makeRGBValue(0,0,0)

Color       := makeRGBValue(255,255,255)

LineSequences := Faces

GraphicGroup.createIndexedFaceSet(Nodes, Faces, Colors).Position.X := -5
GraphicGroup.createIndexedFaceSet(Nodes, Faces, Color).Position.X := 0
GraphicGroup.createIndexedLineSet(Nodes, LineSequences, Color).Position.X := 5

The created indexed face and line sets look like this:

Related Topics

Detailed Access To Graphics

_3D.getGraphic