-
Notifications
You must be signed in to change notification settings - Fork 12
Matrix4x4 * AbstractVector{Vector4} #36
Comments
Hmm. I'd be happy to entertain a pull request, but I'm not sure this really belongs in the library. You can accomplish this with an explicit loop or comprehension (or |
Your argument makes a lot of sense. the proposed functionality actually means to transform or multiply each of Vector4 in an array with a Matrix4x4. Adding to one can always convert tm=Matrix4x4(1.0)
a=Vector4(2.0)
tm*a # result in Vector4
[tm]*[a] # result in 4-element Vector
tm*[a] # doesn't work
[tm]*a # doesn't work i am skeptical of any complication of support this, maybe any operation between ImmutableArrays and generic Arrays should return generic Arrays. |
The "it should just work" argument does make sense. And, yes, I'd agree that any mixing of Could you spec out some definitions for the additional functionality you'd like to see in a PR or gist? Also, just a heads-up, but it's been a looong time since I've had my head in this code, so it might take me a while to spin up on thinking about the best way to integrate it. Thanks for making the effort to contribute. |
Sure, i'll try to make it happen:) |
i just found this package after i finished my own and really liked the meta-programming way to generate all the things i coded by hands.
i could find nearly all the functions i coded in this package, except that i need to translate/rotate a large array of Vector4, which is a fairly common thing in 3D graphics.
for example:
i know for small array of Vector4, i could do
map(x->tm*x,mymodel)
. but would be faster if convert the array of Vector4 to a matrix and multiply.any consideration to add this functionality?
The text was updated successfully, but these errors were encountered: