include/SIL/math/matrix.h
static inline void mat4_translate(Matrix4f *dest, const Matrix4f *src,
                                  const Vector3f *v)
{
    dest->_11 = src->_11;
    dest->_12 = src->_12;
    dest->_13 = src->_13;
    dest->_14 = src->_14;
    dest->_21 = src->_21;
    dest->_22 = src->_22;
    dest->_23 = src->_23;
    dest->_24 = src->_24;
    dest->_31 = src->_31;
    dest->_32 = src->_32;
    dest->_33 = src->_33;
    dest->_34 = src->_34;
    dest->_41 = src->_11*v->x + src->_21*v->y + src->_31*v->z + src->_41;
    dest->_42 = src->_12*v->x + src->_22*v->y + src->_32*v->z + src->_42;
    dest->_43 = src->_13*v->x + src->_23*v->y + src->_33*v->z + src->_43;
    dest->_44 = src->_14*v->x + src->_24*v->y + src->_34*v->z + src->_44;
}
/**
 * mat4_translate:  Given a coordinate transformation matrix, apply a
 * translation by the given vector and return the resulting matrix.
 *
 * Ignoring rounding error, the following assertion holds for any v and m:
 *     Vector3f v2;
 *     mat4_vec3_transform(&v2, &v, &m);
 *     Matrix4f m2;
 *     mat4_translate(&m2, &m, &v);
 *     ASSERT(m2._41 == v2.x && m2._42 == v2.y && m2._43 == v2.z);
 *
 * [Parameters]
 *     dest: Pointer to matrix in which to store result.
 *     src: Pointer to input matrix.
 *     v: Pointer to vector to translate by.
 */
Given a coordinate transformation matrix, apply a
translation by the given vector and return the resulting matrix.



[Parameters]
dest: Pointer to matrix in which to store result.
src: Pointer to input matrix.
v: Pointer to vector to translate by.
Given a coordinate transformation matrix apply a translation by the given vector and return the resulting matrix . [ Parameters ] dest : Pointer to matrix in which to store result . src : Pointer to input matrix . v : Pointer to vector to translate by .
static inline void mat4_translate(Matrix4f *dest, const Matrix4f *src,
                                  const Vector3f *v)
{
    dest->_11 = src->_11;
    dest->_12 = src->_12;
    dest->_13 = src->_13;
    dest->_14 = src->_14;
    dest->_21 = src->_21;
    dest->_22 = src->_22;
    dest->_23 = src->_23;
    dest->_24 = src->_24;
    dest->_31 = src->_31;
    dest->_32 = src->_32;
    dest->_33 = src->_33;
    dest->_34 = src->_34;
    dest->_41 = src->_11*v->x + src->_21*v->y + src->_31*v->z + src->_41;
    dest->_42 = src->_12*v->x + src->_22*v->y + src->_32*v->z + src->_42;
    dest->_43 = src->_13*v->x + src->_23*v->y + src->_33*v->z + src->_43;
    dest->_44 = src->_14*v->x + src->_24*v->y + src->_34*v->z + src->_44;
}
static inline void mat4_translate ( Matrix4f * dest , const Matrix4f * src , const Vector3f * v ) { dest -> _11 = src -> _11 ; dest -> _12 = src -> _12 ; dest -> _13 = src -> _13 ; dest -> _14 = src -> _14 ; dest -> _21 = src -> _21 ; dest -> _22 = src -> _22 ; dest -> _23 = src -> _23 ; dest -> _24 = src -> _24 ; dest -> _31 = src -> _31 ; dest -> _32 = src -> _32 ; dest -> _33 = src -> _33 ; dest -> _34 = src -> _34 ; dest -> _41 = src -> _11 * v -> x + src -> _21 * v -> y + src -> _31 * v -> z + src -> _41 ; dest -> _42 = src -> _12 * v -> x + src -> _22 * v -> y + src -> _32 * v -> z + src -> _42 ; dest -> _43 = src -> _13 * v -> x + src -> _23 * v -> y + src -> _33 * v -> z + src -> _43 ; dest -> _44 = src -> _14 * v -> x + src -> _24 * v -> y + src -> _34 * v -> z + src -> _44 ; }
mat4_translate:  Given a coordinate transformation matrix, apply a
 translation by the given vector and return the resulting matrix.
mat4_translate : Given a coordinate transformation matrix apply a translation by the given vector and return the resulting matrix .