本文整理匯總了Java中javax.vecmath.Point3d.getY方法的典型用法代碼示例。如果您正苦於以下問題:Java Point3d.getY方法的具體用法?Java Point3d.getY怎麽用?Java Point3d.getY使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.vecmath.Point3d
的用法示例。
在下文中一共展示了Point3d.getY方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: playSound
import javax.vecmath.Point3d; //導入方法依賴的package包/類
@Override
public void playSound(double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean distanceDelay) {
Point3d transformed = this.getTransformedPosition(new Point3d(x, y, z));
x = transformed.getX();
y = transformed.getY();
z = transformed.getZ();
double distance = this.mc.getRenderViewEntity().getDistanceSq(x, y, z);
PositionedSoundRecord positionedSound = new PositionedSoundRecord(sound, category, volume, pitch, (float) x, (float) y, (float) z);
if (distanceDelay && distance > 100.0D) {
double delay = Math.sqrt(distance) / 40.0D;
this.mc.getSoundHandler().playDelayedSound(positionedSound, (int) (delay * 20.0D));
} else {
this.mc.getSoundHandler().playSound(positionedSound);
}
}
示例2: getClosestPlayer
import javax.vecmath.Point3d; //導入方法依賴的package包/類
@Override
public EntityPlayer getClosestPlayer(double posX, double posY, double posZ, double distance, boolean spectator) {
Point3d transformed = this.getTransformedPosition(new Point3d(posX, posY, posZ));
posX = transformed.getX();
posY = transformed.getY();
posZ = transformed.getZ();
return this.mainWorld.getClosestPlayer(posX, posY, posZ, distance, spectator);
}
示例3: getNearestAttackablePlayer
import javax.vecmath.Point3d; //導入方法依賴的package包/類
@Override
public EntityPlayer getNearestAttackablePlayer(double posX, double posY, double posZ, double maxXZDistance, double maxYDistance, Function<EntityPlayer, Double> serializer, Predicate<EntityPlayer> selector) {
Point3d transformed = this.getTransformedPosition(new Point3d(posX, posY, posZ));
posX = transformed.getX();
posY = transformed.getY();
posZ = transformed.getZ();
return this.mainWorld.getNearestAttackablePlayer(posX, posY, posZ, maxXZDistance, maxYDistance, serializer, selector);
}
示例4: spawnParticle
import javax.vecmath.Point3d; //導入方法依賴的package包/類
@Override
public void spawnParticle(EnumParticleTypes particleType, double posX, double posY, double posZ, double xSpeed, double ySpeed, double zSpeed, int... parameters) {
Point3d transformed = this.getTransformedPosition(new Point3d(posX, posY, posZ));
posX = transformed.getX();
posY = transformed.getY();
posZ = transformed.getZ();
if (particleType != EnumParticleTypes.REDSTONE) {
Vec3d transformedVelocity = this.getTransformedVector(new Vec3d(xSpeed, ySpeed, zSpeed));
xSpeed = transformedVelocity.xCoord;
ySpeed = transformedVelocity.yCoord;
zSpeed = transformedVelocity.zCoord;
}
super.spawnParticle(particleType, posX, posY, posZ, xSpeed, ySpeed, zSpeed, parameters);
}
示例5: playSound
import javax.vecmath.Point3d; //導入方法依賴的package包/類
@Override
public void playSound(EntityPlayer player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch) {
Point3d transformed = this.getTransformedPosition(new Point3d(x, y, z));
x = transformed.getX();
y = transformed.getY();
z = transformed.getZ();
super.playSound(player, x, y, z, sound, category, volume, pitch);
}
示例6: transformEffect
import javax.vecmath.Point3d; //導入方法依賴的package包/類
public static void transformEffect(Particle particle) {
BlockSystem transforming = BlockSystem.transforming;
if (transforming != null) {
Point3d transformed = transforming.getTransformedPosition(new Point3d(particle.posX, particle.posY, particle.posZ));
particle.setPosition(transformed.getX(), transformed.getY(), transformed.getZ());
particle.prevPosX = transformed.getX();
particle.prevPosY = transformed.getY();
particle.prevPosZ = transformed.getZ();
Vec3d transformedVelocity = transforming.getTransformedVector(new Vec3d(particle.motionX, particle.motionY, particle.motionZ));
particle.motionX = transformedVelocity.xCoord;
particle.motionY = transformedVelocity.yCoord;
particle.motionZ = transformedVelocity.zCoord;
}
}
示例7: projection
import javax.vecmath.Point3d; //導入方法依賴的package包/類
public static Point2D projection(Point3d point) {
return new Point2D.Double(point.getX(), point.getY());
}
示例8: getTransformedPosition
import javax.vecmath.Point3d; //導入方法依賴的package包/類
public Vec3d getTransformedPosition(Vec3d position) {
Point3d point = new Point3d(position.xCoord - 0.5, position.yCoord, position.zCoord - 0.5);
this.transformMatrix.transform(point);
return new Vec3d(point.getX(), point.getY(), point.getZ());
}
示例9: getUntransformedPosition
import javax.vecmath.Point3d; //導入方法依賴的package包/類
public Vec3d getUntransformedPosition(Vec3d position) {
Point3d point = new Point3d(position.xCoord, position.yCoord, position.zCoord);
this.untransformMatrix.transform(point);
return new Vec3d(point.getX() + 0.5, point.getY(), point.getZ() + 0.5);
}
示例10: transformPoint
import javax.vecmath.Point3d; //導入方法依賴的package包/類
public Vec3d transformPoint(Vec3d vec) {
Point3d point = new Point3d(vec.xCoord, vec.yCoord, vec.zCoord);
this.transform(point);
return new Vec3d(point.getX(), point.getY(), point.getZ());
}