Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - 12pool3

Pages: [1]
1
SFML projects / Vector Math Library
« on: April 11, 2010, 04:18:43 pm »
Quote from: "bullno1"
Any chance for SSE support?  :wink:


I agree, SSE2 optimizations would be nice, since they are supported on everything since Pentium 4.

2
SFML projects / Vector Math Library
« on: April 11, 2010, 03:45:22 pm »
Hey, very nice library.
I understand that a 'cross product', in it's sense, is only defined in 3-dimensional space; but there is that 'hack' for getting the perpendicular vector of a 2-D vector using the cross product.
You extend the 2-D vector to 3-D and add a z-component of zero and then find the cross product of that and a unit vector parallel to the z-axis (0,0,1); if you return the result of this as a 2-D vector (the z component will be zero anyway), then you get a vector that is perpendicular to the initial 2-D vector.
I was wondering if you could implement this somehow in the 2D vector class, maybe as a new method 'perpendicular' or whatever. (your existing 'cross' method for the Vector 2D class only returns the magnitude/z-value of the cross product between the two 2d vectors)

Anyway, I really hope you continue with this, it's very helpful.

Pages: [1]