Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Matrix transformation.
- CubeModel cube=new CubeModel(0,1,0,1F,2.001F,1F);
- Matrix4f rot=new Matrix4f();
- rot.translate(new Vector3f(0,1,0));
- rot.rotate((float)Math.toRadians(40),new Vector3f(0,0,1));
- rot.translate(new Vector3f(0,-1,0));
- cube.transform(rot);
- cube.draw();
- OpenGl transformation
- CubeModel cube=new CubeModel(0,1,0,1F,2.001F,1F);
- GL11.glTranslatef(0, 1, 0);
- GL11U.glRotate(0, 0, 40);
- GL11.glTranslatef(0, -1, 0);
- cube.draw();
Add Comment
Please, Sign In to add comment