Package com.esotericsoftware.spine

Examples of com.esotericsoftware.spine.Bone


    vertices[C2] = color;
    vertices[C3] = color;
    vertices[C4] = color;

    float[] offset = this.offset;
    Bone bone = slot.getBone();
    float x = bone.getWorldX() + skeleton.getX();
    float y = bone.getWorldY() + skeleton.getY();
    float m00 = bone.getM00();
    float m01 = bone.getM01();
    float m10 = bone.getM10();
    float m11 = bone.getM11();
    vertices[X1] = offset[0] * m00 + offset[1] * m01 + x;
    vertices[Y1] = offset[0] * m10 + offset[1] * m11 + y;
    vertices[X2] = offset[2] * m00 + offset[3] * m01 + x;
    vertices[Y2] = offset[2] * m10 + offset[3] * m11 + y;
    vertices[X3] = offset[4] * m00 + offset[5] * m01 + x;
View Full Code Here


    if (ffdArray.size == 0) {
      for (int w = 0, v = 0, b = 0, n = bones.length; v < n; w += 5) {
        float wx = 0, wy = 0;
        int nn = bones[v++] + v;
        for (; v < nn; v++, b += 3) {
          Bone bone = (Bone)skeletonBones[bones[v]];
          float vx = weights[b], vy = weights[b + 1], weight = weights[b + 2];
          wx += (vx * bone.getM00() + vy * bone.getM01() + bone.getWorldX()) * weight;
          wy += (vx * bone.getM10() + vy * bone.getM11() + bone.getWorldY()) * weight;
        }
        worldVertices[w] = wx + x;
        worldVertices[w + 1] = wy + y;
        worldVertices[w + 2] = color;
      }
    } else {
      float[] ffd = ffdArray.items;
      for (int w = 0, v = 0, b = 0, f = 0, n = bones.length; v < n; w += 5) {
        float wx = 0, wy = 0;
        int nn = bones[v++] + v;
        for (; v < nn; v++, b += 3, f += 2) {
          Bone bone = (Bone)skeletonBones[bones[v]];
          float vx = weights[b] + ffd[f], vy = weights[b + 1] + ffd[f + 1], weight = weights[b + 2];
          wx += (vx * bone.getM00() + vy * bone.getM01() + bone.getWorldX()) * weight;
          wy += (vx * bone.getM10() + vy * bone.getM11() + bone.getWorldY()) * weight;
        }
        worldVertices[w] = wx + x;
        worldVertices[w + 1] = wy + y;
        worldVertices[w + 2] = color;
      }
View Full Code Here

    float[] worldVertices = this.worldVertices;
    FloatArray slotVertices = slot.getAttachmentVertices();
    float[] vertices = this.vertices;
    if (slotVertices.size == vertices.length) vertices = slotVertices.items;
    Bone bone = slot.getBone();
    float x = skeleton.getX() + bone.getWorldX(), y = skeleton.getY() + bone.getWorldY();
    float m00 = bone.getM00(), m01 = bone.getM01(), m10 = bone.getM10(), m11 = bone.getM11();
    for (int v = 0, w = 0, n = worldVertices.length; w < n; v += 2, w += 5) {
      float vx = vertices[v];
      float vy = vertices[v + 1];
      worldVertices[w] = vx * m00 + vy * m01 + x;
      worldVertices[w + 1] = vx * m10 + vy * m11 + y;
View Full Code Here

        | ((int)(skeletonColor.g * slotColor.g * regionColor.g * multiplier) << 8) //
        | (int)(skeletonColor.r * slotColor.r * regionColor.r * multiplier));

    float[] vertices = this.vertices;
    float[] offset = this.offset;
    Bone bone = slot.getBone();
    float x = skeleton.getX() + bone.getWorldX(), y = skeleton.getY() + bone.getWorldY();
    float m00 = bone.getM00(), m01 = bone.getM01(), m10 = bone.getM10(), m11 = bone.getM11();
    float offsetX, offsetY;

    offsetX = offset[BRX];
    offsetY = offset[BRY];
    vertices[X1] = offsetX * m00 + offsetY * m01 + x; // br
View Full Code Here

TOP

Related Classes of com.esotericsoftware.spine.Bone

Copyright © 2018 www.massapicom. 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.