MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetTransformsAndBounds

Method GetTransformsAndBounds

Source/Editor/Utilities/Utils.cs:381–394  ·  view source on GitHub ↗
(List<SceneGraphNode> nodes, out BoundingBox bounds)

Source from the content-addressed store, hash-verified

379 }
380
381 internal static Transform[] GetTransformsAndBounds(List<SceneGraphNode> nodes, out BoundingBox bounds)
382 {
383 var transforms = new Transform[nodes.Count];
384 bounds = BoundingBox.Empty;
385 for (int i = 0; i < nodes.Count; i++)
386 {
387 transforms[i] = nodes[i].Transform;
388 if (nodes[i] is ActorNode actorNode)
389 {
390 bounds = BoundingBox.Merge(bounds, actorNode.Actor.BoxWithChildren);
391 }
392 }
393 return transforms;
394 }
395
396 /// <summary>
397 /// Removes the file if it exists.

Callers 1

Calls 1

MergeMethod · 0.45

Tested by

no test coverage detected