123456789101112131415161718192021222324252627282930 |
- #ifndef VECTOR3D_H
- #define VECTOR3D_H
- typedef struct Vector3D {
- float x;
- float y;
- float z;
- } Vector3D;
- void vectorSet(Vector3D* v, float x, float y, float z);
- void vectorSetTo(Vector3D* v1, Vector3D* v2);
- void vectorSetToInverse(Vector3D* v1, Vector3D* v2);
- void vectorSetMul(Vector3D* v1, Vector3D* v2, float f);
- void vectorSetAngles(Vector3D* v, float lengthAngle, float widthAngle);
- void vectorAdd(Vector3D* v1, Vector3D* v2);
- void vectorSub(Vector3D* v1, Vector3D* v2);
- void vectorMul(Vector3D* v1, float f);
- void vectorAddMul(Vector3D* v1, Vector3D* v2, float f);
- void vectorCross(Vector3D* v, float x, float y, float z);
- void vectorCrossWith(Vector3D* v1, Vector3D* v2);
- void vectorNormalize(Vector3D* v);
- float vectorLength(Vector3D* v);
- float vectorDot(Vector3D* v1, Vector3D* v2);
- float vectorDotInverse(Vector3D* v1, Vector3D* v2);
- #endif
|