void GenerateAtRandom()
 {
     patches    = new BezierPatch[Amount];
     velocities = new Vector3[Amount, 16];
     for (int i = 0; i < Amount; i++)
     {
         if (patches[i] == null)
         {
             patches[i] = new BezierPatch();
         }
         for (int j = 0; j < 16; j++)
         {
             patches[i].cp[j] = Random.insideUnitSphere;
             velocities[i, j] = Random.onUnitSphere;
         }
     }
 }
 public void CropU(ref BezierPatch dst0, ref Vector2 uv0, float u0, float u1)
 {
     uosBPCropU(ref cp[0], ref dst0.cp[0], u0, u1);
 }
 public void Crop(ref BezierPatch dst0, ref Vector2 uv0, ref Vector2 uv1)
 {
     uosBPCrop(ref cp[0], ref dst0.cp[0], ref uv0, ref uv1);
 }
 public void SplitV(ref BezierPatch dst0, ref BezierPatch dst1, float v)
 {
     uosBPSplitV(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], v);
 }
 public void SplitU(ref BezierPatch dst0, ref BezierPatch dst1, float u)
 {
     uosBPSplitU(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], u);
 }
 public void Split(ref BezierPatch dst0, ref BezierPatch dst1, ref BezierPatch dst2, ref BezierPatch dst3, ref Vector2 uv)
 {
     uosBPSplit(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], ref dst2.cp[0], ref dst3.cp[0], ref uv);
 }
 public void CropV(ref BezierPatch dst0, ref Vector2 uv0, float v0, float v1)
 {
     uosBPCropV(ref cp[0], ref dst0.cp[0], v0, v1);
 }
 public void Crop(ref BezierPatch dst0, ref Vector2 uv0, ref Vector2 uv1)
 {
     osdiBPCrop(ref cp[0], ref dst0.cp[0], ref uv0, ref uv1);
 }
 public void SplitV(ref BezierPatch dst0, ref BezierPatch dst1, float v)
 {
     osdiBPSplitV(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], v);
 }
 public void SplitU(ref BezierPatch dst0, ref BezierPatch dst1, float u)
 {
     osdiBPSplitU(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], u);
 }
 public void Split(ref BezierPatch dst0, ref BezierPatch dst1, ref BezierPatch dst2, ref BezierPatch dst3, ref Vector2 uv)
 {
     osdiBPSplit(ref cp[0], ref dst0.cp[0], ref dst1.cp[0], ref dst2.cp[0], ref dst3.cp[0], ref uv);
 }
 public void CropV(ref BezierPatch dst0, ref Vector2 uv0, float v0, float v1)
 {
     osdiBPCropV(ref cp[0], ref dst0.cp[0], v0, v1);
 }
 public void CropU(ref BezierPatch dst0, ref Vector2 uv0, float u0, float u1)
 {
     osdiBPCropU(ref cp[0], ref dst0.cp[0], u0, u1);
 }