Nicolas Cannasse преди 4 години
родител
ревизия
e2c738a48d
променени са 1 файла, в които са добавени 13 реда и са изтрити 0 реда
  1. 13 0
      h3d/pass/PassList.hx

+ 13 - 0
h3d/pass/PassList.hx

@@ -45,6 +45,19 @@ class PassList {
 		}
 	}
 
+	/**
+	 * Return the number of passes
+	 */
+	public inline function count() {
+		var c = current;
+		var n = 0;
+		while( c != null ) {
+			n++;
+			c = c.next;
+		}
+		return n;
+ 	}
+
 	/**
 		Save the discarded list, allow to perfom some filters, then call "load" to restore passes
 	**/