Vector3D.h 867 B

123456789101112131415161718192021222324252627282930
  1. #ifndef VECTOR3D_H
  2. #define VECTOR3D_H
  3. typedef struct Vector3D {
  4. float x;
  5. float y;
  6. float z;
  7. } Vector3D;
  8. void vectorSet(Vector3D* v, float x, float y, float z);
  9. void vectorSetTo(Vector3D* v1, Vector3D* v2);
  10. void vectorSetToInverse(Vector3D* v1, Vector3D* v2);
  11. void vectorSetMul(Vector3D* v1, Vector3D* v2, float f);
  12. void vectorSetAngles(Vector3D* v, float lengthAngle, float widthAngle);
  13. void vectorAdd(Vector3D* v1, Vector3D* v2);
  14. void vectorSub(Vector3D* v1, Vector3D* v2);
  15. void vectorMul(Vector3D* v1, float f);
  16. void vectorAddMul(Vector3D* v1, Vector3D* v2, float f);
  17. void vectorCross(Vector3D* v, float x, float y, float z);
  18. void vectorCrossWith(Vector3D* v1, Vector3D* v2);
  19. void vectorNormalize(Vector3D* v);
  20. float vectorLength(Vector3D* v);
  21. float vectorDot(Vector3D* v1, Vector3D* v2);
  22. float vectorDotInverse(Vector3D* v1, Vector3D* v2);
  23. #endif