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

    mat->SetRotAxis(v,f) ?

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 866 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 25/05/2011 at 09:42, xxxxxxxx wrote:

      Hi.
      I'm stuck how to interpret from COFFEE:

      mat->SetRotAxis(vector,float);
      

      to the Py way of doing it.
      I've made a new Matrix:

        
      vec = c4d.Vector(0)   
      mat = Matrix(vec,vec,vec,vec)   
      

      and have my Rotation axis and float calculated
      but where to put it? 🙂

      What I've found so far in SDK is "MatrixToRotAxis(m)"
      but think I need the opposite function, right?

      Cheers
      Lennart

      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 26/05/2011 at 04:17, xxxxxxxx wrote:

        Apparently I can't figure out what m->SetRotAxis(vector, float) does
        in its inner work…..

        Gone thru the options in Py without any luck and tried
        Quartenion Py setups from the interweb that went
        way over my head and needed some external packages
        such as NimPY.

        Any pointers/ideas?
        Hopefully I'm being stupid and totally misunderstand what
        to look for.

        May I say "Help!" ?

        Lennart

        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 27/05/2011 at 08:53, xxxxxxxx wrote:

          I fail and go for the COFFEE solution for know...

          The short rephrased question would be:

          Is there a function in Py that does what COFFEE: Mat->SetRotAxis(vector,real) does?

          Vector being: vcross((VectorA-VectorB),vector(0,1,0))
          Real being:vlen((VectorA-VectorB) / realradius)

          Cheers
          Lennart

          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 01/06/2011 at 09:26, xxxxxxxx wrote:

            The equivalent is c4d.utils.RotAxisToMatrix and takes the same arguments.

            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 03/06/2011 at 08:57, xxxxxxxx wrote:

              Thanks Sebastian, I got it working perfect now!

              Cheers
              Lennart

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