Skip to content

Commit

Permalink
Add AABBi/d/f.set(AABBi/d/f source) (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
pollend committed May 18, 2020
1 parent 4e35f9b commit 579f1de
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/org/joml/AABBd.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,27 @@ public AABBd(double minX, double minY, double minZ, double maxX, double maxY, do
this.maxZ = maxZ;
}

/**
* Set this {@link AABBd} to be a clone of <code>source</code>.
*
* @param source
* the {@link AABBd} to copy from
* @return this
*/
public AABBd set(AABBd source){
this.minX = source.minX;
this.minY = source.minY;
this.minZ = source.minZ;
this.maxX = source.maxX;
this.maxY = source.maxY;
this.maxZ = source.maxZ;
return this;
}


/**
* Set the minimum corner coordinates.
*
*
* @param minX
* the x coordinate of the minimum corner
* @param minY
Expand Down
17 changes: 17 additions & 0 deletions src/org/joml/AABBf.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ public AABBf(float minX, float minY, float minZ, float maxX, float maxY, float m
this.maxZ = maxZ;
}

/**
* Set this {@link AABBf} to be a clone of <code>source</code>.
*
* @param source
* the {@link AABBf} to copy from
* @return this
*/
public AABBf set(AABBf source){
this.minX = source.minX;
this.minY = source.minY;
this.minZ = source.minZ;
this.maxX = source.maxX;
this.maxY = source.maxY;
this.maxZ = source.maxZ;
return this;
}

/**
* Set the minimum corner coordinates.
*
Expand Down
17 changes: 17 additions & 0 deletions src/org/joml/AABBi.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,23 @@ public AABBi setMax(int maxX, int maxY, int maxZ) {
return this;
}

/**
* Set this {@link AABBi} to be a clone of <code>source</code>.
*
* @param source
* the {@link AABBi} to copy from
* @return this
*/
public AABBi set(AABBi source){
this.minX = source.minX;
this.minY = source.minY;
this.minZ = source.minZ;
this.maxX = source.maxX;
this.maxY = source.maxY;
this.maxZ = source.maxZ;
return this;
}

/**
* Set the minimum corner coordinates.
*
Expand Down

0 comments on commit 579f1de

Please sign in to comment.