-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpoint.h
39 lines (34 loc) · 783 Bytes
/
point.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// point.h
// ParticleSystem
//
// Created by Alan Höng on 17/10/14.
// Copyright (c) 2014 Alan Höng. All rights reserved.
//
#ifndef ParticleSystem_point_h
#define ParticleSystem_point_h
#include <math.h>
#include "Vector3D.h"
namespace ksh{
class point:public Vector3D{
protected:
double mass;
public:
point();
point(double xp, double yp);
point(double xp, double yp, double zp);
void setX(double xp);
void setY(double yp);
void setZ(double zp);
double getX();
double getY();
double getZ();
double distance(point& p1);
void scale(double s);
point operator+(const point& right);
point operator-(const point& right);
double operator*(const point& right);
point operator*(const double& right);
};
}
#endif