mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #2146 from KiwiStrongis/master
added PMatrix.preApply( PMatrix) to resolve Issue #2145
This commit is contained in:
@@ -97,6 +97,8 @@ public interface PMatrix {
|
||||
/**
|
||||
* Apply another matrix to the left of this one.
|
||||
*/
|
||||
public void preApply(PMatrix left);
|
||||
|
||||
public void preApply(PMatrix2D left);
|
||||
|
||||
public void preApply(PMatrix3D left);
|
||||
|
||||
@@ -247,6 +247,15 @@ public class PMatrix2D implements PMatrix {
|
||||
/**
|
||||
* Apply another matrix to the left of this one.
|
||||
*/
|
||||
public void preApply(PMatrix source) {
|
||||
if (source instanceof PMatrix2D) {
|
||||
preApply((PMatrix2D) source);
|
||||
} else if (source instanceof PMatrix3D) {
|
||||
preApply((PMatrix3D) source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void preApply(PMatrix2D left) {
|
||||
preApply(left.m00, left.m01, left.m02,
|
||||
left.m10, left.m11, left.m12);
|
||||
|
||||
@@ -369,6 +369,15 @@ public final class PMatrix3D implements PMatrix /*, PConstants*/ {
|
||||
/**
|
||||
* Apply another matrix to the left of this one.
|
||||
*/
|
||||
public void preApply(PMatrix source) {
|
||||
if (source instanceof PMatrix2D) {
|
||||
preApply((PMatrix2D) source);
|
||||
} else if (source instanceof PMatrix3D) {
|
||||
preApply((PMatrix3D) source);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void preApply(PMatrix3D left) {
|
||||
preApply(left.m00, left.m01, left.m02, left.m03,
|
||||
left.m10, left.m11, left.m12, left.m13,
|
||||
|
||||
Reference in New Issue
Block a user