Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Is vector() a function?

    SDK Help
    0
    4
    242
    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 14/03/2006 at 13:25, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.5 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      In the new Script Manager, the use of vector() is colored blue like all other function calls. Yet, the SDK docs call it a cast. It doesn't really function like a cast in other languages. It seems to me that it really is a function, one that converts data (one or three integers) to another type (a vector).

      I ask this because I'm working on a tutorial for COFFEE newbies, and would like a good excuse to avoid the word "cast". If vector() really is just another function, I can avoid the word in good conscience.

      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/03/2006 at 13:46, xxxxxxxx wrote:

        I think you misread the documentation. It says that the components (parameters) are cast from int to float if needed.

        It is a function (more aptly called 'method' in OOP circles) and it returns a vector. If you wish to avoid the word cast for describing what happens to the parameters, you could use converted instead. 🙂

        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/03/2006 at 16:29, xxxxxxxx wrote:

          Um, I think you misread the docs. 🙂

          On the main Reference page, vector() is categorized under the Casts heading.

          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/03/2006 at 17:41, xxxxxxxx wrote:

            Nope. I never use the Reference page (easier to do Index). 😜

            I think you misconstrue the typical meaning of 'cast' (as in C (int)myrealvalue or C++ static_cast<MyObject*>(obj)) to the one in the docs wherein they are just classifying a set of methods. These are not literal 'casts' as in the other languages, just convenience methods for converting types.

            Let's face it, tostring() could not be possibly performing a standard 'cast' as in other languages. And you can't really cast one class type to another as COFFEE is a typeless language.

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