diff options
| author | Franklin Wei <me@fwei.tk> | 2019-02-03 17:51:06 -0500 |
|---|---|---|
| committer | Franklin Wei <me@fwei.tk> | 2019-02-03 17:51:06 -0500 |
| commit | 4d5b8732c97c73ce7cf04e6641a239ceb0447d8d (patch) | |
| tree | 5895cac7bcba52ab9f5481eee0dad066ad413326 /quat.h | |
| parent | 79a83c2cbee5adca798b8976b2a39ecd6ffd39af (diff) | |
| download | fieldviz-4d5b8732c97c73ce7cf04e6641a239ceb0447d8d.zip fieldviz-4d5b8732c97c73ce7cf04e6641a239ceb0447d8d.tar.gz fieldviz-4d5b8732c97c73ce7cf04e6641a239ceb0447d8d.tar.bz2 fieldviz-4d5b8732c97c73ce7cf04e6641a239ceb0447d8d.tar.xz | |
Add circular arc and spiral curves
Diffstat (limited to 'quat.h')
| -rw-r--r-- | quat.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#ifndef QUAT_H +#define QUAT_H +#include "vec3.h" +#include <iostream> + +class quat { +public: + double w, x, y, z; +public: + quat(double w, double x, double y, double z); + quat(double x, double y, double z); + quat(double w, vec3 vec); + quat(vec3 vec); + quat(); + + operator vec3(); + + quat conjugate() const; + + static quat from_angleaxis(double angle, vec3 axis); +}; + +quat operator*(const quat &, const quat &); +std::ostream &operator<<(std::ostream &os, const quat &); +#endif |