Пример #1
0
  public void getCompositeTransform(Transform transform) {
    if (transform == null) throw new NullPointerException("transform can not be null");

    // transform = T R S M

    // Combine translation and rotation (TR)
    float[] m = new float[16];
    orientation.get(m);
    m[3] = translation.x;
    m[7] = translation.y;
    m[11] = translation.z;
    transform.set(m);

    // Apply scale (S)
    transform.postScale(scale.x, scale.y, scale.z);

    // Apply custom (M)
    transform.postMultiply(this.transform);
  }