Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BaseObject::GetPos, absolute, relative

    SDK Help
    0
    2
    203
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post