D3DXVECTOR3

Started by
12 comments, last by dehseth 15 years, 9 months ago
Quote:
I am a lil bit confused about definition of D3DXVECTOR3 in directX 9. As far as I know a vector is a quantity, defined by both magnitude and direction.

In directX 9 if you define a D3DXVECTOR3 type variable, your variable has 3 parameter which are x, y, z. These x, y, z is a point in space.

So how come a point is defined as vector?


A point is not defined as a vector.

If B=(i, j, k) is an ordered basis for 3D vectors, then for any 3D vector v, there exist unique scalars a1, a2, a3 such that:

v = a1*i + a2*j + a3*k

So given a basis, the coordinates (a1, a2, a3) are enough to uniquely identify the vector v, and we say that [v]_B is the coordinate representation of the vector v.

In computation, we always work with coordinate vectors which are relative to some working basis.
-----Quat
Advertisement
Quote:Original post by XVincentX
So, from the vector (B-A) rapresent a direction of all vector flush to the one that passes in A and B points, it's right?

This is correct. You'll sometimes see vectors (at least in two dimensions) plotted like this:
Vector Field
All of those arrows represent the same vector (namely <-1.5, 1.5>, -1.5i + 1.5j, or for our purposes, a D3DXVECTOR2( -1.5f, 1.5f )). The vectors do not have any inherent position information, they're just a displacement, as jpetrie mentioned.
Ok!
This was what i wanted to know.
Thank you guys!
MCA

This topic is closed to new replies.

Advertisement