atlan2
asked on
question for Lischke...
Hi,
So, I have object tree at GLscene, some brunches are 6 childs deep (think a robot). 6thChild.position (position of end effector)gives its local coordinates, my question: Where can I read child ohjects global coordinates.
(I think it is there but I just coudn't find it where).
So, I have object tree at GLscene, some brunches are 6 childs deep (think a robot). 6thChild.position (position of end effector)gives its local coordinates, my question: Where can I read child ohjects global coordinates.
(I think it is there but I just coudn't find it where).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Atlan, if you need to read the global matrix from another file/class then from GLScene.pas then you won't have another choice than to make the matrix public.
For the slight position differences: I guess its the limited math precision. Throughout the entire library I use Single as datatype (except where not possible). This can accumulate rounding errors...
Ciao, Mike
For the slight position differences: I guess its the limited math precision. Throughout the entire library I use Single as datatype (except where not possible). This can accumulate rounding errors...
Ciao, Mike
ASKER
I think I'm closer to solve the problem.
What's the proper way to read object.FGlobalMatrix since it it protected property. Should I write the procedure or is there a ready solution for it? (just for trying I moved FGlobalMatrix to public.).
Second thing is, I assumed object.FGlobalMatrix[3,0] corresponds to global x position and so on... but when I rendered another (independed) object at that location there was a slight difference between objects locations, so is the way I tryed wrong?
Thanks for help.
Atlan.