forked from Dan-Piker/K2Goals
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnary.cs
37 lines (31 loc) · 808 Bytes
/
Unary.cs
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
using System.Collections.Generic;
using Rhino.Geometry;
namespace KangarooSolver.Goals
{
public class Unary : GoalObject
{
public Vector3d Force;
public Unary()
{
}
public Unary(int u, Vector3d v)
{
PIndex = new int[1] { u };
Move = new Vector3d[1];
Weighting = new double[1];
Force = v;
}
public Unary(Point3d P, Vector3d v)
{
PPos = new Point3d[1] { P };
Move = new Vector3d[1];
Weighting = new double[1];
Force = v;
}
public override void Calculate(List<Particle> p)
{
Move[0] = Force;
Weighting[0] = 1.0;
}
}
}