Lines Matching defs:centroid

23 // centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
87 // The angle to the vertex from the centroid.
454 // When centroid is covered by all circles from outline, then we consider
514 // Compute the umbra by the intersection from the outline's centroid!
528 // Connect a line b/t the outline vertex (V) and the centroid (C), it will
533 // When all of the outline circles cover the the outline centroid, (like I is
535 // a small area around the centroid as the umbra, and tune down the spot
586 // Umbra can be represented as a fan from the centroid, but visually umbra
796 const Vector2& centroid, Vector2* polyToCentroid) {
798 polyToCentroid[j] = poly2d[j] - centroid;
814 // For one umbra vertex, shoot an ray from centroid to it.
817 inline Vector2 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid,
820 Vector2 umbraToCentroid = umbraVertex - centroid;
831 float distanceToIntersectPoly = rayIntersectPoints(centroid, dx, dy,
840 closerVertex.x = centroid.x + dx * distanceToIntersectPoly;
841 closerVertex.y = centroid.y + dy * distanceToIntersectPoly;
855 const Vector2& centroid) {
864 // Make sure the centroid is inside the umbra, otherwise, fall back to the
866 if (testPointInsidePolygon(centroid, poly2d, polyLength)) {
973 bool isPositiveCross = genPolyToCentroid(poly2d, polyLength, centroid, polyToCentroid);
980 // Shoot a ray from centroid to each umbra vertices and pick the one with
981 // shorter distance to the centroid, b/t the umbra vertex or the intersection point.
982 Vector2 closerVertex = getCloserVertex(umbra[i], centroid, poly2d, polyLength,
993 // starting from the centroid to all umbra vertices.
995 AlphaVertex::set(&shadowVertices[vertexBufferIndex++], centroid.x,
996 centroid.y, TRANSFORMED_UMBRA_ALPHA);