Returns true if the given barycentric coordinate is in the triangle
| 75 | |
| 76 | // Returns true if the given barycentric coordinate is in the triangle |
| 77 | BOOL PointIsInTriangle(const XMFLOAT3& r, float epsilon) |
| 78 | { |
| 79 | float minr = 0.0f - epsilon; |
| 80 | float maxr = 1.0f + epsilon; |
| 81 | |
| 82 | if(r.x < minr || r.x > maxr) |
| 83 | return false; |
| 84 | |
| 85 | if(r.y < minr || r.y > maxr) |
| 86 | return false; |
| 87 | |
| 88 | if(r.z < minr || r.z > maxr) |
| 89 | return false; |
| 90 | |
| 91 | float rsum = r.x + r.y + r.z; |
| 92 | return rsum >= minr && rsum <= maxr; |
| 93 | } |
| 94 | |
| 95 | // Computes a compute shader dispatch size given a thread group size, and number of elements to process |
| 96 | uint32 DispatchSize(uint32 tgSize, uint32 numElements) |
nothing calls this directly
no outgoing calls
no test coverage detected