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

    Creating a new matrix

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 294 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/02/2010 at 15:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Here's what I am doing to create a rotation matrix.

        
        
      Matrix rotMatrix = new(Matrix);  
       rotMatrix.off = p1;  
       rotMatrix.v2 = !(p2-p1%Vector(0,1,0));  
         
      

      However when I compile this,  I get an error that says,

        
       error C2440: 'initializing' : cannot convert from 'Matrix *' to 'Matrix'  
      

      I assume that the line

        
      Matrix rotMatrix = new(Matrix);  
      

      is not correct.   I got it from a COFFEE tutorial so I think there must be a different way to do it with C++.    Does anyone know how I would do this?

      Thanks,

      ~Shawn

      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 25/02/2010 at 17:30, xxxxxxxx wrote:

        Just do:

        Matrix rotMatrix;  
        rotMatrix.off = p1;  
        rotMatrix.v2 = !(p2-p1%Vector(0,1,0));  
        

        Cheers,
        Jack

        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 25/02/2010 at 17:39, xxxxxxxx wrote:

          Great.  Thanks a lot Jack!

          ~Shawn

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