Example #1
0
 public void Execute(int index)
 {
     CustomDrawRequest.ComponentData *dataPtr = (CustomDrawRequest.ComponentData *)indexBuffer[index];
     if (MathLib.BoxIntersect(ref dataPtr->localToWorldMatrix, dataPtr->boundingBoxPosition, dataPtr->boundingBoxExtents, frustumPlanes, 6))
     {
         cullResult.ConcurrentAdd(dataPtr->index);
     }
 }
Example #2
0
 public static void ExecuteInList(NativeList_Int cullResult, float4 *frustumPlanes, NativeList_ulong indexBuffer)
 {
     for (int i = 0; i < indexBuffer.Length; ++i)
     {
         CustomDrawRequest.ComponentData *dataPtr = (CustomDrawRequest.ComponentData *)indexBuffer[i];
         if (MathLib.BoxIntersect(ref dataPtr->localToWorldMatrix, dataPtr->boundingBoxPosition, dataPtr->boundingBoxExtents, frustumPlanes, 6))
         {
             cullResult.ConcurrentAdd(dataPtr->index);
         }
     }
 }