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.cpp117 * Calculate the centroid of a 2d polygon.
121 * @return the centroid of the polygon.
140 Vector2 centroid = poly[0]; local
142 centroid = (Vector2){static_cast<float>(sumx / (3 * area)),
145 ALOGW("Area is 0 while computing centroid!");
147 return centroid;
H A DAmbientShadow.cpp99 const Vector3& secondVertex, const Vector3& centroid) {
100 Vector2 secondSpike = {secondVertex.x - centroid.x, secondVertex.y - centroid.y};
127 // Add the centroid if occluder is translucent.
147 * @param centroid3d The centroid of the shadow caster.
156 * For now let's mark the outer vertex as Pi, the inner as Vi, the centroid as C.
311 // Add the centroid as the last one in the vertex buffer.
98 getEdgeExtraAndUpdateSpike(Vector2* currentSpike, const Vector3& secondVertex, const Vector3& centroid) argument
H A DTessellationCache.cpp251 // map the centroid of the caster into 3d
252 Vector2 centroid = ShadowTessellator::centroid2d( local
255 Vector3 centroid3d = {centroid.x, centroid.y, 0};
H A DSpotShadow.cpp23 // centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
87 // The angle to the vertex from the centroid.
454 // When centroid is covered by all circles from outline, then we consider
514 // Compute the umbra by the intersection from the outline's centroid!
528 // Connect a line b/t the outline vertex (V) and the centroid (C), it will
533 // When all of the outline circles cover the the outline centroid, (like I is
535 // a small area around the centroid as the umbra, and tune down the spot
586 // Umbra can be represented as a fan from the centroid, but visually umbra
796 const Vector2& centroid, Vector2* polyToCentroid) {
798 polyToCentroid[j] = poly2d[j] - centroid;
795 genPolyToCentroid(const Vector2* poly2d, int polyLength, const Vector2& centroid, Vector2* polyToCentroid) argument
817 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid, const Vector2* poly2d, int polyLength, const Vector2* polyToCentroid, bool isPositiveCross, int& previousPolyIndex) argument
852 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 159 milliseconds