aboutsummaryrefslogtreecommitdiff
path: root/redist/linmath.h
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-02-08 11:42:46 -0700
committermwturvey <michael.w.turvey@intel.com>2017-02-08 11:42:46 -0700
commitae522f8a06848d467c835d87772580fa7cceb5cd (patch)
tree86290a42f487faa93270e2c5201ee9e9b2d6f6a1 /redist/linmath.h
parent0586f134e02938e1a9dd86ad92e41c2b2443fee0 (diff)
downloadlibsurvive-ae522f8a06848d467c835d87772580fa7cceb5cd.tar.gz
libsurvive-ae522f8a06848d467c835d87772580fa7cceb5cd.tar.bz2
Replaced rotation algorithm & cleanup
Diffstat (limited to 'redist/linmath.h')
-rw-r--r--redist/linmath.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/redist/linmath.h b/redist/linmath.h
index 3b11c1b..20a7848 100644
--- a/redist/linmath.h
+++ b/redist/linmath.h
@@ -87,26 +87,22 @@ void quatoddproduct( FLT * outvec3, FLT * qa, FLT * qb );
void quatslerp( FLT * q, const FLT * qa, const FLT * qb, FLT t );
void quatrotatevector( FLT * vec3out, const FLT * quat, const FLT * vec3in );
-void getRotationTo(FLT *q, const FLT *src, const FLT *dest);
+void quatfrom2vectors(FLT *q, const FLT *src, const FLT *dest);
// Matrix Stuff
typedef struct
{
- // row, column, (0,0) in upper left
- FLT val[3][3];
+ FLT val[3][3]; // row, column
} Matrix3x3;
+void rotate_vec(FLT *out, const FLT *in, Matrix3x3 rot);
+void rotation_between_vecs_to_m3(Matrix3x3 *m, const FLT v1[3], const FLT v2[3]);
Matrix3x3 inverseM33(const Matrix3x3 mat);
-void get_orthogonal_vector(FLT out[3], const FLT in[3]);
-void rotation_between_vecs_to_mat3(FLT m[3][3], const FLT v1[3], const FLT v2[3]);
-void unit_m3(FLT m[3][3]);
-FLT normalize_v3(FLT n[3]);
-void axis_angle_normalized_to_mat3_ex(
- FLT mat[3][3],
- const FLT axis[3],
- const FLT angle_sin,
- const FLT angle_cos);
+
+
+
+
#endif