102 Dalmatians: Puppies to the Rescue
Decompilation Source Reference | GitLab repository
Loading...
Searching...
No Matches
matrices.c File Reference
#include "pcdogs/math/constants.h"
#include "pcdogs/image/globals.h"
#include "pcdogs/math/functions.h"
#include "pcdogs/math/globals.h"
#include "pcdogs/math/types.h"
#include <string.h>

Go to the source code of this file.

Functions

void Math_MulMat3x3Q12 (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *right_factor, struct Math_Matrix3x3I16 const *left_factor)
static void copy_rotation_matrix (struct Math_Matrix3x3I16 *out, const union Math_RotationScratch *scratch)
void Math_BuildMatrixRotationX (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
void Math_BuildMatrixRotationY (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
void Math_BuildMatrixRotationZ (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle)
void Math_BuildMatrixRotationXY (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y)
void Math_BuildRotationMatrix (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int32_t angle_x, int32_t angle_y, int32_t angle_z)
void Math_BuildRotationMatrixFromXYSinCos (struct Math_Matrix3x3I16 *out_matrix, struct Math_Matrix3x3I16 const *left_factor, int16_t sin_x_q12, int16_t cos_x_q12, int16_t sin_y_q12, int16_t cos_y_q12, int32_t angle_z)
void Math_BuildQuaternionFromMatrix (struct Math_Matrix3x3I16 *matrix, struct Math_QuaternionI16 *output_quat)
static int32_t mul_q12 (int32_t a, int32_t b)
static void build_opposite_rotation (struct Math_Matrix3x3I16 *out, int16_t x, int16_t y, int16_t z)
void Math_BuildRotationFromVectors (struct Math_Vec3I16 *from_vec, struct Math_Vec3I16 *to_vec, struct Math_Matrix3x3I16 *out_matrix)

Function Documentation

◆ build_opposite_rotation()

void build_opposite_rotation ( struct Math_Matrix3x3I16 * out,
int16_t x,
int16_t y,
int16_t z )
static

Definition at line 331 of file matrices.c.

◆ copy_rotation_matrix()

void copy_rotation_matrix ( struct Math_Matrix3x3I16 * out,
const union Math_RotationScratch * scratch )
static

Definition at line 40 of file matrices.c.

◆ Math_BuildMatrixRotationX()

void Math_BuildMatrixRotationX ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int32_t angle )

Definition at line 54 of file matrices.c.

◆ Math_BuildMatrixRotationXY()

void Math_BuildMatrixRotationXY ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int32_t angle_x,
int32_t angle_y )

Definition at line 120 of file matrices.c.

◆ Math_BuildMatrixRotationY()

void Math_BuildMatrixRotationY ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int32_t angle )

Definition at line 76 of file matrices.c.

◆ Math_BuildMatrixRotationZ()

void Math_BuildMatrixRotationZ ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int32_t angle )

Definition at line 98 of file matrices.c.

◆ Math_BuildQuaternionFromMatrix()

void Math_BuildQuaternionFromMatrix ( struct Math_Matrix3x3I16 * matrix,
struct Math_QuaternionI16 * output_quat )

Definition at line 250 of file matrices.c.

◆ Math_BuildRotationFromVectors()

void Math_BuildRotationFromVectors ( struct Math_Vec3I16 * from_vec,
struct Math_Vec3I16 * to_vec,
struct Math_Matrix3x3I16 * out_matrix )

Definition at line 366 of file matrices.c.

◆ Math_BuildRotationMatrix()

void Math_BuildRotationMatrix ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int32_t angle_x,
int32_t angle_y,
int32_t angle_z )

Definition at line 154 of file matrices.c.

◆ Math_BuildRotationMatrixFromXYSinCos()

void Math_BuildRotationMatrixFromXYSinCos ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * left_factor,
int16_t sin_x_q12,
int16_t cos_x_q12,
int16_t sin_y_q12,
int16_t cos_y_q12,
int32_t angle_z )

Definition at line 204 of file matrices.c.

◆ Math_MulMat3x3Q12()

void Math_MulMat3x3Q12 ( struct Math_Matrix3x3I16 * out_matrix,
struct Math_Matrix3x3I16 const * right_factor,
struct Math_Matrix3x3I16 const * left_factor )

Definition at line 11 of file matrices.c.

◆ mul_q12()

int32_t mul_q12 ( int32_t a,
int32_t b )
static

Definition at line 325 of file matrices.c.