the !trobject computes the inverse of the matrix.
in v2 i’d recommend you to use the SlimDX.Matrix for performance reasons by simply defining a spread of that type. that should give you a transform input, access it like any spread and compute the inverse of one matrix by calling Matrix.Invert(matrix) - see http://slimdx.org/docs/html/T_SlimDX_Matrix.htm
no need to convert from Matrix4x4 to SlimDX.Matrix
just define the input pin as ISpread it will show up as normal Transform Input pin.
Vector2D trv = ((!trobject) * v).xy;
is not getting xy of the matrix. but as you assumed correctly in the code below the vector is multiplied with the inverse matrix.
and there is no overload for the * operator. so i guess you should be using the SlimDX.Vector2.TransformCoordinate method
well if you have a vvvv matrix anyways, don’t convert your code… the speed improvement is only a cast from double to float for each matrix element. the most expensive operation is the matrix inversion which is super fast in VMath. if the inversion is not that optimized in slimDX its slower and not as elegant with the slimDX code.
cheers tonfilm. i’d prefer the vvvv sdk way. whats the v2 method for matrix inversion? and maybe a stupid question: is there a search in sdk specs (page with members,methods etc.)