fix idq and eulerq
parent
55bb9d26c7
commit
5dca07d113
|
@ -27,9 +27,9 @@ int main() {
|
||||||
{ "PLAYER-1", model("kgirls01.fbx", 0), loop(0,60,0.25,0), loop(66,85,0.25,0), // idle anim [0..60], run anim [66..85]
|
{ "PLAYER-1", model("kgirls01.fbx", 0), loop(0,60,0.25,0), loop(66,85,0.25,0), // idle anim [0..60], run anim [66..85]
|
||||||
{KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT}, 2, {0.90,0.80}, {0,90}, {3, 0.30, 30}, {0}, {1} },
|
{KEY_UP,KEY_DOWN,KEY_LEFT,KEY_RIGHT}, 2, {0.90,0.80}, {0,90}, {3, 0.30, 30}, {0}, {1} },
|
||||||
{ "PLAYER-2", model("george.fbx", 0), loop(0,100,0.25,0), loop(372,396,0.25,0), // idle anim [0..100], run anim [372..396]
|
{ "PLAYER-2", model("george.fbx", 0), loop(0,100,0.25,0), loop(372,396,0.25,0), // idle anim [0..100], run anim [372..396]
|
||||||
{KEY_I,KEY_K,KEY_J,KEY_L}, 1, {0.95,0.90}, {90,-180}, {1.75, 0.25, 24}, {-5}, {1} },
|
{KEY_I,KEY_K,KEY_J,KEY_L}, 1, {0.95,0.90}, {-180,90}, {1.75, 0.25, 24}, {-5}, {1} },
|
||||||
{ "PLAYER-3", model("alien.fbx", 0), loop(110,208,0.25,0), loop(360,380,0.25,0), // idle anim [110..208], run anim [360..380]
|
{ "PLAYER-3", model("alien.fbx", 0), loop(110,208,0.25,0), loop(360,380,0.25,0), // idle anim [110..208], run anim [360..380]
|
||||||
{KEY_W,KEY_S,KEY_A,KEY_D}, 0.85, {0.85,0.75}, {90,-180}, {3.5, 0.35, 60}, {5}, {1} }
|
{KEY_W,KEY_S,KEY_A,KEY_D}, 0.85, {0.85,0.75}, {-180,90}, {3.5, 0.35, 60}, {5}, {1} }
|
||||||
};
|
};
|
||||||
|
|
||||||
// camera that points to origin, skybox, and a background tune
|
// camera that points to origin, skybox, and a background tune
|
||||||
|
|
2
depot
2
depot
|
@ -1 +1 @@
|
||||||
Subproject commit 25f79cb67011ce1848ae2de45a010a07cddc00dd
|
Subproject commit dc53801aafff279cd12903aa85a5091d5a528ed5
|
|
@ -377349,7 +377349,7 @@ vec4 clamp4f(vec4 v,float a,float b){ return vec4(maxf(minf(b,v.x),a),maxf(minf(
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
quat idq ( ) { return quat(1,0,0,0); } // 0,0,0,1?
|
quat idq ( ) { return quat(0,0,0,1); }
|
||||||
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
||||||
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
||||||
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
||||||
|
@ -377434,7 +377434,7 @@ quat eulerq (vec3 pyr_degrees) { // bugs?
|
||||||
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
||||||
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
||||||
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
||||||
return quat(cy*cr*cp + sy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, sy*cr*cp - cy*sr*sp);
|
return quat(sy*cr*cp - cy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, cy*cr*cp + sy*sr*sp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -226,7 +226,7 @@ vec4 clamp4f(vec4 v,float a,float b){ return vec4(maxf(minf(b,v.x),a),maxf(minf(
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
quat idq ( ) { return quat(1,0,0,0); } // 0,0,0,1?
|
quat idq ( ) { return quat(0,0,0,1); }
|
||||||
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
||||||
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
||||||
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
||||||
|
@ -311,7 +311,7 @@ quat eulerq (vec3 pyr_degrees) { // bugs?
|
||||||
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
||||||
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
||||||
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
||||||
return quat(cy*cr*cp + sy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, sy*cr*cp - cy*sr*sp);
|
return quat(sy*cr*cp - cy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, cy*cr*cp + sy*sr*sp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12379,7 +12379,7 @@ vec4 clamp4f(vec4 v,float a,float b){ return vec4(maxf(minf(b,v.x),a),maxf(minf(
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
quat idq ( ) { return quat(1,0,0,0); } // 0,0,0,1?
|
quat idq ( ) { return quat(0,0,0,1); }
|
||||||
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
quat ptrq (const float *a ) { return quat(a[0],a[1],a[2],a[3]); }
|
||||||
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
quat vec3q (vec3 a, float w ) { return quat(a.x,a.y,a.z,w); }
|
||||||
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
quat vec4q (vec4 a ) { return quat(a.x,a.y,a.z,a.w); }
|
||||||
|
@ -12464,7 +12464,7 @@ quat eulerq (vec3 pyr_degrees) { // bugs?
|
||||||
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
float p = rad(pyr_degrees.x), y = rad(pyr_degrees.y), r = rad(pyr_degrees.z);
|
||||||
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
float ha = p * 0.5f, hb = r * 0.5f, hc = y * 0.5f;
|
||||||
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
float cp = cosf(ha), sp = sinf(ha), cr = cosf(hb), sr = sinf(hb), cy = cosf(hc), sy = sinf(hc);
|
||||||
return quat(cy*cr*cp + sy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, sy*cr*cp - cy*sr*sp);
|
return quat(sy*cr*cp - cy*sr*sp, cy*sr*cp - sy*cr*sp, cy*cr*sp + sy*sr*cp, cy*cr*cp + sy*sr*sp);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue