Bullet Collision Detection & Physics Library
|
Go to the source code of this file.
Macros | |
#define | VEC_ZERO_2(a) |
Zero out a 2D vector. More... | |
#define | VEC_ZERO(a) |
Zero out a 3D vector. More... | |
#define | VEC_ZERO_4(a) |
Zero out a 4D vector. More... | |
#define | VEC_COPY_2(b, a) |
Vector copy. More... | |
#define | VEC_COPY(b, a) |
Copy 3D vector. More... | |
#define | VEC_COPY_4(b, a) |
Copy 4D vector. More... | |
#define | VEC_SWAP(b, a) |
VECTOR SWAP. More... | |
#define | VEC_DIFF_2(v21, v2, v1) |
Vector difference. More... | |
#define | VEC_DIFF(v21, v2, v1) |
Vector difference. More... | |
#define | VEC_DIFF_4(v21, v2, v1) |
Vector difference. More... | |
#define | VEC_SUM_2(v21, v2, v1) |
Vector sum. More... | |
#define | VEC_SUM(v21, v2, v1) |
Vector sum. More... | |
#define | VEC_SUM_4(v21, v2, v1) |
Vector sum. More... | |
#define | VEC_SCALE_2(c, a, b) |
scalar times vector More... | |
#define | VEC_SCALE(c, a, b) |
scalar times vector More... | |
#define | VEC_SCALE_4(c, a, b) |
scalar times vector More... | |
#define | VEC_ACCUM_2(c, a, b) |
accumulate scaled vector More... | |
#define | VEC_ACCUM(c, a, b) |
accumulate scaled vector More... | |
#define | VEC_ACCUM_4(c, a, b) |
accumulate scaled vector More... | |
#define | VEC_DOT_2(a, b) ((a)[0] * (b)[0] + (a)[1] * (b)[1]) |
Vector dot product. More... | |
#define | VEC_DOT(a, b) ((a)[0] * (b)[0] + (a)[1] * (b)[1] + (a)[2] * (b)[2]) |
Vector dot product. More... | |
#define | VEC_DOT_4(a, b) ((a)[0] * (b)[0] + (a)[1] * (b)[1] + (a)[2] * (b)[2] + (a)[3] * (b)[3]) |
Vector dot product. More... | |
#define | VEC_IMPACT_SQ(bsq, direction, position) |
vector impact parameter (squared) More... | |
#define | VEC_IMPACT(bsq, direction, position) |
vector impact parameter More... | |
#define | VEC_LENGTH_2(a, l) |
Vector length. More... | |
#define | VEC_LENGTH(a, l) |
Vector length. More... | |
#define | VEC_LENGTH_4(a, l) |
Vector length. More... | |
#define | VEC_INV_LENGTH_2(a, l) |
Vector inv length. More... | |
#define | VEC_INV_LENGTH(a, l) |
Vector inv length. More... | |
#define | VEC_INV_LENGTH_4(a, l) |
Vector inv length. More... | |
#define | VEC_DISTANCE(_len, _va, _vb) |
distance between two points More... | |
#define | VEC_CONJUGATE_LENGTH(a, l) |
Vector length. More... | |
#define | VEC_NORMALIZE(a) |
Vector length. More... | |
#define | VEC_RENORMALIZE(a, newlen) |
Set Vector size. More... | |
#define | VEC_CROSS(c, a, b) |
Vector cross. More... | |
#define | VEC_PERPENDICULAR(vp, v, n) |
#define | VEC_PARALLEL(vp, v, n) |
#define | VEC_PROJECT(vp, v, n) |
#define | VEC_UNPROJECT(vp, v, n) |
#define | VEC_REFLECT(vr, v, n) |
#define | VEC_BLEND_AB(vr, sa, a, sb, b) |
#define | VEC_BLEND(vr, a, b, s) VEC_BLEND_AB(vr, (1 - s), a, s, b) |
#define | VEC_SET3(a, b, op, c) |
#define | VEC_MAYOR_COORD(vec, maxc) |
Finds the bigger cartesian coordinate from a vector. More... | |
#define | VEC_MINOR_AXES(vec, i0, i1) |
Finds the 2 smallest cartesian coordinates from a vector. More... | |
#define | VEC_EQUAL(v1, v2) (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) |
#define | VEC_NEAR_EQUAL(v1, v2) (GIM_NEAR_EQUAL(v1[0], v2[0]) && GIM_NEAR_EQUAL(v1[1], v2[1]) && GIM_NEAR_EQUAL(v1[2], v2[2])) |
#define | X_AXIS_CROSS_VEC(dst, src) |
Vector cross. More... | |
#define | Y_AXIS_CROSS_VEC(dst, src) |
#define | Z_AXIS_CROSS_VEC(dst, src) |
#define | IDENTIFY_MATRIX_3X3(m) |
initialize matrix More... | |
#define | IDENTIFY_MATRIX_4X4(m) |
#define | ZERO_MATRIX_4X4(m) |
#define | ROTX_CS(m, cosine, sine) |
#define | ROTY_CS(m, cosine, sine) |
#define | ROTZ_CS(m, cosine, sine) |
#define | COPY_MATRIX_2X2(b, a) |
#define | COPY_MATRIX_2X3(b, a) |
#define | COPY_MATRIX_3X3(b, a) |
#define | COPY_MATRIX_4X4(b, a) |
#define | TRANSPOSE_MATRIX_2X2(b, a) |
#define | TRANSPOSE_MATRIX_3X3(b, a) |
#define | TRANSPOSE_MATRIX_4X4(b, a) |
#define | SCALE_MATRIX_2X2(b, s, a) |
#define | SCALE_MATRIX_3X3(b, s, a) |
#define | SCALE_MATRIX_4X4(b, s, a) |
#define | SCALE_VEC_MATRIX_2X2(b, svec, a) |
#define | SCALE_VEC_MATRIX_3X3(b, svec, a) |
#define | SCALE_VEC_MATRIX_4X4(b, svec, a) |
#define | ACCUM_SCALE_MATRIX_2X2(b, s, a) |
#define | ACCUM_SCALE_MATRIX_3X3(b, s, a) |
#define | ACCUM_SCALE_MATRIX_4X4(b, s, a) |
#define | MATRIX_PRODUCT_2X2(c, a, b) |
#define | MATRIX_PRODUCT_3X3(c, a, b) |
#define | MATRIX_PRODUCT_4X4(c, a, b) |
#define | MAT_DOT_VEC_2X2(p, m, v) |
#define | MAT_DOT_VEC_3X3(p, m, v) |
#define | MAT_DOT_VEC_4X4(p, m, v) |
#define | MAT_DOT_VEC_3X4(p, m, v) |
#define | VEC_DOT_MAT_3X3(p, v, m) |
#define | MAT_DOT_VEC_2X3(p, m, v) |
The matrix is assumed to be an affine matrix, with last two entries representing a translation. More... | |
#define | MAT_TRANSFORM_PLANE_4X4(pout, m, plane) |
Transform a plane. More... | |
#define | INV_TRANSP_MAT_DOT_VEC_2X2(p, m, v) |
inverse transpose of matrix times vector More... | |
#define | NORM_XFORM_2X2(p, m, v) |
transform normal vector by inverse transpose of matrix and then renormalize the vector More... | |
#define | OUTER_PRODUCT_2X2(m, v, t) |
outer product of vector times vector transpose More... | |
#define | OUTER_PRODUCT_3X3(m, v, t) |
outer product of vector times vector transpose More... | |
#define | OUTER_PRODUCT_4X4(m, v, t) |
outer product of vector times vector transpose More... | |
#define | ACCUM_OUTER_PRODUCT_2X2(m, v, t) |
outer product of vector times vector transpose More... | |
#define | ACCUM_OUTER_PRODUCT_3X3(m, v, t) |
outer product of vector times vector transpose More... | |
#define | ACCUM_OUTER_PRODUCT_4X4(m, v, t) |
outer product of vector times vector transpose More... | |
#define | DETERMINANT_2X2(d, m) |
determinant of matrix More... | |
#define | DETERMINANT_3X3(d, m) |
determinant of matrix More... | |
#define | COFACTOR_4X4_IJ(fac, m, i, j) |
i,j,th cofactor of a 4x4 matrix More... | |
#define | DETERMINANT_4X4(d, m) |
determinant of matrix More... | |
#define | COFACTOR_2X2(a, m) |
cofactor of matrix More... | |
#define | COFACTOR_3X3(a, m) |
cofactor of matrix More... | |
#define | COFACTOR_4X4(a, m) |
cofactor of matrix More... | |
#define | ADJOINT_2X2(a, m) |
adjoint of matrix More... | |
#define | ADJOINT_3X3(a, m) |
adjoint of matrix More... | |
#define | ADJOINT_4X4(a, m) |
adjoint of matrix More... | |
#define | SCALE_ADJOINT_2X2(a, s, m) |
compute adjoint of matrix and scale More... | |
#define | SCALE_ADJOINT_3X3(a, s, m) |
compute adjoint of matrix and scale More... | |
#define | SCALE_ADJOINT_4X4(a, s, m) |
compute adjoint of matrix and scale More... | |
#define | INVERT_2X2(b, det, a) |
inverse of matrix More... | |
#define | INVERT_3X3(b, det, a) |
inverse of matrix More... | |
#define | INVERT_4X4(b, det, a) |
inverse of matrix More... | |
#define | MAT_GET_ROW(mat, vec3, rowindex) |
Get the triple(3) row of a transform matrix. More... | |
#define | MAT_GET_ROW2(mat, vec2, rowindex) |
Get the tuple(2) row of a transform matrix. More... | |
#define | MAT_GET_ROW4(mat, vec4, rowindex) |
Get the quad (4) row of a transform matrix. More... | |
#define | MAT_GET_COL(mat, vec3, colindex) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_GET_COL2(mat, vec2, colindex) |
Get the tuple(2) col of a transform matrix. More... | |
#define | MAT_GET_COL4(mat, vec4, colindex) |
Get the quad (4) col of a transform matrix. More... | |
#define | MAT_GET_X(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_GET_Y(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_GET_Z(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_SET_X(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_SET_Y(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_SET_Z(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_GET_TRANSLATION(mat, vec3) |
Get the triple(3) col of a transform matrix. More... | |
#define | MAT_SET_TRANSLATION(mat, vec3) |
Set the triple(3) col of a transform matrix. More... | |
#define | MAT_DOT_ROW(mat, vec3, rowindex) (vec3[0] * mat[rowindex][0] + vec3[1] * mat[rowindex][1] + vec3[2] * mat[rowindex][2]) |
Returns the dot product between a vec3f and the row of a matrix. More... | |
#define | MAT_DOT_ROW2(mat, vec2, rowindex) (vec2[0] * mat[rowindex][0] + vec2[1] * mat[rowindex][1]) |
Returns the dot product between a vec2f and the row of a matrix. More... | |
#define | MAT_DOT_ROW4(mat, vec4, rowindex) (vec4[0] * mat[rowindex][0] + vec4[1] * mat[rowindex][1] + vec4[2] * mat[rowindex][2] + vec4[3] * mat[rowindex][3]) |
Returns the dot product between a vec4f and the row of a matrix. More... | |
#define | MAT_DOT_COL(mat, vec3, colindex) (vec3[0] * mat[0][colindex] + vec3[1] * mat[1][colindex] + vec3[2] * mat[2][colindex]) |
Returns the dot product between a vec3f and the col of a matrix. More... | |
#define | MAT_DOT_COL2(mat, vec2, colindex) (vec2[0] * mat[0][colindex] + vec2[1] * mat[1][colindex]) |
Returns the dot product between a vec2f and the col of a matrix. More... | |
#define | MAT_DOT_COL4(mat, vec4, colindex) (vec4[0] * mat[0][colindex] + vec4[1] * mat[1][colindex] + vec4[2] * mat[2][colindex] + vec4[3] * mat[3][colindex]) |
Returns the dot product between a vec4f and the col of a matrix. More... | |
#define | INV_MAT_DOT_VEC_3X3(p, m, v) |
Definition in file gim_linear_math.h.
#define ACCUM_OUTER_PRODUCT_2X2 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 1054 of file gim_linear_math.h.
#define ACCUM_OUTER_PRODUCT_3X3 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 1068 of file gim_linear_math.h.
#define ACCUM_OUTER_PRODUCT_4X4 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 1088 of file gim_linear_math.h.
#define ACCUM_SCALE_MATRIX_2X2 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 766 of file gim_linear_math.h.
#define ACCUM_SCALE_MATRIX_3X3 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 776 of file gim_linear_math.h.
#define ACCUM_SCALE_MATRIX_4X4 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 792 of file gim_linear_math.h.
#define ADJOINT_2X2 | ( | a, | |
m | |||
) |
adjoint of matrix
Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix)
Definition at line 1222 of file gim_linear_math.h.
#define ADJOINT_3X3 | ( | a, | |
m | |||
) |
adjoint of matrix
Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix)
Definition at line 1235 of file gim_linear_math.h.
#define ADJOINT_4X4 | ( | a, | |
m | |||
) |
adjoint of matrix
Computes adjoint of matrix m, returning a (Note that adjoint is just the transpose of the cofactor matrix)
Definition at line 1253 of file gim_linear_math.h.
#define COFACTOR_2X2 | ( | a, | |
m | |||
) |
cofactor of matrix
Computes cofactor of matrix m, returning a
Definition at line 1175 of file gim_linear_math.h.
#define COFACTOR_3X3 | ( | a, | |
m | |||
) |
cofactor of matrix
Computes cofactor of matrix m, returning a
Definition at line 1187 of file gim_linear_math.h.
#define COFACTOR_4X4 | ( | a, | |
m | |||
) |
cofactor of matrix
Computes cofactor of matrix m, returning a
Definition at line 1204 of file gim_linear_math.h.
#define COFACTOR_4X4_IJ | ( | fac, | |
m, | |||
i, | |||
j | |||
) |
i,j,th cofactor of a 4x4 matrix
Definition at line 1134 of file gim_linear_math.h.
#define COPY_MATRIX_2X2 | ( | b, | |
a | |||
) |
matrix copy
Definition at line 554 of file gim_linear_math.h.
#define COPY_MATRIX_2X3 | ( | b, | |
a | |||
) |
matrix copy
Definition at line 564 of file gim_linear_math.h.
#define COPY_MATRIX_3X3 | ( | b, | |
a | |||
) |
matrix copy
Definition at line 576 of file gim_linear_math.h.
#define COPY_MATRIX_4X4 | ( | b, | |
a | |||
) |
matrix copy
Definition at line 592 of file gim_linear_math.h.
#define DETERMINANT_2X2 | ( | d, | |
m | |||
) |
determinant of matrix
Computes determinant of matrix m, returning d
Definition at line 1115 of file gim_linear_math.h.
#define DETERMINANT_3X3 | ( | d, | |
m | |||
) |
determinant of matrix
Computes determinant of matrix m, returning d
Definition at line 1124 of file gim_linear_math.h.
#define DETERMINANT_4X4 | ( | d, | |
m | |||
) |
determinant of matrix
Computes determinant of matrix m, returning d
Definition at line 1158 of file gim_linear_math.h.
#define IDENTIFY_MATRIX_3X3 | ( | m | ) |
initialize matrix
Definition at line 412 of file gim_linear_math.h.
#define IDENTIFY_MATRIX_4X4 | ( | m | ) |
initialize matrix
Definition at line 428 of file gim_linear_math.h.
#define INV_MAT_DOT_VEC_3X3 | ( | p, | |
m, | |||
v | |||
) |
Transpose matrix times vector v is a vec3f and m is a mat4f
Definition at line 1481 of file gim_linear_math.h.
#define INV_TRANSP_MAT_DOT_VEC_2X2 | ( | p, | |
m, | |||
v | |||
) |
inverse transpose of matrix times vector
This macro computes inverse transpose of matrix m, and multiplies vector v into it, to yeild vector p
DANGER !!! Do Not use this on normal vectors!!! It will leave normals the wrong length !!! See macro below for use on normals.
Definition at line 942 of file gim_linear_math.h.
#define INVERT_2X2 | ( | b, | |
det, | |||
a | |||
) |
inverse of matrix
Compute inverse of matrix a, returning determinant m and inverse b
Definition at line 1319 of file gim_linear_math.h.
#define INVERT_3X3 | ( | b, | |
det, | |||
a | |||
) |
inverse of matrix
Compute inverse of matrix a, returning determinant m and inverse b
Definition at line 1332 of file gim_linear_math.h.
#define INVERT_4X4 | ( | b, | |
det, | |||
a | |||
) |
inverse of matrix
Compute inverse of matrix a, returning determinant m and inverse b
Definition at line 1345 of file gim_linear_math.h.
#define MAT_DOT_COL | ( | mat, | |
vec3, | |||
colindex | |||
) | (vec3[0] * mat[0][colindex] + vec3[1] * mat[1][colindex] + vec3[2] * mat[2][colindex]) |
Returns the dot product between a vec3f and the col of a matrix.
Definition at line 1469 of file gim_linear_math.h.
#define MAT_DOT_COL2 | ( | mat, | |
vec2, | |||
colindex | |||
) | (vec2[0] * mat[0][colindex] + vec2[1] * mat[1][colindex]) |
Returns the dot product between a vec2f and the col of a matrix.
Definition at line 1472 of file gim_linear_math.h.
#define MAT_DOT_COL4 | ( | mat, | |
vec4, | |||
colindex | |||
) | (vec4[0] * mat[0][colindex] + vec4[1] * mat[1][colindex] + vec4[2] * mat[2][colindex] + vec4[3] * mat[3][colindex]) |
Returns the dot product between a vec4f and the col of a matrix.
Definition at line 1475 of file gim_linear_math.h.
#define MAT_DOT_ROW | ( | mat, | |
vec3, | |||
rowindex | |||
) | (vec3[0] * mat[rowindex][0] + vec3[1] * mat[rowindex][1] + vec3[2] * mat[rowindex][2]) |
Returns the dot product between a vec3f and the row of a matrix.
Definition at line 1460 of file gim_linear_math.h.
#define MAT_DOT_ROW2 | ( | mat, | |
vec2, | |||
rowindex | |||
) | (vec2[0] * mat[rowindex][0] + vec2[1] * mat[rowindex][1]) |
Returns the dot product between a vec2f and the row of a matrix.
Definition at line 1463 of file gim_linear_math.h.
#define MAT_DOT_ROW4 | ( | mat, | |
vec4, | |||
rowindex | |||
) | (vec4[0] * mat[rowindex][0] + vec4[1] * mat[rowindex][1] + vec4[2] * mat[rowindex][2] + vec4[3] * mat[rowindex][3]) |
Returns the dot product between a vec4f and the row of a matrix.
Definition at line 1466 of file gim_linear_math.h.
#define MAT_DOT_VEC_2X2 | ( | p, | |
m, | |||
v | |||
) |
matrix times vector
Definition at line 869 of file gim_linear_math.h.
#define MAT_DOT_VEC_2X3 | ( | p, | |
m, | |||
v | |||
) |
The matrix is assumed to be an affine matrix, with last two entries representing a translation.
affine matrix times vector
Definition at line 918 of file gim_linear_math.h.
#define MAT_DOT_VEC_3X3 | ( | p, | |
m, | |||
v | |||
) |
matrix times vector
Definition at line 876 of file gim_linear_math.h.
#define MAT_DOT_VEC_3X4 | ( | p, | |
m, | |||
v | |||
) |
matrix times vector v is a vec3f and m is a mat4f
Last column is added as the position
Definition at line 899 of file gim_linear_math.h.
#define MAT_DOT_VEC_4X4 | ( | p, | |
m, | |||
v | |||
) |
matrix times vector v is a vec4f
Definition at line 886 of file gim_linear_math.h.
#define MAT_GET_COL | ( | mat, | |
vec3, | |||
colindex | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1378 of file gim_linear_math.h.
#define MAT_GET_COL2 | ( | mat, | |
vec2, | |||
colindex | |||
) |
Get the tuple(2) col of a transform matrix.
Definition at line 1386 of file gim_linear_math.h.
#define MAT_GET_COL4 | ( | mat, | |
vec4, | |||
colindex | |||
) |
Get the quad (4) col of a transform matrix.
Definition at line 1393 of file gim_linear_math.h.
#define MAT_GET_ROW | ( | mat, | |
vec3, | |||
rowindex | |||
) |
Get the triple(3) row of a transform matrix.
Definition at line 1354 of file gim_linear_math.h.
#define MAT_GET_ROW2 | ( | mat, | |
vec2, | |||
rowindex | |||
) |
Get the tuple(2) row of a transform matrix.
Definition at line 1362 of file gim_linear_math.h.
#define MAT_GET_ROW4 | ( | mat, | |
vec4, | |||
rowindex | |||
) |
Get the quad (4) row of a transform matrix.
Definition at line 1369 of file gim_linear_math.h.
#define MAT_GET_TRANSLATION | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1444 of file gim_linear_math.h.
#define MAT_GET_X | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1402 of file gim_linear_math.h.
#define MAT_GET_Y | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1408 of file gim_linear_math.h.
#define MAT_GET_Z | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1414 of file gim_linear_math.h.
#define MAT_SET_TRANSLATION | ( | mat, | |
vec3 | |||
) |
Set the triple(3) col of a transform matrix.
Definition at line 1452 of file gim_linear_math.h.
#define MAT_SET_X | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1420 of file gim_linear_math.h.
#define MAT_SET_Y | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1428 of file gim_linear_math.h.
#define MAT_SET_Z | ( | mat, | |
vec3 | |||
) |
Get the triple(3) col of a transform matrix.
Definition at line 1436 of file gim_linear_math.h.
#define MAT_TRANSFORM_PLANE_4X4 | ( | pout, | |
m, | |||
plane | |||
) |
Transform a plane.
Definition at line 925 of file gim_linear_math.h.
#define MATRIX_PRODUCT_2X2 | ( | c, | |
a, | |||
b | |||
) |
matrix product
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];
Definition at line 817 of file gim_linear_math.h.
#define MATRIX_PRODUCT_3X3 | ( | c, | |
a, | |||
b | |||
) |
matrix product
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];
Definition at line 828 of file gim_linear_math.h.
#define MATRIX_PRODUCT_4X4 | ( | c, | |
a, | |||
b | |||
) |
matrix product
c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];
Definition at line 845 of file gim_linear_math.h.
#define NORM_XFORM_2X2 | ( | p, | |
m, | |||
v | |||
) |
transform normal vector by inverse transpose of matrix and then renormalize the vector
This macro computes inverse transpose of matrix m, and multiplies vector v into it, to yeild vector p Vector p is then normalized.
Definition at line 966 of file gim_linear_math.h.
#define OUTER_PRODUCT_2X2 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 992 of file gim_linear_math.h.
#define OUTER_PRODUCT_3X3 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 1006 of file gim_linear_math.h.
#define OUTER_PRODUCT_4X4 | ( | m, | |
v, | |||
t | |||
) |
outer product of vector times vector transpose
The outer product of vector v and vector transpose t yeilds dyadic matrix m.
Definition at line 1026 of file gim_linear_math.h.
#define ROTX_CS | ( | m, | |
cosine, | |||
sine | |||
) |
matrix rotation X
Definition at line 476 of file gim_linear_math.h.
#define ROTY_CS | ( | m, | |
cosine, | |||
sine | |||
) |
matrix rotation Y
Definition at line 502 of file gim_linear_math.h.
#define ROTZ_CS | ( | m, | |
cosine, | |||
sine | |||
) |
matrix rotation Z
Definition at line 528 of file gim_linear_math.h.
#define SCALE_ADJOINT_2X2 | ( | a, | |
s, | |||
m | |||
) |
compute adjoint of matrix and scale
Computes adjoint of matrix m, scales it by s, returning a
Definition at line 1270 of file gim_linear_math.h.
#define SCALE_ADJOINT_3X3 | ( | a, | |
s, | |||
m | |||
) |
compute adjoint of matrix and scale
Computes adjoint of matrix m, scales it by s, returning a
Definition at line 1282 of file gim_linear_math.h.
#define SCALE_ADJOINT_4X4 | ( | a, | |
s, | |||
m | |||
) |
compute adjoint of matrix and scale
Computes adjoint of matrix m, scales it by s, returning a
Definition at line 1301 of file gim_linear_math.h.
#define SCALE_MATRIX_2X2 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 666 of file gim_linear_math.h.
#define SCALE_MATRIX_3X3 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 676 of file gim_linear_math.h.
#define SCALE_MATRIX_4X4 | ( | b, | |
s, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 692 of file gim_linear_math.h.
#define SCALE_VEC_MATRIX_2X2 | ( | b, | |
svec, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 716 of file gim_linear_math.h.
#define SCALE_VEC_MATRIX_3X3 | ( | b, | |
svec, | |||
a | |||
) |
multiply matrix by scalar. Each columns is scaled by each scalar vector component
Definition at line 726 of file gim_linear_math.h.
#define SCALE_VEC_MATRIX_4X4 | ( | b, | |
svec, | |||
a | |||
) |
multiply matrix by scalar
Definition at line 742 of file gim_linear_math.h.
#define TRANSPOSE_MATRIX_2X2 | ( | b, | |
a | |||
) |
matrix transpose
Definition at line 616 of file gim_linear_math.h.
#define TRANSPOSE_MATRIX_3X3 | ( | b, | |
a | |||
) |
matrix transpose
Definition at line 626 of file gim_linear_math.h.
#define TRANSPOSE_MATRIX_4X4 | ( | b, | |
a | |||
) |
matrix transpose
Definition at line 642 of file gim_linear_math.h.
#define VEC_ACCUM | ( | c, | |
a, | |||
b | |||
) |
accumulate scaled vector
Definition at line 171 of file gim_linear_math.h.
#define VEC_ACCUM_2 | ( | c, | |
a, | |||
b | |||
) |
accumulate scaled vector
Definition at line 164 of file gim_linear_math.h.
#define VEC_ACCUM_4 | ( | c, | |
a, | |||
b | |||
) |
accumulate scaled vector
Definition at line 179 of file gim_linear_math.h.
#define VEC_BLEND | ( | vr, | |
a, | |||
b, | |||
s | |||
) | VEC_BLEND_AB(vr, (1 - s), a, s, b) |
Vector blending Takes two vectors a, b, blends them together with s <=1
Definition at line 363 of file gim_linear_math.h.
#define VEC_BLEND_AB | ( | vr, | |
sa, | |||
a, | |||
sb, | |||
b | |||
) |
Vector blending Takes two vectors a, b, blends them together with two scalars
Definition at line 354 of file gim_linear_math.h.
#define VEC_CONJUGATE_LENGTH | ( | a, | |
l | |||
) |
Vector length.
Definition at line 261 of file gim_linear_math.h.
#define VEC_COPY | ( | b, | |
a | |||
) |
Copy 3D vector.
Definition at line 67 of file gim_linear_math.h.
#define VEC_COPY_2 | ( | b, | |
a | |||
) |
Vector copy.
Definition at line 60 of file gim_linear_math.h.
#define VEC_COPY_4 | ( | b, | |
a | |||
) |
Copy 4D vector.
Definition at line 75 of file gim_linear_math.h.
#define VEC_CROSS | ( | c, | |
a, | |||
b | |||
) |
Vector cross.
Definition at line 295 of file gim_linear_math.h.
#define VEC_DIFF | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector difference.
Definition at line 99 of file gim_linear_math.h.
#define VEC_DIFF_2 | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector difference.
Definition at line 92 of file gim_linear_math.h.
#define VEC_DIFF_4 | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector difference.
Definition at line 107 of file gim_linear_math.h.
#define VEC_DISTANCE | ( | _len, | |
_va, | |||
_vb | |||
) |
distance between two points
Definition at line 253 of file gim_linear_math.h.
#define VEC_DOT | ( | a, | |
b | |||
) | ((a)[0] * (b)[0] + (a)[1] * (b)[1] + (a)[2] * (b)[2]) |
Vector dot product.
Definition at line 191 of file gim_linear_math.h.
#define VEC_DOT_2 | ( | a, | |
b | |||
) | ((a)[0] * (b)[0] + (a)[1] * (b)[1]) |
Vector dot product.
Definition at line 188 of file gim_linear_math.h.
#define VEC_DOT_4 | ( | a, | |
b | |||
) | ((a)[0] * (b)[0] + (a)[1] * (b)[1] + (a)[2] * (b)[2] + (a)[3] * (b)[3]) |
Vector dot product.
Definition at line 194 of file gim_linear_math.h.
#define VEC_DOT_MAT_3X3 | ( | p, | |
v, | |||
m | |||
) |
vector transpose times matrix
p[j] = v[0]*m[0][j] + v[1]*m[1][j] + v[2]*m[2][j];
Definition at line 908 of file gim_linear_math.h.
#define VEC_EQUAL | ( | v1, | |
v2 | |||
) | (v1[0] == v2[0] && v1[1] == v2[1] && v1[2] == v2[2]) |
Definition at line 385 of file gim_linear_math.h.
#define VEC_IMPACT | ( | bsq, | |
direction, | |||
position | |||
) |
vector impact parameter
Definition at line 204 of file gim_linear_math.h.
#define VEC_IMPACT_SQ | ( | bsq, | |
direction, | |||
position | |||
) |
vector impact parameter (squared)
Definition at line 197 of file gim_linear_math.h.
#define VEC_INV_LENGTH | ( | a, | |
l | |||
) |
Vector inv length.
Definition at line 239 of file gim_linear_math.h.
#define VEC_INV_LENGTH_2 | ( | a, | |
l | |||
) |
Vector inv length.
Definition at line 232 of file gim_linear_math.h.
#define VEC_INV_LENGTH_4 | ( | a, | |
l | |||
) |
Vector inv length.
Definition at line 246 of file gim_linear_math.h.
#define VEC_LENGTH | ( | a, | |
l | |||
) |
Vector length.
Definition at line 218 of file gim_linear_math.h.
#define VEC_LENGTH_2 | ( | a, | |
l | |||
) |
Vector length.
Definition at line 211 of file gim_linear_math.h.
#define VEC_LENGTH_4 | ( | a, | |
l | |||
) |
Vector length.
Definition at line 225 of file gim_linear_math.h.
#define VEC_MAYOR_COORD | ( | vec, | |
maxc | |||
) |
Finds the bigger cartesian coordinate from a vector.
Definition at line 371 of file gim_linear_math.h.
#define VEC_MINOR_AXES | ( | vec, | |
i0, | |||
i1 | |||
) |
Finds the 2 smallest cartesian coordinates from a vector.
Definition at line 378 of file gim_linear_math.h.
#define VEC_NEAR_EQUAL | ( | v1, | |
v2 | |||
) | (GIM_NEAR_EQUAL(v1[0], v2[0]) && GIM_NEAR_EQUAL(v1[1], v2[1]) && GIM_NEAR_EQUAL(v1[2], v2[2])) |
Definition at line 387 of file gim_linear_math.h.
#define VEC_NORMALIZE | ( | a | ) |
Vector length.
Definition at line 268 of file gim_linear_math.h.
#define VEC_PARALLEL | ( | vp, | |
v, | |||
n | |||
) |
#define VEC_PERPENDICULAR | ( | vp, | |
v, | |||
n | |||
) |
#define VEC_PROJECT | ( | vp, | |
v, | |||
n | |||
) |
Same as Vector parallel – n can have any length accepts vector v, subtracts out any component perpendicular to n
Definition at line 323 of file gim_linear_math.h.
#define VEC_REFLECT | ( | vr, | |
v, | |||
n | |||
) |
Vector reflection – assumes n is of unit length Takes vector v, reflects it against reflector n, and returns vr
Definition at line 344 of file gim_linear_math.h.
#define VEC_RENORMALIZE | ( | a, | |
newlen | |||
) |
Set Vector size.
Definition at line 281 of file gim_linear_math.h.
#define VEC_SCALE | ( | c, | |
a, | |||
b | |||
) |
scalar times vector
Definition at line 147 of file gim_linear_math.h.
#define VEC_SCALE_2 | ( | c, | |
a, | |||
b | |||
) |
scalar times vector
Definition at line 140 of file gim_linear_math.h.
#define VEC_SCALE_4 | ( | c, | |
a, | |||
b | |||
) |
scalar times vector
Definition at line 155 of file gim_linear_math.h.
#define VEC_SET3 | ( | a, | |
b, | |||
op, | |||
c | |||
) |
Definition at line 365 of file gim_linear_math.h.
#define VEC_SUM | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector sum.
Definition at line 123 of file gim_linear_math.h.
#define VEC_SUM_2 | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector sum.
Definition at line 116 of file gim_linear_math.h.
#define VEC_SUM_4 | ( | v21, | |
v2, | |||
v1 | |||
) |
Vector sum.
Definition at line 131 of file gim_linear_math.h.
#define VEC_SWAP | ( | b, | |
a | |||
) |
VECTOR SWAP.
Definition at line 84 of file gim_linear_math.h.
#define VEC_UNPROJECT | ( | vp, | |
v, | |||
n | |||
) |
accepts vector v
Definition at line 333 of file gim_linear_math.h.
#define VEC_ZERO | ( | a | ) |
Zero out a 3D vector.
Definition at line 48 of file gim_linear_math.h.
#define VEC_ZERO_2 | ( | a | ) |
Zero out a 2D vector.
Definition at line 42 of file gim_linear_math.h.
#define VEC_ZERO_4 | ( | a | ) |
Zero out a 4D vector.
Definition at line 54 of file gim_linear_math.h.
#define X_AXIS_CROSS_VEC | ( | dst, | |
src | |||
) |
Vector cross.
Definition at line 390 of file gim_linear_math.h.
#define Y_AXIS_CROSS_VEC | ( | dst, | |
src | |||
) |
Definition at line 397 of file gim_linear_math.h.
#define Z_AXIS_CROSS_VEC | ( | dst, | |
src | |||
) |
Definition at line 404 of file gim_linear_math.h.
#define ZERO_MATRIX_4X4 | ( | m | ) |
initialize matrix
Definition at line 452 of file gim_linear_math.h.