Searched defs:centroid (Results 1 - 5 of 5) sorted by relevance

/frameworks/base/core/java/android/gesture/
H A DGestureUtils.java325 * Calculates the centroid of a set of points.
328 * @return the centroid
499 private static OrientedBoundingBox computeOrientedBoundingBox(float[] points, float[] centroid) { argument
500 translate(points, -centroid[0], -centroid[1]);
534 return new OrientedBoundingBox((float) (angle * 180 / Math.PI), centroid[0], centroid[1], maxx - minx, maxy - miny);
/frameworks/base/libs/hwui/
H A DShadowTessellator.cpp118 * Calculate the centroid of a 2d polygon.
122 * @return the centroid of the polygon.
141 Vector2 centroid = poly[0]; local
143 centroid = (Vector2){static_cast<float>(sumx / (3 * area)),
146 ALOGW("Area is 0 while computing centroid!");
148 return centroid;
H A DAmbientShadow.cpp83 const Vector3& secondVertex, const Vector3& centroid) {
84 Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y};
111 // Add the centroid if occluder is translucent.
131 * @param centroid3d The centroid of the shadow caster.
140 * For now let's mark the outer vertex as Pi, the inner as Vi, the centroid as C.
295 // Add the centroid as the last one in the vertex buffer.
82 getEdgeExtraAndUpdateSpike(Vector2* currentSpike, const Vector3& secondVertex, const Vector3& centroid) argument
H A DTessellationCache.cpp238 // map the centroid of the caster into 3d
239 Vector2 centroid = ShadowTessellator::centroid2d( local
242 Vector3 centroid3d = {centroid.x, centroid.y, 0};
H A DSpotShadow.cpp21 // centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
85 // The angle to the vertex from the centroid.
452 // When centroid is covered by all circles from outline, then we consider
512 // Compute the umbra by the intersection from the outline's centroid!
526 // Connect a line b/t the outline vertex (V) and the centroid (C), it will
531 // When all of the outline circles cover the the outline centroid, (like I is
533 // a small area around the centroid as the umbra, and tune down the spot
584 // Umbra can be represented as a fan from the centroid, but visually umbra
794 const Vector2& centroid, Vector2* polyToCentroid) {
796 polyToCentroid[j] = poly2d[j] - centroid;
793 genPolyToCentroid(const Vector2* poly2d, int polyLength, const Vector2& centroid, Vector2* polyToCentroid) argument
815 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid, const Vector2* poly2d, int polyLength, const Vector2* polyToCentroid, bool isPositiveCross, int& previousPolyIndex) argument
850 generateTriangleStrip(bool isCasterOpaque, float shadowStrengthScale, Vector2* penumbra, int penumbraLength, Vector2* umbra, int umbraLength, const Vector3* poly, int polyLength, VertexBuffer& shadowTriangleStrip, const Vector2& centroid) argument
[all...]

Completed in 1370 milliseconds