mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-19 08:51:59 +00:00
quaternion conjugate support (engine side)
This commit is contained in:
parent
fc2413ff72
commit
633dada682
3 changed files with 9 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue