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

Method GetActorEditorSphere

Source/Editor/Editor.cs:1056–1070  ·  view source on GitHub ↗

Gets the actor bounding sphere (including child actors). The actor. The bounding sphere.

(Actor actor, out BoundingSphere sphere)

Source from the content-addressed store, hash-verified

1054 /// <param name="actor">The actor.</param>
1055 /// <param name="sphere">The bounding sphere.</param>
1056 public static void GetActorEditorSphere(Actor actor, out BoundingSphere sphere)
1057 {
1058 if (actor)
1059 {
1060 Internal_GetEditorBoxWithChildren(FlaxEngine.Object.GetUnmanagedPtr(actor), out var box);
1061 BoundingSphere.FromBox(ref box, out sphere);
1062 if (sphere == BoundingSphere.Empty)
1063 sphere = new BoundingSphere(actor.Position, sphere.Radius);
1064 sphere.Radius = Math.Max(sphere.Radius, 15.0f);
1065 }
1066 else
1067 {
1068 sphere = BoundingSphere.Empty;
1069 }
1070 }
1071
1072 /// <summary>
1073 /// Closes editor splash screen popup window.

Callers 3

GetEditorSphereMethod · 0.80
UpdateMethod · 0.80
ShowActorMethod · 0.80

Calls 3

GetUnmanagedPtrMethod · 0.80
FromBoxMethod · 0.45
MaxMethod · 0.45

Tested by

no test coverage detected