Hi,
I am working with lineline collision on Kangaroo2 implementing RTrees and Spatial Grid for faster collision detection.
All the particles and goals are initialized in a clean manner by indexes, therefore I am using this LineLine Goal constructor:
public LineLineCollision(int a, int b, int c, int d, double r, double k, bool _show)
{
Strength = k;
PIndex = new int[] { a,b,c,d };
Move = new Vector3d[4];
Weighting = new double[4] { k, k, k, k };
R1 = R2 = r;
show = _show; //Preview output
}
Each frame I delete last collision goals and add new ones.
The question I have:
How to write a Line Line Goal for calculating all pairs of lines in one goal?
I am wondering how to sum up all the move vector as it should be similar thing to points collision.
Instead of constructor:
public LineLineCollision(int a, int b, int c, int d, double r, double k, bool _show)
I want to have a constructor (orginally I have the different constructor but this represent the idea)
public LineLineCollision(int[] a, int[] b, int[] c, int[] d, double r, double k, bool _show)
Kind Regards,
Petras Vestartas