I’m developing for Android and I’m using the
android.renderscript.Matrix3f class to do some calculations.
What I need to do now is to now is to do something like
So I need to transform a matrix by a given
Point class. In
awt I would simply do this:
AffineTransform t = new AffineTransform(); Point2D.Float p = new Point2D.Float(); t.transform( p, p );
But in Android I now have this:
Matrix3f t = new Matrix3f(); PointF p = new PointF(); // Now I need to tranform it somehow..
Matrix3f class in Android doesn’t have a
Matrix.transform(Point2D ptSrc, Point2D ptDst) method.
So I guess I have to do the transformation manually. But I’m not really sure how that works. From what I’ve seen it’s something like a
translate and then a
Could anyone please tell me how to do this in code?