mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Add support for quaternion.w/x/y/z.
It's sometimes more useful to have direct access to each individual component of the imaginary part of the quaternion, and then for consistency, alias w and s.
This commit is contained in:
parent
c197d6a4f9
commit
2572811bf4
1 changed files with 15 additions and 0 deletions
|
@ -885,6 +885,21 @@ init_types (void)
|
|||
make_structure ("@quaternion", 's', quaternion_struct, &type_quaternion);
|
||||
type_quaternion.type = ev_quat;
|
||||
type_quaternion.meta = ty_none;
|
||||
{
|
||||
symbol_t *sym;
|
||||
sym = new_symbol_type ("w", &type_float);
|
||||
sym->s.offset = 0;
|
||||
symtab_addsymbol (type_quaternion.t.symtab, sym);
|
||||
sym = new_symbol_type ("x", &type_float);
|
||||
sym->s.offset = 1;
|
||||
symtab_addsymbol (type_quaternion.t.symtab, sym);
|
||||
sym = new_symbol_type ("y", &type_float);
|
||||
sym->s.offset = 2;
|
||||
symtab_addsymbol (type_quaternion.t.symtab, sym);
|
||||
sym = new_symbol_type ("z", &type_float);
|
||||
sym->s.offset = 3;
|
||||
symtab_addsymbol (type_quaternion.t.symtab, sym);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue