Eh, I'd love for D3D APIs, but nobody suggested there were any, so I thought there weren't and tried the direct math approach..
Now that I think of it.. did I also forget to align the quad to the axis before creating the matrices? Uhm, I've gotta check.
Well, I somewhat found symbols or quick names way easier to read and remember, but that's just the way I'm used to.
I'm sorry if I made so much confusion between the operation, I tried my best to follow what you suggested but it seems I failed.. and I still don't understand how matrices work, so is easy for me to erroneously switch vectors in cross products. xD
I'll change my code and give it a try!
EDIT: Ehm, by the way, I did what you said, "and after that use another cross product between the first and third vector to "fix" the second one"
The second and the third vectors are X and Y... unless your order was different from the one Kryzon was basing himself upon (X, Z, Y).
EDIT2: Oh? Apparently, I'd already actually got everything alright. I changed the code and the result is exactly the same.. so the error is somewhere else, and my code is equivalent to your solution, although semantically (or conventionally) incorrect? Math rules!
EDIT3: Yup. What was wrong is I was building the points on length (or "forward") = abs (p1.x - p2.x) instead of actually building the distance between them. What a stupid error...
Anyways, it works just fine now! Thanks a bunch you guys! ;)