com.jogamp.opengl.math.Quaternion.rotateVector()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(240)

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

Quaternion.rotateVector介绍

[英]Rotate the given vector by this quaternion
[中]用这个四元数旋转给定的向量

代码示例

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
 * Rotate this AABBox by a float[3] vector
 * @param quat the {@link Quaternion} used for rotation
 * @return this AABBox for chaining
 */
public final AABBox rotate(final Quaternion quat) {
  quat.rotateVector(low, 0, low, 0);
  quat.rotateVector(high, 0, high, 0);
  computeCenter();
  return this;
}

代码示例来源:origin: org.jogamp.jogl/jogl

/**
 * Rotate this AABBox by a float[3] vector
 * @param quat the {@link Quaternion} used for rotation
 * @return this AABBox for chaining
 */
public final AABBox rotate(final Quaternion quat) {
  quat.rotateVector(low, 0, low, 0);
  quat.rotateVector(high, 0, high, 0);
  computeCenter();
  return this;
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/**
 * Rotate this AABBox by a float[3] vector
 * @param quat the {@link Quaternion} used for rotation
 * @return this AABBox for chaining
 */
public final AABBox rotate(final Quaternion quat) {
  quat.rotateVector(low, 0, low, 0);
  quat.rotateVector(high, 0, high, 0);
  computeCenter();
  return this;
}

代码示例来源:origin: net.clearvolume/cleargl

public GLVector times(final Quaternion q) {
  final float[] in = this.mElements.clone();
  final float[] out = new float[mDimension];
  q.rotateVector(out, 0, in, 0);
  return new GLVector(out);
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

final float[] shiftedEyePos = rollPitchYaw.rotateVector(vec3Tmp1, 0, viewerPose.position, 0);
VectorUtil.addVec3(shiftedEyePos, shiftedEyePos, eyeParam.positionOffset);
final float[] up = rollPitchYaw.rotateVector(vec3Tmp2, 0, VectorUtil.VEC3_UNIT_Y, 0);
final float[] forward = rollPitchYaw.rotateVector(vec3Tmp3, 0, VectorUtil.VEC3_UNIT_Z_NEG, 0);
final float[] center = VectorUtil.addVec3(forward, shiftedEyePos, forward);

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

final float[] shiftedEyePos = rollPitchYaw.rotateVector(vec3Tmp1, 0, eyePose.position, 0);
VectorUtil.addVec3(shiftedEyePos, shiftedEyePos, eyeParam.positionOffset);
final float[] up = rollPitchYaw.rotateVector(vec3Tmp2, 0, VectorUtil.VEC3_UNIT_Y, 0);
final float[] forward = rollPitchYaw.rotateVector(vec3Tmp3, 0, VectorUtil.VEC3_UNIT_Z_NEG, 0);
final float[] center = VectorUtil.addVec3(forward, shiftedEyePos, forward);

相关文章