Hi,
How can I access the array of nodes of a pipe between many objects in a scene? I tried to do this through the code below but encountered Incompatible type error :
///////////////////////////////////////////////////////////////////////////////
procedure rod_array_update(var rod_array : array of TMyNodes; var scene: TGLScene; parent_name:string);
var
i,j,n:integer;
Mypipe : TGLPipe;
Myparent : TGLBaseSceneObject;
begin
n:=Length(rod_array);
for i := 0 to Myparent.Count - 1 do
if Myparent.Children[i].ClassName='TGLPipe' then
begin
mypipe :=Myparent.Children[i]; // ????????????????? This is error
SetLength(rod_array,n+mypipe.Nodes.Count);
for j:= 0 to mypipe.Nodes.Count-1 do
begin
rod_array[n].X:=mypipe.Nodes[j].X;
rod_array[n].Y:=mypipe.Nodes[j].Y;
rod_array[n].Z:=mypipe.Nodes[j].Z;
n:=n+1;
end;
Hi,
How can I access the array of nodes of a pipe between many objects in a scene? I tried to do this through the code below but encountered Incompatible type error :
///////////////////////////////////////////////////////////////////////////////
procedure rod_array_update(var rod_array : array of TMyNodes; var scene: TGLScene; parent_name:string);
var
i,j,n:integer;
Mypipe : TGLPipe;
Myparent : TGLBaseSceneObject;
begin
n:=Length(rod_array);
for i := 0 to Myparent.Count - 1 do
if Myparent.Children[i].ClassName='TGLPipe' then
begin
mypipe :=Myparent.Children[i]; // ????????????????? This is error
SetLength(rod_array,n+mypipe.Nodes.Count);
for j:= 0 to mypipe.Nodes.Count-1 do
begin
rod_array[n].X:=mypipe.Nodes[j].X;
rod_array[n].Y:=mypipe.Nodes[j].Y;
rod_array[n].Z:=mypipe.Nodes[j].Z;
n:=n+1;
end;
end;
//////////////////////////////////////////////////////////////////////////////
please help me how can I fix this error ,