ballaux.h
来自「[Game.Programming].Academic - Graphics G」· C头文件 代码 · 共 25 行
H
25 行
/***** 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 + =
减小字号Ctrl + -
显示快捷键?