GLScene Tessalation

Top  Previous  Next

uses

VectorLists, GLGLUTesselation, GLVectorFileObjects;

 

 

procedure TForm2.Button5Click(Sender: TObject);

var

Vertexes : TAffineVectorList;

Mesh    : TGLBaseMesh;

begin

 

Vertexes := TAffineVectorList.Create;

Mesh    := TGLBaseMesh.Create(GLScene1.Objects);

try

    Vertexes.Add(0, 0, 0);

    Vertexes.Add(2, 0, 0);

    Vertexes.Add(2, 2, 0);

    Vertexes.Add(0, 2, 0);

 

//     DoTesselate(Vertexes, Mesh);

    DoTesselate(Vertexes, Mesh, @ZVector);

 

    // kommt da etwas zurück?

    Memo1.Lines.Add('Tess Vertices Count: '+Mesh.MeshObjects[0].Vertices.Count.ToString);

 

finally

    Mesh.Free;

    Vertexes.Free;

end;