LWJGL Forum

Programming => OpenGL => Topic started by: beerbox on March 24, 2010, 11:25:03

Title: Tranlate and rotate at the same time
Post by: beerbox on March 24, 2010, 11:25:03
i have a square :). I rotated him and now i want to  translate him (when i push KEY_W) but in the way wich i rotate my square.
I need horizontal and vertical bounds. how can i check it?
Title: Re: Tranlate and rotate at the same time
Post by: broumbroum on March 24, 2010, 12:03:12
you may use java2d  AffineTransform ->createtransformedshape(Shape) (http://java.sun.com/j2se/1.4.2/docs/api/java/awt/geom/AffineTransform.html#createTransformedShape(java.awt.Shape)) to find transformed bounds.