Creating a new matrix

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

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

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