Ver código fonte

added getBounds impl

ncannasse 11 anos atrás
pai
commit
8c3d170bc7
1 arquivos alterados com 8 adições e 1 exclusões
  1. 8 1
      h3d/prim/Polygon.hx

+ 8 - 1
h3d/prim/Polygon.hx

@@ -13,7 +13,14 @@ class Polygon extends Primitive {
 		this.points = points;
 		this.points = points;
 		this.idx = idx;
 		this.idx = idx;
 	}
 	}
-
+	
+	override function getBounds() {
+		var b = new h3d.col.Bounds();
+		for( p in points )
+			b.addPoint(p);
+		return b;
+	}
+	
 	override function alloc( engine : h3d.Engine ) {
 	override function alloc( engine : h3d.Engine ) {
 		dispose();
 		dispose();