本文整理汇总了Java中net.minecraft.client.renderer.culling.Frustum.setPosition方法的典型用法代码示例。如果您正苦于以下问题:Java Frustum.setPosition方法的具体用法?Java Frustum.setPosition怎么用?Java Frustum.setPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.client.renderer.culling.Frustum
的用法示例。
在下文中一共展示了Frustum.setPosition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getCamera
import net.minecraft.client.renderer.culling.Frustum; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public static Frustum getCamera (Entity renderEntity, float partialTicks) {
final double cameraX = renderEntity.prevPosX + (renderEntity.posX - renderEntity.prevPosX) * partialTicks;
final double cameraY = renderEntity.prevPosY + (renderEntity.posY - renderEntity.prevPosY) * partialTicks;
final double cameraZ = renderEntity.prevPosZ + (renderEntity.posZ - renderEntity.prevPosZ) * partialTicks;
final Frustum camera = new Frustum();
camera.setPosition(cameraX, cameraY, cameraZ);
return camera;
}
示例2: getFrustum
import net.minecraft.client.renderer.culling.Frustum; //导入方法依赖的package包/类
ICamera getFrustum(float partial) {
// Unfortunately we have to make our own Frustum.
final Minecraft mc = Minecraft.getMinecraft();
final Entity eye = mc.getRenderViewEntity();
double eyeX = eye.lastTickPosX + (eye.posX - eye.lastTickPosX) * (double)partial;
double eyeY = eye.lastTickPosY + (eye.posY - eye.lastTickPosY) * (double)partial;
double eyeZ = eye.lastTickPosZ + (eye.posZ - eye.lastTickPosZ) * (double)partial;
Frustum frustum = new Frustum(); // Notch can't spell
frustum.setPosition(eyeX, eyeY, eyeZ);
return frustum;
}
示例3: getCamera
import net.minecraft.client.renderer.culling.Frustum; //导入方法依赖的package包/类
/**
* Gets the camera for a specific entity.
*
* @param entity The entity to get the camera for.
* @param partialTicks The partial ticks for the camera.
* @return The camera for the entity.
*/
public static Frustum getCamera (Entity entity, float partialTicks) {
final double cameraX = entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks;
final double cameraY = entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks;
final double cameraZ = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks;
final Frustum camera = new Frustum();
camera.setPosition(cameraX, cameraY, cameraZ);
return camera;
}
示例4: getCamera
import net.minecraft.client.renderer.culling.Frustum; //导入方法依赖的package包/类
/**
* Gets the camera for a specific entity.
*
* @param entity The entity to get the camera for.
* @param partialTicks The partial ticks for the camera.
* @return The camera for the entity.
*/
public static Frustum getCamera (Entity entity, float partialTicks) {
final double cameraX = entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks;
final double cameraY = entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks;
final double cameraZ = entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks;
final Frustum camera = new Frustum();
camera.setPosition(cameraX, cameraY, cameraZ);
return camera;
}
示例5: setFrustrumPosition
import net.minecraft.client.renderer.culling.Frustum; //导入方法依赖的package包/类
public static void setFrustrumPosition(Frustum frustrum, double x, double y, double z)
{
frustrum.setPosition(x, y, z);
}