BaseObject::GetPos, absolute, relative
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/02/2004 at 01:22, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.207
Platform: Windows ;
Language(s) : C++ ;---------
I gather my objects position by BaseObject::GetPos(), for example from the Draw function of a 2D-Shader. This works fine, as long as I dont move my object in the tree and make it a child of another one. If an object is no child of another one, then the coordinates are absolute coordinates of the 3D room. If its a child, then the coordinates are relative to the parent object. In the Draw-Function of my 2D shader I have to draw to 3D room coordinates. One they to get the absolute coordinates would be to parse the object tree, and add the position of all parent objects to the objects position. Is there another possibility? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/02/2004 at 15:44, xxxxxxxx wrote:
Yes. You should read up a bit about object matrices and how they correspond to the hierarchy. (There's a tutorial at
[URL-REMOVED]
[URL-REMOVED])
Basically, if you always get the global object matrices (e.g. obj->GetMg()) then the hierarchy doesn't matter.
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.