public void Add(TAABB use_dims, int data) { if (use_dims.Overlaps(nodes[root].dims)) { Add(nodes[root], use_dims, data); } }
public void AABBQuery(TVector <int> result, TAABB aabb) { result.Pop(result.Length); if (aabb.Overlaps(nodes[root].dims)) { AABBQuery(nodes[root], result, aabb); } DeleteRepeatingValues(result); }
public bool Overlaps(TRay ray) { Matrix m = orient; m.Invert();//TODO можно лишь транспонировать матрицу 3x3,а смещение вычислять вручную TRay modified_ray = new TRay(Vector3.TransformCoordinate(ray.pos, m), Vector3.TransformNormal(ray.dir, m)); return(aabb.Overlaps(modified_ray)); }