CS.h 615 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. //直角坐标系
  3. typedef struct CoordCartesian
  4. {
  5. DOUBLE x;
  6. DOUBLE y;
  7. DOUBLE z;
  8. } CoordCartesian;
  9. // 球坐标系
  10. typedef struct CoordSpherical
  11. {
  12. DOUBLE r;
  13. DOUBLE θ;
  14. DOUBLE φ;
  15. } CoordSpherical;
  16. // 柱坐标系
  17. typedef struct CoordCylindrical
  18. {
  19. DOUBLE r;
  20. DOUBLE θ;
  21. DOUBLE z;
  22. } CoordCylindrical;
  23. class CS
  24. {
  25. public:
  26. CS(void);
  27. ~CS(void);
  28. public:
  29. static void CartesianToSpherical(CoordCartesian &pcc, CoordSpherical &pcg);
  30. static void CartesianToCylindrical(CoordCartesian &pcc, CoordCylindrical &pcg);
  31. static DOUBLE EnvelopeValue(DOUBLE a, DOUBLE b);
  32. };