Translate C.O.F.F.E.E to C++



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/03/2004 at 21:30, xxxxxxxx wrote:

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

    ---------
    Howdy,

    I'm trying to translate my C.O.F.F.E.E expression to a C++ plug in, but I'm having a little trouble figuring out the correct syntax in C++ to translate this C.O.F.F.E.E routine:

    RotateMatrix(rMatrix,theta)
    {
         var m = new(Matrix);
         m->SetRotY(-theta);

    return rMatrix->GetMulM(m);
    }

    It looks like in C++ MatrixRotY() would replace SetRotY(), but I'm not sure what would replace GetMulM().

    Or maybe there is a better way to do the matrix rotation in C++. Any suggestions?

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/03/2004 at 09:33, xxxxxxxx wrote:

    Hi,

    Matrix multiplication is m = m1 * m2;

    aws

    TZ



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 23/03/2004 at 15:44, xxxxxxxx wrote:

    Howdy,

    Thanks Thomas.

    So, GetMulM() is just multiplying the two matrices together. I kind of thought so, but when I tried it, I couldn't get it to work. From your reply I realize I was on the right track, but going the wrong way. I was doing m=m2*m1 instead of m=m1*m2. I reckon the order makes a difference, but I'm not sure why (no formal math training, you know).

    It's working now. Thanks again.

    Adios,
    Cactus Dan


Log in to reply