/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x * glTranslate/glRotate/glScale. * @param degrees The angle in degrees * @return This matrix for the purpose of chaining. */ public Matrix3 rotate (float degrees) { return rotateRad(MathUtils.degreesToRadians * degrees); }
/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x * glTranslate/glRotate/glScale. * @param degrees The angle in degrees * @return This matrix for the purpose of chaining. */ public Matrix3 rotate (float degrees) { return rotateRad(MathUtils.degreesToRadians * degrees); }
/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x * glTranslate/glRotate/glScale. * @param degrees The angle in degrees * @return This matrix for the purpose of chaining. */ public Matrix3 rotate (float degrees) { return rotateRad(MathUtils.degreesToRadians * degrees); }
/** Postmultiplies this matrix with a (counter-clockwise) rotation matrix. Postmultiplication is also used by OpenGL ES' 1.x * glTranslate/glRotate/glScale. * @param degrees The angle in degrees * @return This matrix for the purpose of chaining. */ public Matrix3 rotate (float degrees) { return rotateRad(MathUtils.degreesToRadians * degrees); }
orientationMatrix.idt().rotateRad(anchor.getOrientation());
void updateBody() { if (body == null || staticLight) return; final Vector2 vec = body.getPosition(); tmpVec.set(0, 0).sub(bodyPosition); bodyPosition.set(vec); zeroPosition.setToTranslation(tmpVec); restorePosition.setToTranslation(bodyPosition); rotateAroundZero.setToRotationRad(bodyAngle).inv().rotateRad(body.getAngle()); bodyAngle = body.getAngle(); for (int i = 0; i < rayNum; i++) { tmpVec.set(startX[i], startY[i]).mul(zeroPosition).mul(rotateAroundZero) .mul(restorePosition); startX[i] = tmpVec.x; startY[i] = tmpVec.y; tmpVec.set(endX[i], endY[i]).mul(zeroPosition).mul(rotateAroundZero) .mul(restorePosition); endX[i] = tmpVec.x; endY[i] = tmpVec.y; } }
void updateBody() { if (body == null || staticLight) return; final Vector2 vec = body.getPosition(); tmpVec.set(0, 0).sub(bodyPosition); bodyPosition.set(vec); zeroPosition.setToTranslation(tmpVec); restorePosition.setToTranslation(bodyPosition); rotateAroundZero.setToRotationRad(bodyAngle).inv().rotateRad(body.getAngle()); bodyAngle = body.getAngle(); for (int i = 0; i < rayNum; i++) { tmpVec.set(startX[i], startY[i]).mul(zeroPosition).mul(rotateAroundZero) .mul(restorePosition); startX[i] = tmpVec.x; startY[i] = tmpVec.y; tmpVec.set(endX[i], endY[i]).mul(zeroPosition).mul(rotateAroundZero) .mul(restorePosition); endX[i] = tmpVec.x; endY[i] = tmpVec.y; } }
orientationMatrix.idt().rotateRad(anchor.getOrientation());