Lines Matching refs:centroid

21 // centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
85 // The angle to the vertex from the centroid.
452 // When centroid is covered by all circles from outline, then we consider
512 // Compute the umbra by the intersection from the outline's centroid!
526 // Connect a line b/t the outline vertex (V) and the centroid (C), it will
531 // When all of the outline circles cover the the outline centroid, (like I is
533 // a small area around the centroid as the umbra, and tune down the spot
584 // Umbra can be represented as a fan from the centroid, but visually umbra
794 const Vector2& centroid, Vector2* polyToCentroid) {
796 polyToCentroid[j] = poly2d[j] - centroid;
812 // For one umbra vertex, shoot an ray from centroid to it.
815 inline Vector2 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid,
818 Vector2 umbraToCentroid = umbraVertex - centroid;
829 float distanceToIntersectPoly = rayIntersectPoints(centroid, dx, dy,
838 closerVertex.x = centroid.x + dx * distanceToIntersectPoly;
839 closerVertex.y = centroid.y + dy * distanceToIntersectPoly;
853 const Vector2& centroid) {
862 // Make sure the centroid is inside the umbra, otherwise, fall back to the
864 if (testPointInsidePolygon(centroid, poly2d, polyLength)) {
971 bool isPositiveCross = genPolyToCentroid(poly2d, polyLength, centroid, polyToCentroid);
978 // Shoot a ray from centroid to each umbra vertices and pick the one with
979 // shorter distance to the centroid, b/t the umbra vertex or the intersection point.
980 Vector2 closerVertex = getCloserVertex(umbra[i], centroid, poly2d, polyLength,
991 // starting from the centroid to all umbra vertices.
993 AlphaVertex::set(&shadowVertices[vertexBufferIndex++], centroid.x,
994 centroid.y, UMBRA_ALPHA);