tyFlow Forum
dotnet class to tyFlow class conversion in scriptOp - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: dotnet class to tyFlow class conversion in scriptOp (/thread-1671.html)



dotnet class to tyFlow class conversion in scriptOp - Geoff - 04-27-2020

Hey Tyson,

First of all I wanted to thank you...
thanks to you or because of you, I totally fell into c# and now the Max SDK documentation and old CGtalk threads from you and a few other code geeks Big Grin

1st question: Is there a simple way to convert dotnet classes like IMatrix3 or IQuat etc... to your equivalent classes in tyFlow?
2nd question: I was wondering if it worth using the available c# functions from Max if I need to construct Quats or Matrices from float or int?


RE: dotnet class to tyFlow class conversion in scriptOp - tyFlow - 04-27-2020

Hey Geoff,

Right now there's no connectivity between tyFlow's C# script classes and max's equivalent classes (matrix, quat, point3, etc). You'd have to create your max matrix/quat/etc and then manually assign the parameters (instead of just passing the tyFlow obj into the constructor, or having an implicit conversion, etc).


RE: dotnet class to tyFlow class conversion in scriptOp - Geoff - 04-27-2020

Thanks Tyson!
that’s what I thought...

but regarding my second question..,
what's the best approach when using your script operator (in therm of speed and memory) then?
writing my own c# functions or use the ones from Max even if I have to construct Matrix3 Quats or even Pointers for some functions?


RE: dotnet class to tyFlow class conversion in scriptOp - tyFlow - 04-27-2020

It would all boil down to C# at the end, so assuming your own functions aren't poorly optimized, I don't think there'd ultimately be a speed difference.


RE: dotnet class to tyFlow class conversion in scriptOp - Geoff - 04-27-2020

Big Grin ok thanks! maybe not as optimized as yours but I'll try to do my best Tongue keep up your great coding man!!!