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

    Matrix A x Matrix B // can't make it work

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 322 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/12/2008 at 15:10, xxxxxxxx wrote:

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

      ---------
      Hello ,
      first I have to say I'm really newbie in COFFEE .
      What I would like to do is to convert a mirror expresso function in COFFEE .
      but I'm facing some troubles when I want to multiply 2 matrix ( A*B ) .
      here a basic expresso example I'm trying to convert :
      a 'CubeR' object , a 'NulObject' , and a 'CubeL' one. I want to multiply the first 2 matrix ones , to give the CubeL matrix. (one matrix is inverted )

      so here the "converted to coffee code" .. but you can see that I'm getting an error in the multiply function 😞  ( I've tested several different ways to make it .. each time the same error result )

       
      so my question is , how would you write the "simple" matrix multiplication in coffee please ?  ( pay attention that one of those matrix is inverted ..and the order is important too .. i mean mA*mB isn't the same as mB*mA )
      the SDK give 3 solutions : ->GetMulM(m)  or ->MulM_R(m)  or MulM_L(m)   , but no examples are provided.
      thanks by advance if anyone can help me 😉
      ++ clement

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

        Because MulM_L() and MulM_R() return bool not Matrix! The result of the multiplication is stored back into the Matrix calling the function:

        var mat;
        mat->MulM_L(mat2);
        // mat now has the result (mat2*mat)!

        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 05/12/2008 at 01:42, xxxxxxxx wrote:

          Hi Robert ,
          thank you for the explanation 😉
          clement

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