aboutsummaryrefslogtreecommitdiff
path: root/redist/linmath.h
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-11 14:48:08 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-11 14:48:08 -0600
commit5153a32da9793945f72d60185d1929cd72ceeea3 (patch)
treec82aa5d46518ba04279325ef41ab9b50ecf606e2 /redist/linmath.h
parentc3235ace3df4fae68c11dcd449ab3a32afca72aa (diff)
downloadlibsurvive-5153a32da9793945f72d60185d1929cd72ceeea3.tar.gz
libsurvive-5153a32da9793945f72d60185d1929cd72ceeea3.tar.bz2
Added missing functions into lintest
Diffstat (limited to 'redist/linmath.h')
-rw-r--r--redist/linmath.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/redist/linmath.h b/redist/linmath.h
index 1876b34..ff00c94 100644
--- a/redist/linmath.h
+++ b/redist/linmath.h
@@ -102,10 +102,21 @@ void quatrotatevector( FLT * vec3out, const FLT * quat, const FLT * vec3in );
void quatfrom2vectors(FLT *q, const FLT *src, const FLT *dest);
//Poses are Position: [x, y, z] Quaternion: [q, x, y, z]
-//XXX TODO Write these!
-void ApplyPoseToPoint( FLT * pout, const FLT * pin, const FLT * pose );
-void InvertPose( FLT * poseout, const FLT * pose );
+typedef FLT *LINMATH_POSE;
+// Points are [x, y, z]
+typedef FLT *LINMATH_POINT;
+
+// This is the quat equivalent of 'pout = pose * pin' if pose were a 4x4 matrix in homogenous space
+void ApplyPoseToPoint(LINMATH_POINT pout, const LINMATH_POSE pose, const LINMATH_POINT pin);
+
+// This is the quat equivalent of 'pout = lhs_pose * rhs_pose' if poses were a 4x4 matrix in homogenous space
+void ApplyPoseToPose(LINMATH_POSE pout, const LINMATH_POSE lhs_pose, const LINMATH_POSE rhs_pose);
+
+// This is the quat equivlant of 'pose_in^-1'; so that ApplyPoseToPose(..., InvertPose(..., pose_in), pose_in) ==
+// Identity ( [0, 0, 0], [1, 0, 0, 0] )
+// by definition.
+void InvertPose(LINMATH_POSE poseout, const LINMATH_POSE pose_in);
// Matrix Stuff