quaternion conjugate support (engine side)
This commit is contained in:
parent
fc2413ff72
commit
633dada682
|
@ -294,6 +294,7 @@ typedef enum {
|
||||||
OP_MUL_Q,
|
OP_MUL_Q,
|
||||||
OP_MUL_QF,
|
OP_MUL_QF,
|
||||||
OP_MUL_FQ,
|
OP_MUL_FQ,
|
||||||
|
OP_CONJ_Q,
|
||||||
OP_NOT_Q,
|
OP_NOT_Q,
|
||||||
OP_EQ_Q,
|
OP_EQ_Q,
|
||||||
OP_NE_Q,
|
OP_NE_Q,
|
||||||
|
|
|
@ -347,6 +347,9 @@ PR_ExecuteProgram (progs_t * pr, func_t fnum)
|
||||||
case OP_MUL_QF:
|
case OP_MUL_QF:
|
||||||
QuatScale (OPA.quat_var, OPB.float_var, OPC.quat_var);
|
QuatScale (OPA.quat_var, OPB.float_var, OPC.quat_var);
|
||||||
break;
|
break;
|
||||||
|
case OP_CONJ_Q:
|
||||||
|
QuatConj (OPA.quat_var, OPC.quat_var);
|
||||||
|
break;
|
||||||
case OP_DIV_F:
|
case OP_DIV_F:
|
||||||
OPC.float_var = OPA.float_var / OPB.float_var;
|
OPC.float_var = OPA.float_var / OPB.float_var;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -134,6 +134,11 @@ opcode_t pr_opcodes[] = {
|
||||||
PROG_ID_VERSION,
|
PROG_ID_VERSION,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{"~", "conj.q", OP_CONJ_Q, false,
|
||||||
|
ev_quat, ev_void, ev_quat,
|
||||||
|
PROG_ID_VERSION,
|
||||||
|
},
|
||||||
|
|
||||||
{"/", "div.f", OP_DIV_F, false,
|
{"/", "div.f", OP_DIV_F, false,
|
||||||
ev_float, ev_float, ev_float,
|
ev_float, ev_float, ev_float,
|
||||||
PROG_ID_VERSION,
|
PROG_ID_VERSION,
|
||||||
|
|
Loading…
Reference in New Issue