Browse Source

added Bounds.addTransform

Nicolas Cannasse 2 years ago
parent
commit
9ff55e9db9
1 changed files with 6 additions and 0 deletions
  1. 6 0
      h3d/col/Bounds.hx

+ 6 - 0
h3d/col/Bounds.hx

@@ -211,6 +211,12 @@ class Bounds extends Collider {
 		if( b.zMax > zMax ) zMax = b.zMax;
 	}
 
+	public inline function addTransform( b : Bounds, m : h3d.Matrix ) {
+		var tmp = b.clone();
+		tmp.transform(m);
+		add(tmp);
+	}
+
 	public inline function addPoint( p : Point ) {
 		if( p.x < xMin ) xMin = p.x;
 		if( p.x > xMax ) xMax = p.x;