Searched refs:Vector2 (Results 1 - 9 of 9) sorted by relevance

/frameworks/base/libs/hwui/
H A DSpotShadow.h37 static float projectCasterToOutline(Vector2& outline,
44 static float rayIntersectPoly(const Vector2* poly, int polyLength,
45 const Vector2& point, float dx, float dy);
47 static void xsort(Vector2* points, int pointsLength);
48 static int hull(Vector2* points, int pointsLength, Vector2* retPoly);
50 static void sort(Vector2* poly, int polyLength, const Vector2& center);
52 static void swap(Vector2* points, int i, int j);
53 static void quicksortCirc(Vector2* point
[all...]
H A DVector.h31 struct Vector2 { struct in namespace:android::uirenderer
43 void operator+=(const Vector2& v) {
48 void operator-=(const Vector2& v) {
73 Vector2 operator+(const Vector2& v) const {
74 return (Vector2){x + v.x, y + v.y};
77 Vector2 operator-(const Vector2& v) const {
78 return (Vector2){x - v.x, y - v.y};
81 Vector2 operato
[all...]
H A DShadowTessellator.h81 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);
87 static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
H A DSpotShadow.cpp75 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
[all...]
H A DShadowTessellator.cpp120 * @param poly The polygon, which is represented in a Vector2 array.
124 Vector2 ShadowTessellator::centroid2d(const Vector2* poly, int polyLength) {
141 Vector2 centroid = poly[0];
143 centroid = (Vector2){static_cast<float>(sumx / (3 * area)),
152 Vector2 ShadowTessellator::calculateNormal(const Vector2& p1, const Vector2& p2) {
153 Vector2 result = p2 - p1;
164 int ShadowTessellator::getExtraVertexNumber(const Vector2
[all...]
H A DAmbientShadow.cpp68 inline Vector2 getNormalFromVertices(const Vector3* vertices, int current, int next) {
69 // Convert from Vector3 to Vector2 first.
70 Vector2 currentVertex = { vertices[current].x, vertices[current].y };
71 Vector2 nextVertex = { vertices[next].x, vertices[next].y };
82 inline int getEdgeExtraAndUpdateSpike(Vector2* currentSpike,
84 Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y};
174 Vector2 previousNormal = getNormalFromVertices(casterVertices,
176 Vector2 currentSpike = {casterVertices[0].x - centroid3d.x,
196 Vector2 currentNormal = getNormalFromVertices(casterVertices, i,
223 Vector2 outerStar
[all...]
H A DPathTessellator.cpp92 inline static Vector2 totalOffsetFromNormals(const Vector2& normalA, const Vector2& normalB) {
131 inline void scaleOffsetForStrokeWidth(Vector2& offset) const {
145 inline Vector2 deriveAAOffset(const Vector2& offset) const {
146 return (Vector2){offset.x * 0.5f * inverseScaleX, offset.y * 0.5f * inverseScaleY};
215 Vector2 lastNormal = {current->y - last->y, last->x - current->x};
219 Vector2 nextNormal = {next->y - current->y, current->x - next->x};
222 Vector2 totalOffse
[all...]
H A DVertex.h47 static inline void set(Vertex* vertex, Vector2 val) {
H A DTessellationCache.cpp239 Vector2 centroid = ShadowTessellator::centroid2d(
240 reinterpret_cast<const Vector2*>(&casterVertices2d.front()),

Completed in 3446 milliseconds