br_vector4
typedef
vector.h
for precise declaration and ordering)
br_scalar v[4] Ordinates (0=x, 1=y, 2=z, 3=w)
BrMatrix34TApply()
192
, BrMatrix4
[T
]Apply
[V
|P
]()
216
-219.
br_matrix4
214
.
Remember that BRender has a right handed co-ordinate system and so, with the x axis positive to the right, and the y axis positive upwards, the z axis is therefore positive toward you (typically, the z axis points out of the screen).
Pointer to left hand vector (may be same as source).
Pointers to right hand vector.
Returns the dot product of the two source vectors. Equivalent to:
A pointer to the destination vector (may be same as source).
A pointer to the source vector.
All other initialisation should use member-wise initialisation or the function
Members
First, second, third and fourth ordinate. Conventionally, the first ordinate is the x-axis component, the second, the y axis component, the third, the z axis component, and the fourth, the divisor.br_scalar v[4]
Arithmetic
Description:
Calculate the dot product of two vectors. Equivalent to the expression:BrVector4Dot()
br_scalar BrVector4Dot(const br_vector4* v1, const br_vector4* v2)
const br_vector4 * v1
const br_vector4 * v2
br_scalar
Copy/Assign
Although copy by structure assignment currently works, use BrVector4Copy()
366 to ensure compatibility.
Description:
Copy a vector. Equivalent to the expression:BrVector4Copy()
void BrVector4Copy(br_vector4* v1, const br_vector4* v2)
br_vector4 * v1
const br_vector4 * v2
Referencing & Lifetime
This structure may be freely referenced, though take care if there is potential to supply the same vector as more than one argument to the same function. Initialisation
The following macro may be used as a static initialiser.
BR_VECTOR4(a,b,c,d)
Macro expands to {BR_SCALAR(a),BR_SCALAR(b),BR_SCALAR(c),BR_SCALAR(d)}
.BrVector4Copy()
366
Generated with CERN WebMaker