2023-08-02 10:59:06 +00:00
|
|
|
#ifndef JUMPARTIFACT_DOT_COM_DEMO_0_3D_HELPERS_H_
|
|
|
|
#define JUMPARTIFACT_DOT_COM_DEMO_0_3D_HELPERS_H_
|
|
|
|
|
|
|
|
// third party includes
|
|
|
|
#include <raylib.h>
|
|
|
|
|
|
|
|
extern Matrix get_identity_matrix();
|
|
|
|
extern Matrix get_rotation_matrix_about_z(float radians);
|
|
|
|
extern Matrix get_rotation_matrix_about_y(float radians);
|
|
|
|
extern Matrix get_rotation_matrix_about_x(float radians);
|
|
|
|
|
2023-08-04 02:42:11 +00:00
|
|
|
extern Matrix translate_matrix_x(float distance);
|
|
|
|
extern Matrix translate_matrix_y(float distance);
|
2023-08-02 10:59:06 +00:00
|
|
|
extern Matrix translate_matrix_z(float distance);
|
2023-08-04 02:42:11 +00:00
|
|
|
extern Matrix translate_matrix_xyz(float x, float y, float z);
|
2023-08-02 10:59:06 +00:00
|
|
|
|
2023-08-07 03:54:23 +00:00
|
|
|
extern Matrix scale_matrix_xyz(float x, float y, float z);
|
|
|
|
|
2023-08-02 10:59:06 +00:00
|
|
|
extern Matrix operator*(const Matrix &a, const Matrix &b);
|
2023-08-04 02:42:11 +00:00
|
|
|
|
2023-08-07 05:11:58 +00:00
|
|
|
/// Returns true if intersects with xz plane.
|
|
|
|
extern bool ray_to_xz_plane(const Ray &ray, float &x_out, float &z_out);
|
|
|
|
|
2023-08-04 02:42:11 +00:00
|
|
|
// Unimplemented as this function isn't really needed and it exposes some
|
|
|
|
// weirdness regarding column-major matrices.
|
|
|
|
// extern Vector4 operator*(const Matrix &m, const Vector4 &v);
|
2023-08-02 10:59:06 +00:00
|
|
|
|
|
|
|
#endif
|