瀏覽代碼

Added Width, height, Depth to std.geom.Box.

Mark Sibly 8 年之前
父節點
當前提交
0cd2d81f24
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      modules/std/geom/box.monkey2

+ 12 - 0
modules/std/geom/box.monkey2

@@ -59,6 +59,18 @@ Struct Box<T>
 		Return max-min
 	End
 	
+	Property Width:T()
+		Return max.x-min.x
+	End
+	
+	Property Height:T()
+		Return max.y-min.y
+	End
+	
+	Property Depth:T()
+		Return max.z-min.z
+	End
+	
 	Operator+:Box( v:Vec3<T> )
 		Return New Box( min+v,max+v )
 	End