-
Junior Member
Regular Contributor
Direction and vector
hello.
I'm a beginner.
How i can calculate the direction vector if I have two point A and B?
I'm in a tree dimensional space with opengl then A={1,1,0} and B={2,2,1} for example.
Is sufficent do B - A ? or is different A - B?
The direction is a 3d vector?
Thanks.
-
Senior Member
OpenGL Pro
Re: Direction and vector
To obtain a direction, calculate A-B, then normalise the result.
The sign(s) of the resultant direction vector is really telling you if your direction is A-->B or B-->A.
-
Super Moderator
OpenGL Lord
Re: Direction and vector
It depends if you go from A to B or from B to A 
A to B is B-A
Depending on the case, direction vector must be normalized, but not sure it applies to your case.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules