当前位置: 首页>>代码示例>>Java>>正文


Java Mouse.getDY方法代码示例

本文整理汇总了Java中org.lwjgl.input.Mouse.getDY方法的典型用法代码示例。如果您正苦于以下问题:Java Mouse.getDY方法的具体用法?Java Mouse.getDY怎么用?Java Mouse.getDY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.lwjgl.input.Mouse的用法示例。


在下文中一共展示了Mouse.getDY方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: calculateFPMovement

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
 * Calculates first person movement
 */
private void calculateFPMovement() {
	this.yaw = 180 - player.getRotation().y;

	if (Mouse.isButtonDown(1)) {
		float angleChange = Mouse.getDX() * 0.3f;
		yaw += angleChange;

		float pitchChange = Mouse.getDY() * 0.2f;
		pitch -= pitchChange;

		if (pitch > 90)
			pitch = 90;
	}

	player.setRotation(new Vector3f(0, 180 - yaw, 0));
}
 
开发者ID:Essentria,项目名称:Elgin-Plant-Game,代码行数:20,代码来源:Camera.java

示例2: calculatePitch

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
 * Calculate the pitch and change the pitch if the user is moving the mouse
 * up or down with the LMB pressed.
 */
private void calculatePitch() {
	if (Mouse.isButtonDown(0)) {
		float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
		pitch.increaseTarget(-pitchChange);
		clampPitch();
	}
	pitch.update(1f / 60);
}
 
开发者ID:TheThinMatrix,项目名称:LowPolyWater,代码行数:13,代码来源:Camera.java

示例3: calculatePitch

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePitch() {
	if (Mouse.isButtonDown(1)) {
		float pitchChange = Mouse.getDY() * 0.1f;
		pitch -= pitchChange;

		if (pitch > 90)
			pitch = 90;
	}
}
 
开发者ID:Essentria,项目名称:Elgin-Plant-Game,代码行数:10,代码来源:Camera.java

示例4: calculatePitch

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
 * Calculate the pitch and change the pitch if the user is moving the mouse
 * up or down with the LMB pressed.
 */
private void calculatePitch() {
	if (Mouse.isButtonDown(0)) {
		float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
		pitch.increaseTarget(-pitchChange);
		clampPitch();
	}
	pitch.update(DisplayManager.getFrameTime());
}
 
开发者ID:TheThinMatrix,项目名称:OpenGL-Animation,代码行数:13,代码来源:Camera.java

示例5: calculatePitch

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
/**
 * Calculate the pitch and change the pitch if the user is moving the mouse
 * up or down with the LMB pressed.
 */
private void calculatePitch() {
    if (Mouse.isButtonDown(0) && !Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
        float pitchChange = Mouse.getDY() * PITCH_SENSITIVITY;
        pitch.increaseTarget(-pitchChange);
        clampPitch();
    }
    pitch.update(1f / 60);
}
 
开发者ID:GryPLOfficial,项目名称:EcoSystem-Official,代码行数:13,代码来源:Camera.java

示例6: calculatePitch

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePitch(){
	if(Mouse.isButtonDown(1)){
		float pitchChange = Mouse.getDY() * 0.2f;
		pitch -= pitchChange;
		if(pitch < 0f){
			pitch =0f;
		}else if(pitch > 90){
			pitch = 90;
		}
	}
}
 
开发者ID:TheThinMatrix,项目名称:OcclusionQueries,代码行数:12,代码来源:Camera.java

示例7: mouseXYChange

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
public void mouseXYChange()
{
    this.deltaX = Mouse.getDX();
    this.deltaY = Mouse.getDY();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:6,代码来源:MouseHelper.java

示例8: calculatePan

import org.lwjgl.input.Mouse; //导入方法依赖的package包/类
private void calculatePan() {
    if (Mouse.isButtonDown(0) && Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
        cameraPosZ += Mouse.getDY() * -PAN_SENSITIVITY;
        cameraPosX += Mouse.getDX() * PAN_SENSITIVITY;
    }
}
 
开发者ID:GryPLOfficial,项目名称:EcoSystem-Official,代码行数:7,代码来源:Camera.java


注:本文中的org.lwjgl.input.Mouse.getDY方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。