quaternion conjugate support (engine side)

This commit is contained in:
Bill Currie 2004-04-08 04:57:17 +00:00
parent fc2413ff72
commit 633dada682
3 changed files with 9 additions and 0 deletions

View File

@ -294,6 +294,7 @@ typedef enum {
OP_MUL_Q,
OP_MUL_QF,
OP_MUL_FQ,
OP_CONJ_Q,
OP_NOT_Q,
OP_EQ_Q,
OP_NE_Q,

View File

@ -347,6 +347,9 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
case OP_MUL_QF:
QuatScale (OPA.quat_var, OPB.float_var, OPC.quat_var);
break;
case OP_CONJ_Q:
QuatConj (OPA.quat_var, OPC.quat_var);
break;
case OP_DIV_F:
OPC.float_var = OPA.float_var / OPB.float_var;
break;

View File

@ -134,6 +134,11 @@ opcode_t pr_opcodes[] = {
PROG_ID_VERSION,
},
{"~", "conj.q", OP_CONJ_Q, false,
ev_quat, ev_void, ev_quat,
PROG_ID_VERSION,
},
{"/", "div.f", OP_DIV_F, false,
ev_float, ev_float, ev_float,
PROG_ID_VERSION,