Solved

question for Lischke...

Posted on 2000-04-25
3
154 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now