Hi, my issue is that I can't seem to be able to assign a function's return value to an instance of a Class of same type:
More info on the above:
-PTriangle.Vertices is a property that returns an array of PVector objects.
-The "MultiplyVector" Function of the matrix returns a PVector object.
I want to assign the object returned by the function to each object looped trough in the array but it tells me "Unnecessary assignment of a value to Vertex"
I thought of making it a sub and directly change the PVector but I rather keep it as a function, how should I proceed ?
Is it in the PVector Class that I need to add something to allow this ?
Thanks in advance for the help !
vb.net Code:
Dim MTranslate_Z As Matrix3D = Matrix3D.Create_Scale(2, 2, 2) For Each Vertex As PVector In PTriangle.Vertices Dim unused As PVector = MTranslate_Z.MultiplyVector(Vertex) Vertex = unused Next
More info on the above:
-PTriangle.Vertices is a property that returns an array of PVector objects.
-The "MultiplyVector" Function of the matrix returns a PVector object.
I want to assign the object returned by the function to each object looped trough in the array but it tells me "Unnecessary assignment of a value to Vertex"
I thought of making it a sub and directly change the PVector but I rather keep it as a function, how should I proceed ?
Is it in the PVector Class that I need to add something to allow this ?
Thanks in advance for the help !