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

    drawing object arrays?

    SDK Help
    0
    3
    331
    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 13/12/2012 at 14:52, xxxxxxxx wrote:

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

      ---------
      I got an array of points (assume 100,000 points)
      I can draw them with pBuffer->DrawSubBuffer or DrawPointArray...

      can I draw an object (like sphere or cube (for simplicity)) instead of the points?(like cloning it with mograph but this may be slow ...)

      suggest fastest way if possible

      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 14/12/2012 at 01:35, xxxxxxxx wrote:

        Hi Mohamed,

        Originally posted by xxxxxxxx

        can I draw an object (like sphere or cube (for simplicity)) instead of the points?(like cloning it with mograph but this may be slow ...)

        Yes, you can try to draw an object with BaseDraw::DrawPolygonObject() or BaseDraw::DrawObject().

        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 15/12/2012 at 02:01, xxxxxxxx wrote:

          well thanks yannick

          what I have found from (c4d-jack) and tested (but didn't look correct due to transformation matrix)

          _<_t_<__<_t_>_11 `  ``BaseObject* the_obj = the_tag->GetObject();_
          12   ``if (!the_obj) ``return TRUE;
          13
          14   ``the_obj = the_obj->GetDown();
          15
          16   ``Vector    pos;
          17
          18   ``bd->SetMatrix_Screen();
          19
          20   ``while (the_obj)
          21   ``{
          22     ``pos = the_obj->GetMg().off;
          23     ``pos = bd->WS(pos);
          24     ``bd->DrawCircle2D(LCO pos.x, LCO pos.y, RCO 20.0);
          25
          26     ``the_obj = the_obj->GetNext();
          27   ``}
          28
          29   ``bd->SetMatrix_Matrix(NULL, Matrix(), 0);

          what i did (I got an array of points)

          Vector pos;
          bd->SetMatrix_Screen();

          for (l = 0; l < lPoints; l++)
          {
          pos = MyPointVector[ l ];
          pos = bd->WS(pos);
          bd->DrawCircle2D(LCO pos.x, LCO pos.y, RCO 2.0);
          }
          bd->SetMatrix_Matrix(NULL, Matrix(), 0);

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