Home | History | Annotate | Download | only in hwui

Lines Matching full: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::makeClockwise(Vector2* polygon, int len) {
322 * @param polygon the polygon as a Vector2 array
325 void SpotShadow::reverse(Vector2* polygon, int len) {
328 Vector2 tmp = polygon[i];
364 float SpotShadow::projectCasterToOutline(Vector2& outline,
404 Vector2 outlineCentroid;
447 Vector2 penumbra[allocatedPenumbraLength];
450 Vector2 umbra[polyLength];
483 const Vector2& previousNormal = outlineData[preNormalIndex].normal;
484 const Vector2& currentNormal = outlineData[i].normal;
503 Vector2 avgNormal =
586 Vector2 finalUmbra[umbraLength];
587 Vector2 finalPenumbra[penumbraLength];
627 inline int getClosestUmbraIndex(const Vector2& pivot, const Vector2* polygon, int polygonLength) {
668 inline int findPolyIndex(bool isPositiveCross, int startPolyIndex, const Vector2& umbraDir,
669 const Vector2* polyToCentroid, int polyLength) {
673 const Vector2& currentToCentroid = polyToCentroid[currentIndex];
674 const Vector2& nextToCentroid = polyToCentroid[(currentIndex + 1) % polyLength];
691 inline void genNewPenumbraAndPairWithUmbra(const Vector2* penumbra, int penumbraLength,
692 const Vector2* umbra, int umbraLength, Vector2* newPenumbra, int& newPenumbraIndex,
699 const Vector2& currentPenumbraVertex = penumbra[i];
748 Vector2 previousClosestUmbra = umbra[previousClosestUmbraIndex];
749 Vector2 skippedUmbra;
763 const Vector2& previousPenumbra = penumbra[(i + penumbraLength - 1) % penumbraLength];
773 Vector2 interpolatedPenumbra = currentPenumbraVertex * weightForCurrentPenumbra +
793 inline bool genPolyToCentroid(const Vector2* poly2d, int polyLength,
794 const Vector2& centroid, Vector2* polyToCentroid) {
815 inline Vector2 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid,
816 const Vector2* poly2d, int polyLength, const Vector2* polyToCentroid,
818 Vector2 umbraToCentroid = umbraVertex - centroid;
836 Vector2 closerVertex;
851 Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength,
853 const Vector2& centroid) {
855 Vector2 poly2d[polyLength];
903 Vector2 newPenumbra[maxNewPenumbraLength];
970 Vector2 polyToCentroid[polyLength];
980 Vector2 closerVertex = getCloserVertex(umbra[i], centroid, poly2d, polyLength,
1020 void SpotShadow::updateBound(const Vector2 inVector, Vector2& lowerBound,
1021 Vector2& upperBound) {
1042 void SpotShadow::dumpPolygon(const Vector2* poly, int polyLength, const char* polyName) {
1060 bool SpotShadow::testConvex(const Vector2* polygon, int polygonLength,
1064 Vector2 start = polygon[i];
1065 Vector2 middle = polygon[(i + 1) % polygonLength];
1066 Vector2 end = polygon[(i + 2) % polygonLength];
1088 void SpotShadow::testIntersection(const Vector2* poly1, int poly1Length,
1089 const Vector2* poly2, int poly2Length,
1090 const Vector2* intersection, int intersectionLength) {
1092 Vector2 lowerBound = {FLT_MAX, FLT_MAX};
1093 Vector2 upperBound = {-FLT_MAX, -FLT_MAX};
1107 Vector2 testPoint;
1132 Vector2 delta = intersection[i] - intersection[i - 1];