Page 1 of 1

Matrix Array in C# script

Posted: 06 Feb 2016, 13:23
by VincentPix
Hello,

I'm trying to work with a Matrix Array (an array of transform matrices) and I can't find how to assign a matrix to each index.

something like :

MatrixArray[0] = Matrix1;

If someone has some hints to help...

Have a nice day !

Re: Matrix Array in C# script

Posted: 07 Feb 2016, 07:33
by TVM Cracklings
It shouldn't be any different to arrays of any other type.

Are you assigning to the "output matrix" directly? In that case, it wouldn't work, since the output is only allowed to be created once. You'd need something like

Code: Select all

MatrixType[] MOut = new MatrixType[xyz];
// ... assign values to MOut
MatrixArray = MOut;
Maybe some code and/or debugging infos?

Regards
-C

Re: Matrix Array in C# script

Posted: 23 Feb 2016, 07:45
by clearMa
you two help me solve a big problem!!thank you very much

Re: Matrix Array in C# script

Posted: 23 Feb 2016, 12:42
by VincentPix
Thank you very much for your answer which solved a part of my problem.
The second part is : the "MatrixType"
I have miss something but I can't find the right way to decare it. Should I declare a namespace first ?

Thank you.

Re: Matrix Array in C# script

Posted: 23 Feb 2016, 18:01
by VincentPix
I found !

1st Declare a namespace just after the "using VentuzKernel;" :

using SlimDx;


2nd to declare a new matrix array :

Matrix[] MyMat = new Matrix[5];

Have fun.