Point3D.cpp 453 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "Point3D.h"
  2. CPoint3D::CPoint3D()
  3. {
  4. x = y = z = 0;
  5. }
  6. CPoint3D::~CPoint3D()
  7. {
  8. }
  9. CPoint3D::CPoint3D(double c1, double c2, double c3)
  10. {
  11. x = c1; y = c2; z = c3;
  12. }
  13. CPoint3D &CPoint3D::operator=(const CPoint3D& pt) //ÖØÔصȺÅ
  14. {
  15. x = pt.x; z = pt.z; y = pt.y;
  16. return *this;
  17. }
  18. void CPoint3D::Translate(double cx, double cy, double cz) //ת»¯
  19. {
  20. x += cx;
  21. y += cy;
  22. z += cz;
  23. }