Browse Source

added FIgnoreBounds

Nicolas Cannasse 8 years ago
parent
commit
4d88132e95
2 changed files with 11 additions and 10 deletions
  1. 1 1
      h3d/scene/Mesh.hx
  2. 10 9
      h3d/scene/Object.hx

+ 1 - 1
h3d/scene/Mesh.hx

@@ -14,7 +14,7 @@ class Mesh extends Object {
 
 	override function getBounds( ?b : h3d.col.Bounds, rec = false ) {
 		b = super.getBounds(b, rec);
-		if( primitive == null )
+		if( primitive == null || flags.has(FIgnoreBounds) )
 			return b;
 		var tmp = primitive.getBounds().clone();
 		tmp.transform(absPos);

+ 10 - 9
h3d/scene/Object.hx

@@ -1,15 +1,16 @@
 package h3d.scene;
 
 @:enum abstract ObjectFlags(Int) {
-	public var FPosChanged = 1;
-	public var FVisible = 2;
-	public var FCulled = 4;
-	public var FFollowPositionOnly = 8;
-	public var FLightCameraCenter = 16;
-	public var FAllocated = 32;
-	public var FAlwaysSync = 64;
-	public var FInheritCulled = 128;
-	public var FNoSerialize = 256;
+	public var FPosChanged = 0x01;
+	public var FVisible = 0x02;
+	public var FCulled = 0x04;
+	public var FFollowPositionOnly = 0x08;
+	public var FLightCameraCenter = 0x10;
+	public var FAllocated = 0x20;
+	public var FAlwaysSync = 0x40;
+	public var FInheritCulled = 0x80;
+	public var FNoSerialize = 0x100;
+	public var FIgnoreBounds = 0x200;
 	public inline function new() {
 		this = 0;
 	}