Home
last modified time | relevance | path

Searched refs:Vector2 (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/libs/hwui/
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* points, int low, int high, const Vector2& center);
54 static void quicksortX(Vector2* points, int low, int high);
56 static bool testPointInsidePolygon(const Vector2 testPoint, const Vector2* poly, int len);
[all …]
DVector.h31 struct Vector2 { struct
43 void operator+=(const Vector2& v) { argument
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 operator/(float s) const {
82 return (Vector2){x / s, y / s};
85 Vector2 operator*(float s) const {
[all …]
DSpotShadow.cpp75 Vector2 position;
76 Vector2 normal;
102 static float angle(const Vector2& point, const Vector2& center) { in angle()
118 static float rayIntersectPoints(const Vector2& rayOrigin, float dx, float dy, in rayIntersectPoints()
119 const Vector2& p1, const Vector2& p2) { in rayIntersectPoints()
146 void SpotShadow::xsort(Vector2* points, int pointsLength) { in xsort()
147 auto cmp = [](const Vector2& a, const Vector2& b) -> bool { in xsort()
161 int SpotShadow::hull(Vector2* points, int pointsLength, Vector2* retPoly) { in hull()
164 Vector2 lUpper[n]; in hull()
185 Vector2 lLower[n]; in hull()
[all …]
DShadowTessellator.h81 static Vector2 centroid2d(const Vector2* poly, int polyLength);
83 static Vector2 calculateNormal(const Vector2& p1, const Vector2& p2);
85 static int getExtraVertexNumber(const Vector2& vector1, const Vector2& vector2,
DAmbientShadow.cpp68 inline Vector2 getNormalFromVertices(const Vector3* vertices, int current, int next) { in getNormalFromVertices()
70 Vector2 currentVertex = { vertices[current].x, vertices[current].y }; in getNormalFromVertices()
71 Vector2 nextVertex = { vertices[next].x, vertices[next].y }; in getNormalFromVertices()
82 inline int getEdgeExtraAndUpdateSpike(Vector2* currentSpike, in getEdgeExtraAndUpdateSpike()
84 Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y}; in getEdgeExtraAndUpdateSpike()
174 Vector2 previousNormal = getNormalFromVertices(casterVertices, in createAmbientShadow()
176 Vector2 currentSpike = {casterVertices[0].x - centroid3d.x, in createAmbientShadow()
196 Vector2 currentNormal = getNormalFromVertices(casterVertices, i, in createAmbientShadow()
223 Vector2 outerStart = {0, 0}; in createAmbientShadow()
224 Vector2 outerLast = {0, 0}; in createAmbientShadow()
[all …]
DShadowTessellator.cpp124 Vector2 ShadowTessellator::centroid2d(const Vector2* poly, int polyLength) { in centroid2d()
141 Vector2 centroid = poly[0]; in centroid2d()
143 centroid = (Vector2){static_cast<float>(sumx / (3 * area)), in centroid2d()
152 Vector2 ShadowTessellator::calculateNormal(const Vector2& p1, const Vector2& p2) { in calculateNormal()
153 Vector2 result = p2 - p1; in calculateNormal()
164 int ShadowTessellator::getExtraVertexNumber(const Vector2& vector1, in getExtraVertexNumber()
165 const Vector2& vector2, float divisor) { in getExtraVertexNumber()
DPathTessellator.cpp92 inline static Vector2 totalOffsetFromNormals(const Vector2& normalA, const Vector2& normalB) { in totalOffsetFromNormals()
131 inline void scaleOffsetForStrokeWidth(Vector2& offset) const { in scaleOffsetForStrokeWidth()
145 inline Vector2 deriveAAOffset(const Vector2& offset) const { in deriveAAOffset()
146 return (Vector2){offset.x * 0.5f * inverseScaleX, offset.y * 0.5f * inverseScaleY}; in deriveAAOffset()
215 Vector2 lastNormal = {current->y - last->y, last->x - current->x}; in getStrokeVerticesFromPerimeter()
219 Vector2 nextNormal = {next->y - current->y, current->x - next->x}; in getStrokeVerticesFromPerimeter()
222 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 …]
DVertex.h48 static inline void set(Vertex* vertex, Vector2 val) { in set()
DTessellationCache.cpp238 Vector2 centroid = ShadowTessellator::centroid2d( in tessellateShadows()
239 reinterpret_cast<const Vector2*>(&casterVertices2d.front()), in tessellateShadows()
/frameworks/native/libs/vr/libdvrcommon/include/private/dvr/
Deigen.h14 using Vector2 = Vector<T, 2>; variable