本文整理汇总了Java中com.jme3.math.Vector3f.UNIT_X属性的典型用法代码示例。如果您正苦于以下问题:Java Vector3f.UNIT_X属性的具体用法?Java Vector3f.UNIT_X怎么用?Java Vector3f.UNIT_X使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.jme3.math.Vector3f
的用法示例。
在下文中一共展示了Vector3f.UNIT_X属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPickedVector
/**
* Get a vector to calculate transformations by the Axis.
*
* @param transform the base transform.
* @param pickedAxis the picked Axis.
* @param camera the camera.
* @return the axis vector.
*/
@NotNull
@JMEThread
protected Vector3f getPickedVector(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
@NotNull final Camera camera) {
if (pickedAxis == PickedAxis.Y) {
return Vector3f.UNIT_Y;
} else if (pickedAxis == PickedAxis.Z) {
return Vector3f.UNIT_Z;
} else return Vector3f.UNIT_X;
}
示例2: getScaleAxis
/**
* Get a vector to calculate scaling by the axis.
*
* @param transform the base transform.
* @param pickedAxis the picked Axis.
* @param camera the camera.
* @return the axis vector.
*/
@NotNull
@JMEThread
protected Vector3f getScaleAxis(@NotNull final Transform transform, @NotNull final PickedAxis pickedAxis,
@NotNull final Camera camera) {
if (pickedAxis == PickedAxis.Y) {
return Vector3f.UNIT_Y;
} else if (pickedAxis == PickedAxis.Z) {
return Vector3f.UNIT_Z;
} else return Vector3f.UNIT_X;
}