![]() |
das2C
das core C utilities (v3)
|
A rigid rotation from one reference frame into another. More...
#include <das3/form.h>
Go to the source code of this file.
Macros | |
| #define | DAS_FORM_ROT (&das_form_rotate_vtbl) |
| A rotation from one reference frame into another. | |
A rigid rotation from one reference frame into another.
Rigid is the whole of it: lengths and handedness are preserved, so there is no scaling, no shear and no reflection. Everything this formalism promises follows from that one constraint. Two rotations compose into a rotation, applying one to a vector gives a vector in the second frame, and the inverse is the transpose. A transform that stretches or reflects satisfies none of those and is not a rotation; it would be a different kind= with its own rules, not this one carrying a flag.
Two audiences, and NOT a third.
The third audience, generic library code, needs nothing here. It reaches everything through the DasForm vtable and never learns this type exists. If something in variable.c or dataset.c ever wants this header, the layering sprung a leak.
das_form_rotate_vtbl is one object in the whole program, so comparing its ADDRESS answers "is this partner a rotation?" with no enum, no string, and no kind field to keep in sync with the vtable it would describe. That is the one reason a vtable here is extern rather than static; the recipe vtables inside form_rot.c stay static because nobody tags with them.
| #define DAS_FORM_ROT (&das_form_rotate_vtbl) |
A rotation from one reference frame into another.
Applying one to a vector gives a vector in the second frame.