本文整理了Java中org.lwjgl.input.Mouse.getDY()
方法的一些代码示例,展示了Mouse.getDY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mouse.getDY()
方法的具体详情如下:
包路径:org.lwjgl.input.Mouse
类名称:Mouse
方法名:getDY
暂无
代码示例来源:origin: MovingBlocks/Terasology
@Override
public Vector2i getDelta() {
return new Vector2i(Mouse.getDX(), -Mouse.getDY());
}
代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition
@SubscribeEvent
public void renderTick(TickEvent.RenderTickEvent event) {
if (showRadial) {
Mouse.getDX();
Mouse.getDY();
mc.mouseHelper.deltaX = mc.mouseHelper.deltaY = 0;
}
}
代码示例来源:origin: jabelar/ExampleMod-1.12
@Override
public void mouseXYChange()
{
if (Keyboard.isKeyDown(Keyboard.KEY_COMMA))
{
deltaX += 1;
}
else
{
deltaX = Mouse.getDX();
}
deltaY = Mouse.getDY();
}
}
代码示例来源:origin: org.ode4j/demo
/**
* Updates our "model"
*
*/
private void updateState() {
int dx = Mouse.getDX();
int dy = Mouse.getDY();
int dw = Mouse.getDWheel();
// get out if no movement
if (dx == dy && dx == 0 && dw == 0) {
return;
}
//LWJGL: 0=left 1=right 2=middle
//GL: 0=left 1=middle 2=right
int mode = 0;
if (Mouse.isButtonDown(0)) mode |= 1;
if (Mouse.isButtonDown(2)) mode |= 2;
if (Mouse.isButtonDown(1)) mode |= 4;
if (mode != 0) {
//LWJGL has inverted dy wrt C++/GL
dsMotion (mode, dx, -dy);
}
}
代码示例来源:origin: monster860/FastDMM
float ypos = Display.getHeight() - Mouse.getY();
double dx = Mouse.getDX();
double dy = -Mouse.getDY();
代码示例来源:origin: MrCrayfish/ModelCreator
camera.addY(Mouse.getDY() * 0.01F * modifier);
camera.rotateX(-(Mouse.getDY() * 0.5F) * modifier);
final float rxAbs = Math.abs(camera.getRX());
camera.rotateY((rxAbs >= 90 && rxAbs < 270 ? -1 : 1) * Mouse.getDX() * 0.5F * modifier);
内容来源于网络,如有侵权,请联系作者删除!