本文整理了Java中com.badlogic.gdx.math.Matrix4.mul()
方法的一些代码示例,展示了Matrix4.mul()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix4.mul()
方法的具体详情如下:
包路径:com.badlogic.gdx.math.Matrix4
类名称:Matrix4
方法名:mul
[英]Postmultiplies this matrix with the given matrix, storing the result in this matrix. For example:
A.mul(B) results in A := AB.
[中]将该矩阵与给定矩阵进行后乘,并将结果存储在此矩阵中。例如:
A.mul(B) results in A := AB.
代码示例来源:origin: libgdx/libgdx
/** Postmultiplies this matrix with the given matrix, storing the result in this matrix. For example:
*
* <pre>
* A.mul(B) results in A := AB.
* </pre>
*
* @param matrix The other matrix to multiply by.
* @return This matrix for the purpose of chaining operations together. */
public Matrix4 mul (Matrix4 matrix) {
mul(val, matrix.val);
return this;
}
代码示例来源:origin: libgdx/libgdx
/** Postmultiplies the current transformation with the given matrix. */
public void mul (Matrix4 transform) {
this.transform.mul(transform);
this.transform.getScale(scale);
}
代码示例来源:origin: libgdx/libgdx
/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x
* glTranslate/glRotate/glScale.
*
* @param rotation
* @return This matrix for the purpose of chaining methods together. */
public Matrix4 rotate (Quaternion rotation) {
rotation.toMatrix(tmp);
mul(val, tmp);
return this;
}
代码示例来源:origin: libgdx/libgdx
/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x
* glTranslate/glRotate/glScale.
*
* @param rotation
* @return This matrix for the purpose of chaining methods together. */
public Matrix4 rotate (Quaternion rotation) {
rotation.toMatrix(tmp);
mul(val, tmp);
return this;
}
代码示例来源:origin: libgdx/libgdx
/** Postmultiplies the current transformation with the given matrix. */
public void mul (Matrix4 transform) {
this.transform.mul(transform);
this.transform.getScale(scale);
}
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.view).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.combined).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.view).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.view).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.view).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
@Override
public void set (BaseShader shader, int inputID, Renderable renderable, Attributes combinedAttributes) {
shader.set(inputID, temp.set(shader.camera.combined).mul(renderable.worldTransform));
}
};
代码示例来源:origin: libgdx/libgdx
/** Calculates the world transform; the product of local transform and the parent's world transform.
* @return the world transform */
public Matrix4 calculateWorldTransform () {
if (inheritTransform && parent != null)
globalTransform.set(parent.globalTransform).mul(localTransform);
else
globalTransform.set(localTransform);
return globalTransform;
}
代码示例来源:origin: libgdx/libgdx
public Renderable getRenderable (final Renderable out, final Node node, final NodePart nodePart) {
nodePart.setRenderable(out);
if (nodePart.bones == null && transform != null)
out.worldTransform.set(transform).mul(node.globalTransform);
else if (transform != null)
out.worldTransform.set(transform);
else
out.worldTransform.idt();
out.userData = userData;
return out;
}
代码示例来源:origin: libgdx/libgdx
/** Sets this matrix to a look at matrix with the given position, target and up vector.
*
* @param position the position
* @param target the target
* @param up the up vector
* @return This matrix */
public Matrix4 setToLookAt (Vector3 position, Vector3 target, Vector3 up) {
tmpVec.set(target).sub(position);
setToLookAt(tmpVec, up);
this.mul(tmpMat.setToTranslation(-position.x, -position.y, -position.z));
return this;
}
代码示例来源:origin: libgdx/libgdx
public Renderable getRenderable (final Renderable out, final Node node, final NodePart nodePart) {
nodePart.setRenderable(out);
if (nodePart.bones == null && transform != null)
out.worldTransform.set(transform).mul(node.globalTransform);
else if (transform != null)
out.worldTransform.set(transform);
else
out.worldTransform.idt();
out.userData = userData;
return out;
}
代码示例来源:origin: libgdx/libgdx
/** Sets this matrix to a look at matrix with the given position, target and up vector.
*
* @param position the position
* @param target the target
* @param up the up vector
* @return This matrix */
public Matrix4 setToLookAt (Vector3 position, Vector3 target, Vector3 up) {
tmpVec.set(target).sub(position);
setToLookAt(tmpVec, up);
this.mul(tmpMat.setToTranslation(-position.x, -position.y, -position.z));
return this;
}
代码示例来源:origin: libgdx/libgdx
@Override
public boolean act (float delta) {
emitter.getTransform(tmpMatrix);
tmpQuaternion.set(axis, angle*delta).toMatrix(tmpMatrix4.val);
tmpMatrix4.mul(tmpMatrix);
emitter.setTransform(tmpMatrix4);
return false;
}
}
代码示例来源:origin: libgdx/libgdx
private void setupMatrices () {
combinedMatrix.set(projectionMatrix).mul(transformMatrix);
if (customShader != null) {
customShader.setUniformMatrix("u_projTrans", combinedMatrix);
customShader.setUniformi("u_texture", 0);
} else {
shader.setUniformMatrix("u_projTrans", combinedMatrix);
shader.setUniformi("u_texture", 0);
}
}
代码示例来源:origin: libgdx/libgdx
private void setupMatrices () {
combinedMatrix.set(projectionMatrix).mul(transformMatrix);
if (customShader != null) {
customShader.setUniformMatrix("u_projTrans", combinedMatrix);
customShader.setUniformi("u_texture", 0);
} else {
shader.setUniformMatrix("u_projTrans", combinedMatrix);
shader.setUniformi("u_texture", 0);
}
}
代码示例来源:origin: libgdx/libgdx
public Matrix4 calculateParallaxMatrix (float parallaxX, float parallaxY) {
update();
tmp.set(position);
tmp.x *= parallaxX;
tmp.y *= parallaxY;
parallaxView.setToLookAt(tmp, tmp2.set(tmp).add(direction), up);
parallaxCombined.set(projection);
Matrix4.mul(parallaxCombined.val, parallaxView.val);
return parallaxCombined;
}
}
内容来源于网络,如有侵权,请联系作者删除!