List of usage examples for org.lwjgl.opengl GL11 glRotated
public static native void glRotated(@NativeType("GLdouble") double angle, @NativeType("GLdouble") double x, @NativeType("GLdouble") double y, @NativeType("GLdouble") double z);
From source file:cn.lambdacraft.terrain.client.model.ModelXenLight.java
License:Open Source License
@Override public void render(TileEntity is, double x, double y, double z, float f1, float scale, float f) { TileEntityXenLight tile = (TileEntityXenLight) is; GL11.glPushMatrix();/*from ww w. ja va 2 s .co m*/ GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5); GL11.glScalef(-1.0F, -1.0F, 1.0F); RenderUtils.loadTexture(ClientProps.XENLIGHT_PATH); Shape1.render(scale); //~ GL11.glRotated(12.5 * MathHelper.sin(tile.ticksExisted * 0.07F), 0.1, 1, -0.1); if (tile.isLighting) { if (tile.tickSinceChange < 15) GL11.glTranslatef(0.0F, 0.0166F * (15 - tile.tickSinceChange), 0.0F); } else { if (tile.tickSinceChange < 5) GL11.glTranslatef(0.0F, 0.05F * tile.tickSinceChange, 0.0F); else GL11.glTranslatef(0.0F, 0.25F, 0.0F); } Shape2.render(scale); Shape3.render(scale); GL11.glPopMatrix(); }
From source file:cn.lambdalib.multiblock.RenderBlockMulti.java
License:MIT License
@Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float f) { if (!(te.getBlockType() instanceof BlockMulti)) return;/*from w w w . j ava 2 s . co m*/ BlockMulti bm = (BlockMulti) te.getBlockType(); InfoBlockMulti inf = ((IMultiTile) te).getBlockInfo(); if (inf == null || !inf.isLoaded() || inf.subID != 0) return; GL11.glPushMatrix(); double[] off = bm.getPivotOffset(inf); double[] off2 = bm.rotCenters[inf.dir.ordinal()]; GL11.glTranslated(x + off[0] + off2[0], y + 0 + off2[1], z + off[1] + off2[2]); // GL11.glTranslated(x, y, z); GL11.glRotated(bm.getRotation(inf), 0, 1, 0); drawAtOrigin(te); GL11.glPopMatrix(); }
From source file:cn.lambdalib.multiblock.RenderBlockMultiModel.java
License:MIT License
@Override public void drawAtOrigin(TileEntity te) { GL11.glColor4d(1, 1, 1, 1);//from www. java2 s . co m if (tex != null) { RenderUtils.loadTexture(tex); } GL11.glRotated(rotateY, 0, 1, 0); GL11.glScaled(scale, scale, scale); mdl.render(te, 0, 0); }
From source file:cn.lambdalib.template.client.render.item.RenderModelItem.java
License:MIT License
protected void renderAtStdPosition(float i) { GL11.glScaled(scale, scale, scale);/*from www . j av a 2s . c o m*/ GL11.glDisable(GL11.GL_CULL_FACE); this.doTransformation(stdOffset); GL11.glScalef(-1F, -1F, 1F); GL11.glRotated(stdRotation.yCoord + 180, 0.0F, 1.0F, 0.0F); GL11.glRotated(stdRotation.zCoord, 0.0F, 0.0F, 1.0F); GL11.glRotated(stdRotation.xCoord, 1.0F, 0.0F, 0.0F); model.render(null, 0.0625F, i); GL11.glEnable(GL11.GL_CULL_FACE); }
From source file:cn.lambdalib.template.client.render.item.RenderModelItem.java
License:MIT License
protected void doRotation(Vec3 vec3) { if (vec3 != null) { GL11.glRotated(vec3.yCoord, 0.0F, 1.0F, 0.0F); GL11.glRotated(vec3.zCoord, 0.0F, 0.0F, 1.0F); GL11.glRotated(vec3.xCoord, 1.0F, 0.0F, 0.0F); }/*w w w .jav a 2 s. com*/ }
From source file:cn.lambdalib.util.client.RenderUtils.java
License:MIT License
public static void glRotate(double angle, Vec3 axis) { GL11.glRotated(angle, axis.xCoord, axis.yCoord, axis.zCoord); }
From source file:cn.lambdalib.vis.model.CompTransform.java
License:MIT License
public void doTransform() { RenderUtils.glTranslate(VecUtils.add(transform, pivotPt)); GL11.glRotated(rotation.xCoord, 1, 0, 0); GL11.glRotated(rotation.yCoord, 0, 1, 0); GL11.glRotated(rotation.zCoord, 0, 0, 1); GL11.glScaled(scale, scale, scale);// ww w .ja v a2 s . co m RenderUtils.glTranslate(VecUtils.neg(pivotPt)); }
From source file:cn.lambdalib.vis.model.renderer.ItemModelRenderer.java
License:MIT License
private void doFixedTransform() { GL11.glRotated(35, 0, 0, 1); GL11.glTranslated(0.8, -.12, 0); }
From source file:cn.liutils.api.draw.prop.Rotation.java
License:Open Source License
@Override public void onEvent(EventType event, DrawObject obj) { GL11.glRotated(angle, axisX, axisY, axisZ); }
From source file:cn.liutils.api.draw.prop.Transform.java
License:Open Source License
@Override public void onEvent(EventType event, DrawObject obj) { switch (event) { case PRE_TRANSFORM: GL11.glTranslated(tx, ty, tz);//from ww w . j a v a 2 s .com break; case POST_TRANSFORM: GL11.glTranslated(pivotX, pivotY, pivotZ); GL11.glRotated(yaw, 0, 1, 0); GL11.glRotated(pitch, 1, 0, 0); GL11.glRotated(roll, 0, 0, 1); GL11.glTranslated(-pivotX, -pivotY, -pivotZ); break; default: //wtf? break; } }