本文整理匯總了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());
}