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

    Simple question about arrays and vectors

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 259 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 04/06/2008 at 18:38, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------

      Hi and sorry for this extremely simple question,but I can't find anything in the SDK:

      How is an array of vectors declared? I want to declare something to be accessed as

      someData _.x

      I've read the info about arrays and vectors, but how is this made using coffee? Thanks for your time!

      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 04/06/2008 at 20:02, xxxxxxxx wrote:

        You would allocate the vector array like this (this is explained in the doc Index as [array]) :

        var varray = new(array,16);

        Remember that COFFEE is typeless.

        To access array elements and then the Vector class elements, it would be thus:

        varray[0].x

        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 04/06/2008 at 20:12, xxxxxxxx wrote:

          Thanks a lot. I thought that new(array,n) would just create a "simple" array with n elements but no vector implicitly.

          Thanks for your time!

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