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
    • Recent
    • Tags
    • Users
    • Login

    Dropping the axis

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 446 Views
    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 Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 19/07/2011 at 12:15, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ; Mac  ;  
      Language(s) :

      ---------
      Hey everyone.  I want to drop the axis of my object to the bottom of the bounding box.

      I can accomplish this by moving the points of the object like so.....

        
      //DROP AXIS  
        //=====================================//  
        if(bc->GetBool(PXG_DROP_AXIS) == TRUE)  
        {  
            for(int i = 0; i < pointCount; i++)  
            {  
                points[i].y += op->GetRad().y;  
            }  
        
            main = polyObj;  
              
        }  
        
        //=====================================//  
        
      

      However, the bounding box itself does not move..    Anyone know how I get the bounding box to move with this change?

      Thanks,

      Shawn

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 19/07/2011 at 12:21, xxxxxxxx wrote:

        To elaborate...  Here is how I set the bounding box...

          
          
        //SET THE BOUNDING BOX  
        //=====================================//  
        void MyClass::GetDimension(BaseObject *op, Vector *mp, Vector *rad){  
          
          if(!main) return;  
          *rad =  main->GetRad();   
            
        }  
          
          
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 19/07/2011 at 21:20, xxxxxxxx wrote:

          In GetDimension(), you provide the bounding box information.  GetRad() and GetMp() use this for a plugin object.  It is up to you, my friend, to calculate the relevant information to return with that method.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 20/07/2011 at 05:14, xxxxxxxx wrote:

            Thanks Robert.  That was the issue, I was not filling the *mp value in GetDimension.

            Thanks again,

            Shawn

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