Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

question for Lischke...

Posted on 2000-04-25
3
Medium Priority
?
162 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 144 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

971 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