public void Evaluate(int SpreadMax) { if (this.FBodies.IsConnected) { this.FId.SliceCount = this.FBodies.SliceCount; this.FPosition.SliceCount = this.FBodies.SliceCount; this.FRadius.SliceCount = this.FBodies.SliceCount; for (int i = 0; i < SpreadMax; i++) { RigidBody body = this.FBodies[i]; BodyCustomData bd = (BodyCustomData)body.UserObject; this.FId[i] = bd.Id; CollisionShape shape = body.CollisionShape; Vector3 center; float radius; shape.GetBoundingSphere(out center, out radius); this.FPosition[i] = center.ToVVVVector(); this.FRadius[i] = radius; } } else { this.FId.SliceCount = 0; this.FPosition.SliceCount = 0; this.FRadius.SliceCount = 0; } }