Package com.badlogic.gdx.utils

Examples of com.badlogic.gdx.utils.FloatArray.clear()


      sort(points, count);
    }

    // Lower hull.
    FloatArray hull = this.hull;
    hull.clear();
    for (int i = offset; i < end; i += 2) {
      float x = points[i];
      float y = points[i + 1];
      while (hull.size >= 4 && ccw(x, y) <= 0)
        hull.size -= 2;
View Full Code Here


   * Draws a polygon, using ray start and end points as vertices
   */
  public void debugRender(ShapeRenderer shapeRenderer) {
    shapeRenderer.setColor(Color.YELLOW);
    FloatArray vertices = Pools.obtain(FloatArray.class);
    vertices.clear();
    for (int i = 0; i < rayNum; i++) {
      vertices.addAll(mx[i], my[i]);
    }
    for (int i = rayNum - 1; i > -1; i--) {
      vertices.addAll(startX[i], startY[i]);
View Full Code Here

    // fast fail
    if (!this.chainLightBounds.contains(x, y))
      return false;
    // actual check
    FloatArray vertices = Pools.obtain(FloatArray.class);
    vertices.clear();
   
    for (int i = 0; i < rayNum; i++) {
      vertices.addAll(mx[i], my[i]);
    }
    for (int i = rayNum - 1; i > -1; i--) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.