-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslipsystem.h
47 lines (40 loc) · 1.31 KB
/
slipsystem.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
40
41
42
43
44
45
46
47
#ifndef SLIPSYSTEM_H
#define SLIPSYSTEM_H
#include "ddobject.h"
#include "vector.h"
#include <cmath>
#include "hashedregistrable.h"
namespace dd {
class SlipPlane;
class SlipSystem : public HashedRegistrable<SlipPlane> {
#define SLIPSYSTEM_NAME "SlipSystem"
private:
std::list<SlipPlane *> sPlanes;
double angle;
double sin;
double cos;
Vector2d directionVector;
double bMag;
public:
/**
* Default constructor
*/
SlipSystem(const double & angle,
const double & bMag) :
angle(angle),
sin(::sin(angle)),
cos(::cos(angle)),
directionVector({cos, sin}),
bMag(bMag) { }
double getAngle() const { return angle; }
double getSin() const { return sin; }
double getCos() const { return cos; }
double getBurgersMagnitude() const { return bMag; }
Vector2d getDirection() const { return directionVector; }
virtual Vector2d getPointPosition(const double & slipPlaneLocation,
const Vector2d & slipPlaneOrigin) const;
virtual string typeName() const { return SLIPSYSTEM_NAME; }
static string staticTypeName() { return SLIPSYSTEM_NAME; }
};
}
#endif // SLIPSYSTEM_H