Package com.badlogic.gdx.graphics.glutils

Examples of com.badlogic.gdx.graphics.glutils.ShapeRenderer.line()


        ShapeRenderer shapeRenderer = new ShapeRenderer();
        sb.end();
        shapeRenderer.setProjectionMatrix(m_stage.getCamera().combined);
        shapeRenderer.begin(ShapeRenderer.ShapeType.Line);
        shapeRenderer.setColor(1, 1, 1, 1);
        shapeRenderer.line(x, y, m_x2, m_y2);
        shapeRenderer.end();
        sb.begin();

    }
View Full Code Here


      for (int i = 0, n = bones.size; i < n; i++) {
        Bone bone = bones.get(i);
        if (bone.parent == null) continue;
        float x = skeletonX + bone.data.length * bone.m00 + bone.worldX;
        float y = skeletonY + bone.data.length * bone.m10 + bone.worldY;
        shapes.line(skeletonX + bone.worldX, skeletonY + bone.worldY, x, y);
      }
      shapes.x(skeletonX, skeletonY, 4 * scale);
    }

    if (drawRegionAttachments) {
View Full Code Here

        Attachment attachment = slot.attachment;
        if (attachment instanceof RegionAttachment) {
          RegionAttachment regionAttachment = (RegionAttachment)attachment;
          regionAttachment.updateWorldVertices(slot, false);
          float[] vertices = regionAttachment.getWorldVertices();
          shapes.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
          shapes.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
          shapes.line(vertices[X3], vertices[Y3], vertices[X4], vertices[Y4]);
          shapes.line(vertices[X4], vertices[Y4], vertices[X1], vertices[Y1]);
        }
      }
View Full Code Here

        if (attachment instanceof RegionAttachment) {
          RegionAttachment regionAttachment = (RegionAttachment)attachment;
          regionAttachment.updateWorldVertices(slot, false);
          float[] vertices = regionAttachment.getWorldVertices();
          shapes.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
          shapes.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
          shapes.line(vertices[X3], vertices[Y3], vertices[X4], vertices[Y4]);
          shapes.line(vertices[X4], vertices[Y4], vertices[X1], vertices[Y1]);
        }
      }
    }
View Full Code Here

          RegionAttachment regionAttachment = (RegionAttachment)attachment;
          regionAttachment.updateWorldVertices(slot, false);
          float[] vertices = regionAttachment.getWorldVertices();
          shapes.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
          shapes.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
          shapes.line(vertices[X3], vertices[Y3], vertices[X4], vertices[Y4]);
          shapes.line(vertices[X4], vertices[Y4], vertices[X1], vertices[Y1]);
        }
      }
    }
View Full Code Here

          regionAttachment.updateWorldVertices(slot, false);
          float[] vertices = regionAttachment.getWorldVertices();
          shapes.line(vertices[X1], vertices[Y1], vertices[X2], vertices[Y2]);
          shapes.line(vertices[X2], vertices[Y2], vertices[X3], vertices[Y3]);
          shapes.line(vertices[X3], vertices[Y3], vertices[X4], vertices[Y4]);
          shapes.line(vertices[X4], vertices[Y4], vertices[X1], vertices[Y1]);
        }
      }
    }

    if (drawMeshHull || drawMeshTriangles) {
View Full Code Here

          shapes.setColor(attachmentLineColor);
          hullLength = hullLength / 2 * 5;
          float lastX = vertices[hullLength - 5], lastY = vertices[hullLength - 4];
          for (int ii = 0, nn = hullLength; ii < nn; ii += 5) {
            float x = vertices[ii], y = vertices[ii + 1];
            shapes.line(x, y, lastX, lastY);
            lastX = x;
            lastY = y;
          }
        }
      }
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.