⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ballaux.h

📁 [Game.Programming].Academic - Graphics Gems (6 books source code)
💻 H
字号:
/***** BallAux.h - Vector and quaternion routines for Arcball. *****/#ifndef _H_BallAux#define _H_BallAuxtypedef int Bool;typedef struct {float x, y, z, w;} Quat;enum QuatPart {X, Y, Z, W, QuatLen};typedef Quat HVect;typedef float HMatrix[QuatLen][QuatLen];extern Quat qOne;HMatrix *Qt_ToMatrix(Quat q, HMatrix out);Quat Qt_Conj(Quat q);Quat Qt_Mul(Quat qL, Quat qR);HVect V3_(float x, float y, float z);float V3_Norm(HVect v);HVect V3_Unit(HVect v);HVect V3_Scale(HVect v, float s);HVect V3_Negate(HVect v);HVect V3_Sub(HVect v1, HVect v2);float V3_Dot(HVect v1, HVect v2);HVect V3_Cross(HVect v1, HVect v2);HVect V3_Bisect(HVect v0, HVect v1);#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -