diff options
author | 2024-07-10 20:32:58 +0000 | |
---|---|---|
committer | 2024-07-10 20:32:58 +0000 | |
commit | 72dfcdfa8a06cfb9824bb0422ed0eb3ea4374dd0 (patch) | |
tree | 3c88d44570ee6b29c94cb8a432c9efa9e8d6f5d6 | |
parent | 584def72c27eb44c0cd4a731de6b492c106ebf0d (diff) |
Rename Transform::set() params to avoid confusion.
Bug: 352172569
Flag: DOCS_ONLY
Change-Id: Ic55e31639faf7628f74f155e6509ce9c2ec663a8
Test: builds
-rw-r--r-- | libs/ui/Transform.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libs/ui/Transform.cpp b/libs/ui/Transform.cpp index 42dd85e959..23249fa4a9 100644 --- a/libs/ui/Transform.cpp +++ b/libs/ui/Transform.cpp @@ -110,10 +110,12 @@ const vec3& Transform::operator [] (size_t i) const { return mMatrix[i]; } +// x translate float Transform::tx() const { return mMatrix[2][0]; } +// y translate float Transform::ty() const { return mMatrix[2][1]; } @@ -167,11 +169,15 @@ void Transform::set(float tx, float ty) { } } -void Transform::set(float a, float b, float c, float d) { +// x and y are the coordinates in the destination (i.e. the screen) +// s and t are the coordinates in the source (i.e. the texture) +// d means derivative +// dsdx means ds/dx derivative of s with respect to x, etc. +void Transform::set(float dsdx, float dtdy, float dtdx, float dsdy) { mat33& M(mMatrix); - M[0][0] = a; M[1][0] = b; - M[0][1] = c; M[1][1] = d; - M[0][2] = 0; M[1][2] = 0; + M[0][0] = dsdx; M[1][0] = dtdy; + M[0][1] = dtdx; M[1][1] = dsdy; + M[0][2] = 0; M[1][2] = 0; mType = UNKNOWN_TYPE; } |