Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Matrix Array in C# script

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
VincentPix
Posts: 48
Joined: 06 Nov 2014, 15:07

Matrix Array in C# script

Post by VincentPix » 06 Feb 2016, 13:23

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 !

TVM Cracklings
Posts: 33
Joined: 30 Sep 2015, 10:49

Re: Matrix Array in C# script

Post by TVM Cracklings » 07 Feb 2016, 07:33

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

clearMa

Re: Matrix Array in C# script

Post by clearMa » 23 Feb 2016, 07:45

you two help me solve a big problem!!thank you very much

VincentPix
Posts: 48
Joined: 06 Nov 2014, 15:07

Re: Matrix Array in C# script

Post by VincentPix » 23 Feb 2016, 12:42

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.

VincentPix
Posts: 48
Joined: 06 Nov 2014, 15:07

Re: Matrix Array in C# script

Post by VincentPix » 23 Feb 2016, 18:01

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.

Post Reply