本文整理汇总了Java中javax.vecmath.Vector3d.getY方法的典型用法代码示例。如果您正苦于以下问题:Java Vector3d.getY方法的具体用法?Java Vector3d.getY怎么用?Java Vector3d.getY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.vecmath.Vector3d
的用法示例。
在下文中一共展示了Vector3d.getY方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: rotateAABB
import javax.vecmath.Vector3d; //导入方法依赖的package包/类
/**
* Rotate an {@link AxisAlignedBB} by the specified rotation matrix.
*
* @param axisAlignedBB The AABB
* @param rotationMatrix The rotation matrix
* @param forcePositive If true, set each coordinate of the rotated AABB to it absolute value
* @return The rotated AABB
*/
public static AxisAlignedBB rotateAABB(AxisAlignedBB axisAlignedBB, Matrix3d rotationMatrix, boolean forcePositive) {
// Extract the minimum and maximum coordinates of the AABB into vectors
final Vector3d minCoords = new Vector3d(axisAlignedBB.minX, axisAlignedBB.minY, axisAlignedBB.minZ);
final Vector3d maxCoords = new Vector3d(axisAlignedBB.maxX, axisAlignedBB.maxY, axisAlignedBB.maxZ);
// Rotate the vectors in-place
rotationMatrix.transform(minCoords);
rotationMatrix.transform(maxCoords);
if (forcePositive) {
// Get the absolute value of the coordinates
minCoords.absolute();
maxCoords.absolute();
}
// Return an AABB with the new coordinates
return new AxisAlignedBB(minCoords.getX(), minCoords.getY(), minCoords.getZ(), maxCoords.getX(), maxCoords.getY(), maxCoords.getZ());
}
示例2: Vector3D
import javax.vecmath.Vector3d; //导入方法依赖的package包/类
public Vector3D(Vector3d vector) {
this(vector.getX(), vector.getY(), vector.getZ());
}
示例3: projection
import javax.vecmath.Vector3d; //导入方法依赖的package包/类
public static Point2D projection(Vector3d vector) {
return new Point2D.Double(vector.getX(), vector.getY());
}
示例4: Velocity
import javax.vecmath.Vector3d; //导入方法依赖的package包/类
public Velocity( Vector3d vector ) {
this(vector.getX(), vector.getY(), vector.getZ());
}
示例5: getTransformedVector
import javax.vecmath.Vector3d; //导入方法依赖的package包/类
public Vec3d getTransformedVector(Vec3d vec) {
Vector3d vector = new Vector3d(vec.xCoord, vec.yCoord, vec.zCoord);
this.transformMatrix.transform(vector);
return new Vec3d(vector.getX(), vector.getY(), vector.getZ());
}