Solved

question for Lischke...

Posted on 2000-04-25
3
157 Views
Last Modified: 2010-04-04
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).
0
Comment
Question by:atlan2
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Lischke earned 36 total points
ID: 2750448
Hi atlan2,

each object has two matrices, the local and the global matrix. The latter contains all transformations made in the hierarchy up to the particular object. I think you know how to get the position from a 4x4 transformation matrix.

Ciao, Mike
0
 
LVL 1

Author Comment

by:atlan2
ID: 2751576
Hi Mike,

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.

0
 
LVL 10

Expert Comment

by:Lischke
ID: 2751605
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
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question