Index: samples/o3d-webgl/transform.js |
=================================================================== |
--- samples/o3d-webgl/transform.js (revision 45126) |
+++ samples/o3d-webgl/transform.js (working copy) |
@@ -135,11 +135,26 @@ |
*/ |
o3d.Transform.prototype.getTransformsInTree = |
function() { |
+ var result = []; |
+ o3d.Transform.getTransformInTreeRecursive_(this, result); |
+ return result; |
+}; |
+ |
+/** |
+ * Recursive helper function for getTransformInTree. |
+ * @private |
+ */ |
+o3d.Transform.getTransformInTreeRecursive_ = |
+ function(treeRoot, children) { |
+ children.push(treeRoot); |
+ var childrenArray = treeRoot.children; |
+ for (var ii = 0; ii < childrenArray.length; ++ii) { |
+ o3d.Transform.getTransformInTreeRecursive_(childrenArray[ii], children); |
+ } |
}; |
- |
/** |
* Searches for transforms that match the given name in the hierarchy under and |
* including this transform. Since there can be more than one transform with a |
@@ -155,10 +170,9 @@ |
*/ |
o3d.Transform.prototype.getTransformsByNameInTree = |
function(name) { |
- |
+ o3d.notImplemented(); |
}; |
- |
/** |
* Evaluates and returns the current world matrix. |
* |
@@ -166,7 +180,7 @@ |
*/ |
o3d.Transform.prototype.getUpdatedWorldMatrix = |
function() { |
- |
+ o3d.notImplemented(); |
}; |