aboutsummaryrefslogtreecommitdiff
path: root/redist
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-03-12 15:17:47 -0400
committercnlohr <lohr85@gmail.com>2017-03-12 15:17:47 -0400
commitb528f822966cf8978cbe28936ae1f15c3032e1d2 (patch)
treeb783509720b583bc5c30aa8d6d49a99dc0ab931a /redist
parentb754712675b5d644ae950006afe0d1ceba0e1899 (diff)
downloadlibsurvive-b528f822966cf8978cbe28936ae1f15c3032e1d2.tar.gz
libsurvive-b528f822966cf8978cbe28936ae1f15c3032e1d2.tar.bz2
Update to posers, etc... Still not working.
Diffstat (limited to 'redist')
-rw-r--r--redist/lintest.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/redist/lintest.c b/redist/lintest.c
index 933d2e5..fa5a9d7 100644
--- a/redist/lintest.c
+++ b/redist/lintest.c
@@ -3,15 +3,18 @@
int main()
{
+#if 1
+#define NONTRANSPOSED_DAVE
#ifdef NONTRANSPOSED_DAVE
- FLT pLH1[3] = {-0.275796, 3.105430, -0.868643};
- FLT qLH1[4] = {0.803743, -0.347009, 0.475276, 0.087718};
- FLT pNLH1[3] = { 0.122180, 2.772487, -1.511608 }; //1M +x
- FLT qNLH1[4] = { 0.796702, -0.389329, 0.457024, -0.069414 };
+ FLT pLH1[3] = {-0.396888, 3.182945, -0.568622};
+ FLT qLH1[4] = {0.668640, -0.576296, 0.103727, -0.458305};
+ FLT pNLH1[3] = { 0.113572, 2.791495, -1.495652 }; //1M +x
+ FLT qNLH1[4] = { 0.807419, 0.372818, -0.451339, 0.073308 };
+
- FLT pLH2[3] = {0.120546, 3.252532, -0.098940};
- FLT qLH2[4] = {-0.220026, 0.460836, 0.328534, 0.794534 };
+ FLT pLH2[3] = {0.195579, 3.193770, -0.424473};
+ FLT qLH2[4] = {0.401849, 0.104771, 0.580441, 0.700449};
FLT pNLH2[3] = {-0.183505, 3.356293, 0.695688, };
FLT qNLH2[4] = {-0.237438, 0.405213, 0.270438, 0.840410 };
#else
@@ -30,12 +33,23 @@ int main()
FLT pOut1[3];
FLT pOut2[3];
+ qLH1[0] *= -1;
+ qLH2[0] *= -1;
+
+ quatrotatevector( pOut1, qLH1, pLH1 );
+ quatrotatevector( pOut2, qLH2, pLH2 );
+
+ printf( "%f %f %f\n", PFTHREE( pOut1 ) );
+ printf( "%f %f %f\n", PFTHREE( pOut2 ) );
+
// qLH1[1]*=-1;
// qLH2[0]*=-1;
+/*
sub3d( pOut1, pLH1, pNLH1 );
sub3d( pOut2, pLH2, pNLH2 );
+
printf( "%f %f %f\n", PFTHREE( pOut1 ) );
printf( "%f %f %f\n", PFTHREE( pOut2 ) );
@@ -44,10 +58,13 @@ int main()
printf( "%f %f %f\n", PFTHREE( pOut1 ) );
printf( "%f %f %f\n", PFTHREE( pOut2 ) );
-
+*/
return -1;
-/*
+#endif
+
+#if 0
+
FLT e[3] = { 1,1,3.14 };
FLT q[4];
FLT m[16];
@@ -76,6 +93,7 @@ int main()
FLT pfromlh[3] = { 0, 1, 0 };
+ FLT p[3] = { 0, 1, 0 };
quatrotatevector( p, q, p );
printf( "%f %f %f\n", PFTHREE( p ) );
printf( "Flipping rotation\n" );
@@ -83,12 +101,12 @@ int main()
quatrotatevector( p, q, p );
printf( "%f %f %f\n", PFTHREE( p ) );
-*/
//Try setting up a pose.
// FLT mypose[7] = { 0, 0, 10, q[0], q[1], q[2], q[3] );
// ApplyPoseToPoint( FLT * pout, const FLT * pin, const FLT * pose );
//void InvertPose( FLT * poseout, const FLT * pose );
+#endif
}