com.badlogic.gdx.math.Matrix4.det()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(74)

本文整理了Java中com.badlogic.gdx.math.Matrix4.det()方法的一些代码示例,展示了Matrix4.det()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix4.det()方法的具体详情如下:
包路径:com.badlogic.gdx.math.Matrix4
类名称:Matrix4
方法名:det

Matrix4.det介绍

暂无

代码示例

代码示例来源:origin: libgdx/libgdx

/** <p>
 * Flushes the batch and realigns the real matrix on the GPU. Subsequent draws won't need adjustment and will be slightly
 * faster as long as the transform matrix is not {@link #setTransformMatrix(Matrix4) changed}.
 * </p>
 * <p>
 * Note: The real transform matrix <em>must</em> be invertible. If a singular matrix is detected, GdxRuntimeException will be
 * thrown.
 * </p>
 * @see SpriteBatch#flush() */
public void flushAndSyncTransformMatrix () {
  flush();
  if (adjustNeeded) {
    // vertices flushed, safe now to replace matrix
    haveIdentityRealMatrix = checkIdt(virtualMatrix);
    if (!haveIdentityRealMatrix && virtualMatrix.det() == 0)
      throw new GdxRuntimeException("Transform matrix is singular, can't sync");
    adjustNeeded = false;
    super.setTransformMatrix(virtualMatrix);
  }
}

代码示例来源:origin: libgdx/libgdx

/** <p>
 * Flushes the batch and realigns the real matrix on the GPU. Subsequent draws won't need adjustment and will be slightly
 * faster as long as the transform matrix is not {@link #setTransformMatrix(Matrix4) changed}.
 * </p>
 * <p>
 * Note: The real transform matrix <em>must</em> be invertible. If a singular matrix is detected, GdxRuntimeException will be
 * thrown.
 * </p>
 * @see SpriteBatch#flush() */
public void flushAndSyncTransformMatrix () {
  flush();
  if (adjustNeeded) {
    // vertices flushed, safe now to replace matrix
    haveIdentityRealMatrix = checkIdt(virtualMatrix);
    if (!haveIdentityRealMatrix && virtualMatrix.det() == 0)
      throw new GdxRuntimeException("Transform matrix is singular, can't sync");
    adjustNeeded = false;
    super.setTransformMatrix(virtualMatrix);
  }
}

代码示例来源:origin: libgdx/libgdx

check(vec, fvecs, 3, 5);
if (mat1.det() != Matrix4.det(mat1.val)) throw new GdxRuntimeException("det doesn't work");

代码示例来源:origin: com.badlogicgames.gdx/gdx

/** <p>
 * Flushes the batch and realigns the real matrix on the GPU. Subsequent draws won't need adjustment and will be slightly
 * faster as long as the transform matrix is not {@link #setTransformMatrix(Matrix4) changed}.
 * </p>
 * <p>
 * Note: The real transform matrix <em>must</em> be invertible. If a singular matrix is detected, GdxRuntimeException will be
 * thrown.
 * </p>
 * @see SpriteBatch#flush() */
public void flushAndSyncTransformMatrix () {
  flush();
  if (adjustNeeded) {
    // vertices flushed, safe now to replace matrix
    haveIdentityRealMatrix = checkIdt(virtualMatrix);
    if (!haveIdentityRealMatrix && virtualMatrix.det() == 0)
      throw new GdxRuntimeException("Transform matrix is singular, can't sync");
    adjustNeeded = false;
    super.setTransformMatrix(virtualMatrix);
  }
}

相关文章