本文整理了Java中com.jme3.math.Quaternion.loadIdentity
方法的一些代码示例,展示了Quaternion.loadIdentity
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quaternion.loadIdentity
方法的具体详情如下:
包路径:com.jme3.math.Quaternion
类名称:Quaternion
方法名:loadIdentity
[英]Sets this Quaternion to {0, 0, 0, 1}. Same as calling set(0,0,0,1).
[中]将此四元数设置为{0,0,0,1}。与调用集(0,0,0,1)相同。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public Rotation() {
rotation.loadIdentity();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* <code>fromAngleNormalAxis</code> sets this quaternion to the values
* specified by an angle and a normalized axis of rotation.
*
* @param angle
* the angle to rotate (in radians).
* @param axis
* the axis of rotation (already normalized).
*/
public Quaternion fromAngleNormalAxis(float angle, Vector3f axis) {
if (axis.x == 0 && axis.y == 0 && axis.z == 0) {
loadIdentity();
} else {
float halfAngle = 0.5f * angle;
float sin = FastMath.sin(halfAngle);
w = FastMath.cos(halfAngle);
x = sin * axis.x;
y = sin * axis.y;
z = sin * axis.z;
}
return this;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
public Rotation() {
rotation.loadIdentity();
}
代码示例来源:origin: info.projectkyoto/mms-engine
public Rotation() {
rotation.loadIdentity();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* <code>fromAngleNormalAxis</code> sets this quaternion to the values
* specified by an angle and a normalized axis of rotation.
*
* @param angle
* the angle to rotate (in radians).
* @param axis
* the axis of rotation (already normalized).
*/
public Quaternion fromAngleNormalAxis(float angle, Vector3f axis) {
if (axis.x == 0 && axis.y == 0 && axis.z == 0) {
loadIdentity();
} else {
float halfAngle = 0.5f * angle;
float sin = FastMath.sin(halfAngle);
w = FastMath.cos(halfAngle);
x = sin * axis.x;
y = sin * axis.y;
z = sin * axis.z;
}
return this;
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* <code>fromAngleNormalAxis</code> sets this quaternion to the values
* specified by an angle and a normalized axis of rotation.
*
* @param angle
* the angle to rotate (in radians).
* @param axis
* the axis of rotation (already normalized).
*/
public Quaternion fromAngleNormalAxis(float angle, Vector3f axis) {
if (axis.x == 0 && axis.y == 0 && axis.z == 0) {
loadIdentity();
} else {
float halfAngle = 0.5f * angle;
float sin = FastMath.sin(halfAngle);
w = FastMath.cos(halfAngle);
x = sin * axis.x;
y = sin * axis.y;
z = sin * axis.z;
}
return this;
}
代码示例来源:origin: info.projectkyoto/mms-engine
bone.getLocalRotation().loadIdentity();
内容来源于网络,如有侵权,请联系作者删除!