Searched refs:Vector2 (Results 1 – 9 of 9) sorted by relevance
/frameworks/base/libs/hwui/ |
D | SpotShadow.h | 36 static float projectCasterToOutline(Vector2& outline, 43 static float rayIntersectPoly(const Vector2* poly, int polyLength, 44 const Vector2& point, float dx, float dy); 46 static void xsort(Vector2* points, int pointsLength); 47 static int hull(Vector2* points, int pointsLength, Vector2* retPoly); 49 static void sort(Vector2* poly, int polyLength, const Vector2& center); 51 static void swap(Vector2* points, int i, int j); 52 static void quicksortCirc(Vector2* points, int low, int high, const Vector2& center); 53 static void quicksortX(Vector2* points, int low, int high); 55 static bool testPointInsidePolygon(const Vector2 testPoint, const Vector2* poly, int len); [all …]
|
D | Vector.h | 28 struct Vector2 { struct 40 void operator+=(const Vector2& v) { argument 45 void operator-=(const Vector2& v) { 70 Vector2 operator+(const Vector2& v) const { 71 return (Vector2){x + v.x, y + v.y}; 74 Vector2 operator-(const Vector2& v) const { 75 return (Vector2){x - v.x, y - v.y}; 78 Vector2 operator/(float s) const { 79 return (Vector2){x / s, y / s}; 82 Vector2 operator*(float s) const { [all …]
|
D | SpotShadow.cpp | 72 Vector2 position; 73 Vector2 normal; 99 static float angle(const Vector2& point, const Vector2& center) { in angle() 115 static float rayIntersectPoints(const Vector2& rayOrigin, float dx, float dy, in rayIntersectPoints() 116 const Vector2& p1, const Vector2& p2) { in rayIntersectPoints() 143 void SpotShadow::xsort(Vector2* points, int pointsLength) { in xsort() 155 int SpotShadow::hull(Vector2* points, int pointsLength, Vector2* retPoly) { in hull() 158 Vector2 lUpper[n]; in hull() 179 Vector2 lLower[n]; in hull() 232 void SpotShadow::sort(Vector2* poly, int polyLength, const Vector2& center) { in sort() [all …]
|
D | ShadowTessellator.h | 81 static Vector2 centroid2d(const Vector2* poly, int polyLength); 83 static bool isClockwise(const Vector2* polygon, int len); 85 static Vector2 calculateNormal(const Vector2& p1, const Vector2& p2); 104 static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
|
D | ShadowTessellator.cpp | 151 Vector2 ShadowTessellator::centroid2d(const Vector2* poly, int polyLength) { in centroid2d() 168 Vector2 centroid = poly[0]; in centroid2d() 170 centroid = (Vector2){static_cast<float>(sumx / (3 * area)), in centroid2d() 179 Vector2 ShadowTessellator::calculateNormal(const Vector2& p1, const Vector2& p2) { in calculateNormal() 180 Vector2 result = p2 - p1; in calculateNormal() 196 bool ShadowTessellator::isClockwise(const Vector2* polygon, int len) { in isClockwise() 219 Vector<Vector2> arrayForDirection; in isClockwisePath() 223 arrayForDirection.add((Vector2){pts[0].x(), pts[0].y()}); in isClockwisePath() 226 arrayForDirection.add((Vector2){pts[1].x(), pts[1].y()}); in isClockwisePath() 229 arrayForDirection.add((Vector2){pts[1].x(), pts[1].y()}); in isClockwisePath() [all …]
|
D | AmbientShadow.cpp | 71 inline Vector2 getNormalFromVertices(const Vector3* vertices, int current, int next) { in getNormalFromVertices() 73 Vector2 currentVertex = { vertices[current].x, vertices[current].y }; in getNormalFromVertices() 74 Vector2 nextVertex = { vertices[next].x, vertices[next].y }; in getNormalFromVertices() 94 inline int getEdgeExtraAndUpdateSpike(Vector2* currentSpike, in getEdgeExtraAndUpdateSpike() 96 Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y}; in getEdgeExtraAndUpdateSpike() 186 Vector2 previousNormal = getNormalFromVertices(casterVertices, in createAmbientShadow() 188 Vector2 currentSpike = {casterVertices[0].x - centroid3d.x, in createAmbientShadow() 208 Vector2 currentNormal = getNormalFromVertices(casterVertices, i, in createAmbientShadow() 235 Vector2 outerStart = {0, 0}; in createAmbientShadow() 236 Vector2 outerLast = {0, 0}; in createAmbientShadow() [all …]
|
D | PathTessellator.cpp | 90 inline static Vector2 totalOffsetFromNormals(const Vector2& normalA, const Vector2& normalB) { in totalOffsetFromNormals() 129 inline void scaleOffsetForStrokeWidth(Vector2& offset) const { in scaleOffsetForStrokeWidth() 143 inline Vector2 deriveAAOffset(const Vector2& offset) const { in deriveAAOffset() 144 return (Vector2){offset.x * 0.5f * inverseScaleX, offset.y * 0.5f * inverseScaleY}; in deriveAAOffset() 214 Vector2 lastNormal = {current->y - last->y, last->x - current->x}; in getStrokeVerticesFromPerimeter() 218 Vector2 nextNormal = {next->y - current->y, current->x - next->x}; in getStrokeVerticesFromPerimeter() 221 Vector2 totalOffset = totalOffsetFromNormals(lastNormal, nextNormal); in getStrokeVerticesFromPerimeter() 245 const Vector2& normal, Vertex* buffer, int& currentIndex, bool begin) { in storeBeginEnd() 246 Vector2 strokeOffset = normal; in storeBeginEnd() 249 Vector2 referencePoint = {center.x, center.y}; in storeBeginEnd() [all …]
|
D | Vertex.h | 46 static inline void set(Vertex* vertex, Vector2 val) { in set()
|
D | TessellationCache.cpp | 243 Vector2 centroid = ShadowTessellator::centroid2d( in tessellateShadows() 244 reinterpret_cast<const Vector2*>(casterVertices2d.array()), in tessellateShadows()
|