If the W is 1, the vector is treated as a point when being multiplied by a matrix. That is, it will be translated, rotated and scaled!
I'm used to the terms "position vector" (if w!=0) and "direction vector" or "difference vector" (if w==0).
Notice that w can be anything, and that any vector with w!=0 denotes a position.
I assume not length.... It would be odd if W took part in the Length operation as the vector (2, 2, 2, 0) and the point (2, 2, 2, 1) would have different results.
This is because a position has no length. What you want instead is the distance of the position from a reference point, e.g. (0,0,0,1), hence computing
| (2,2,2,1) - ( 0,0,0,1 ) | = | (2,2,2,0) |
You should make a distinction between positions and directions based on axioms like these:
a) position + direction =: position
b) hence position - position =: direction (or difference)
c) position + position =: positionunnormalized
d) direction + direction = direction
So, should i just ignore W for these operations: Addition, Subtraction, Scalar Multiplication, Dot Product, Cross Product, Length and Projection?
Of course not! Certain operations like the cross-product do not make much sense in 4D. The length is something meaningful for direction vectors only (see above).
But then what happens when a Vector with a W of 0 and a Vector with a W of 1 are added? Point + Vector = Point makes sense in my head. But Vector + Point = ? That doesn't really make much sense...
Why should "Point + Vector" be different from "Vector + Point"? Vector addition is commutative.
Does this make sense to anyone else? How do you handle the W component of a Vector4?
A Vector4 has the explicit distinction of position vs. direction semantics. This absolutely makes sense.