| 1234567891011121314151617181920212223242526272829303132333435363738 |
- #pragma once
- //直角坐标系
- typedef struct CoordCartesian
- {
- DOUBLE x;
- DOUBLE y;
- DOUBLE z;
- } CoordCartesian;
- // 球坐标系
- typedef struct CoordSpherical
- {
- DOUBLE r;
- DOUBLE θ;
- DOUBLE φ;
- } CoordSpherical;
- // 柱坐标系
- typedef struct CoordCylindrical
- {
- DOUBLE r;
- DOUBLE θ;
- DOUBLE z;
- } CoordCylindrical;
- class CS
- {
- public:
- CS(void);
- ~CS(void);
- public:
- static void CartesianToSpherical(CoordCartesian &pcc, CoordSpherical &pcg);
- static void CartesianToCylindrical(CoordCartesian &pcc, CoordCylindrical &pcg);
- static DOUBLE EnvelopeValue(DOUBLE a, DOUBLE b);
- };
|