Home | History | Annotate | Download | only in hwui

Lines Matching refs:Vector2

75     Vector2 position;
76 Vector2 normal;
102 static float angle(const Vector2& point, const Vector2& center) {
118 static float rayIntersectPoints(const Vector2& rayOrigin, float dx, float dy,
119 const Vector2& p1, const Vector2& p2) {
143 * @param points the points as a Vector2 array.
146 void SpotShadow::xsort(Vector2* points, int pointsLength) {
147 auto cmp = [](const Vector2& a, const Vector2& b) -> bool {
156 * @param points the points as a Vector2 array.
161 int SpotShadow::hull(Vector2* points, int pointsLength, Vector2* retPoly) {
164 Vector2 lUpper[n];
185 Vector2 lLower[n];
234 * @param poly The in and out polyogon as a Vector2 array.
238 void SpotShadow::sort(Vector2* poly, int polyLength, const Vector2& center) {
245 void SpotShadow::swap(Vector2* points, int i, int j) {
246 Vector2 temp = points[i];
254 void SpotShadow::quicksortCirc(Vector2* points, int low, int high,
255 const Vector2& center) {
284 bool SpotShadow::testPointInsidePolygon(const Vector2 testPoint,
285 const Vector2* poly, int len) {
307 * @param polygon the polygon as a Vector2 array
310 void SpotShadow::reverse(Vector2* polygon, int len) {
313 Vector2 tmp = polygon[i];
349 float SpotShadow::projectCasterToOutline(Vector2& outline,
389 Vector2 outlineCentroid;
432 Vector2 penumbra[allocatedPenumbraLength];
435 Vector2 umbra[polyLength];
468 const Vector2& previousNormal = outlineData[preNormalIndex].normal;
469 const Vector2& currentNormal = outlineData[i].normal;
488 Vector2 avgNormal =
571 Vector2 finalUmbra[umbraLength];
572 Vector2 finalPenumbra[penumbraLength];
612 inline int getClosestUmbraIndex(const Vector2& pivot, const Vector2* polygon, int polygonLength) {
653 inline int findPolyIndex(bool isPositiveCross, int startPolyIndex, const Vector2& umbraDir,
654 const Vector2* polyToCentroid, int polyLength) {
658 const Vector2& currentToCentroid = polyToCentroid[currentIndex];
659 const Vector2& nextToCentroid = polyToCentroid[(currentIndex + 1) % polyLength];
676 inline void genNewPenumbraAndPairWithUmbra(const Vector2* penumbra, int penumbraLength,
677 const Vector2* umbra, int umbraLength, Vector2* newPenumbra, int& newPenumbraIndex,
684 const Vector2& currentPenumbraVertex = penumbra[i];
733 Vector2 previousClosestUmbra = umbra[previousClosestUmbraIndex];
734 Vector2 skippedUmbra;
748 const Vector2& previousPenumbra = penumbra[(i + penumbraLength - 1) % penumbraLength];
758 Vector2 interpolatedPenumbra = currentPenumbraVertex * weightForCurrentPenumbra +
778 inline bool genPolyToCentroid(const Vector2* poly2d, int polyLength,
779 const Vector2& centroid, Vector2* polyToCentroid) {
800 inline Vector2 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid,
801 const Vector2* poly2d, int polyLength, const Vector2* polyToCentroid,
803 Vector2 umbraToCentroid = umbraVertex - centroid;
821 Vector2 closerVertex;
836 Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength,
838 const Vector2& centroid) {
840 Vector2 poly2d[polyLength];
888 Vector2 newPenumbra[maxNewPenumbraLength];
959 Vector2 polyToCentroid[polyLength];
969 Vector2 closerVertex = getCloserVertex(umbra[i], centroid, poly2d, polyLength,
1009 void SpotShadow::updateBound(const Vector2 inVector, Vector2& lowerBound,
1010 Vector2& upperBound) {
1031 void SpotShadow::dumpPolygon(const Vector2* poly, int polyLength, const char* polyName) {
1049 bool SpotShadow::testConvex(const Vector2* polygon, int polygonLength,
1053 Vector2 start = polygon[i];
1054 Vector2 middle = polygon[(i + 1) % polygonLength];
1055 Vector2 end = polygon[(i + 2) % polygonLength];
1077 void SpotShadow::testIntersection(const Vector2* poly1, int poly1Length,
1078 const Vector2* poly2, int poly2Length,
1079 const Vector2* intersection, int intersectionLength) {
1081 Vector2 lowerBound = {FLT_MAX, FLT_MAX};
1082 Vector2 upperBound = {-FLT_MAX, -FLT_MAX};
1096 Vector2 testPoint;
1121 Vector2 delta = intersection[i] - intersection[i - 1];