Searched refs:centroid (Results 1 - 8 of 8) sorted by relevance

/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DVariationalKMeansQuantizer.java118 float[] centroid = mean.getCentroid();
120 centroid[0] * 360f,
121 centroid[1],
122 centroid[2]
/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 DSpotShadow.cpp21 // centroid * (1 - FAKE_UMBRA_SIZE_RATIO) + outline * FAKE_UMBRA_SIZE_RATIO
85 // The angle to the vertex from the centroid.
427 // When centroid is covered by all circles from outline, then we consider
485 // Compute the umbra by the intersection from the outline's centroid!
499 // Connect a line b/t the outline vertex (V) and the centroid (C), it will
504 // When all of the outline circles cover the the outline centroid, (like I is
506 // a small area around the centroid as the umbra, and tune down the spot
558 // Umbra can be represented as a fan from the centroid, but visually umbra
768 inline bool genPolyToCentroid(const Vector2* poly2d, int polyLength, const Vector2& centroid, argument
771 polyToCentroid[j] = poly2d[j] - centroid;
790 getCloserVertex(const Vector2& umbraVertex, const Vector2& centroid, const Vector2* poly2d, int polyLength, const Vector2* polyToCentroid, bool isPositiveCross, int& previousPolyIndex) argument
826 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...]
H A DSpotShadow.h62 VertexBuffer& retstrips, const Vector2& centroid);
H A DAmbientShadow.cpp83 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.
291 // 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.cpp228 // map the centroid of the caster into 3d
229 Vector2 centroid = ShadowTessellator::centroid2d( local
231 Vector3 centroid3d = {centroid.x, centroid.y, 0};
/frameworks/base/core/java/com/android/internal/ml/clustering/
H A DKMeans.java61 * @return An array of k Means, each representing a centroid and data points that belong to it.
162 // Compute the new mean centroid:
168 // Update each centroid component
177 // We converged if the centroid didn't move for any of the means.
215 * Definition of a mean, contains a centroid and points on its cluster.
225 public Mean(float ...centroid) { argument
226 mCentroid = centroid;
239 return "Mean(centroid: " + Arrays.toString(mCentroid) + ", size: "
/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);

Completed in 154 milliseconds