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

    Get Point of an Object

    SDK Help
    0
    5
    356
    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 10/02/2004 at 04:10, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi all
      I have one object
      BaseObject *ObjGrid = BaseObject::Alloc(Oplane);
      I wanna get the point of this particular location for this plane. So i convert it into polygon object:
         PolygonObject *ObjToPolygon;
         ObjToPolygon = (PolygonObject * ) ToPoly(ObjGrid);
      Now i wanna get the point of the particular location. Then I looked into the documentation so that i applied into my code:
          for(i=51; 2600; i++) {
         Vector *Prevpt;
           Prevpt = ObjToPolygon->GetPoint();    
           if (Prevpt) {
             Prevpt[i - 51] ;
           }
         }
      Is what i am doing correct?
      Thanks and regards

      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 10/02/2004 at 04:37, xxxxxxxx wrote:

        1. Casting the Primitive Object doesn´t help here. It won´t be converted that way. You will need to convert the object with SendModelingCommand for example first and cast the resulting object.

        2. GetPoint should performance-wise be gotten before you jump into the loop (and of course you can check if the pointer is valid in front of the loop too). otherwise it´s correct that way.

        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 10/02/2004 at 15:31, xxxxxxxx wrote:

          Also, please note the typos in the "for(i=51; 2600; i++)". I suppose that was

              
              
              for(LONG i=51; i < 2600; i++)
          

          before the forum mangled it. Remember to wrap all code in code-tags, as described above the Message field, to avoid this.

          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 10/02/2004 at 18:09, xxxxxxxx wrote:

            Actually i have a piece of code in COFFEE
            for(i=0; i <=XNos; i++) {
            **      Vector *pt = BaseObject *Obj->GetPoint(i);**
            }
            And I wanna translate it into C++, so i made like this:
            BaseObject *Obj = BaseObject::Alloc(Oplane);
            Vector *pt;
            for(i=0; i <=XNos; i++) {
            **     pt = Obj->GetPoint();**
            **     if (pt) {
                  pt[i];  **
            }
            Is that the same way to do it? Thanks for the reply
            Regards

            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 11/02/2004 at 17:50, xxxxxxxx wrote:

              No, BaseObject has no GetPoint() function. You have to get a "GetType()==Opoly" object first, for example by SendModelingCommand(), and then cast it to a PolygonObject.

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