public void AddSceneObject(GameObject3D sceneObject)
 {
     if (!SceneObjects3D.Contains(sceneObject))
     {
         sceneObject.Scene = this;
         SceneObjects3D.Add(sceneObject);
     }
 }
 public void RemoveChild(GameObject3D child)
 {
     if (Children.Remove(child))
     {
         child.Scene = null;
         child.Parent = null;
     }
 }
        public bool HitTest(GameObject3D gameObj)
        {
            //Check Other_Object Itself
            if (gameObj.BoundingBox.HasValue && BoundingBox.HasValue)
            {
                if (BoundingBox.Value.Intersects(gameObj.BoundingBox.Value)) return true;
            }

            //Check this_Object and other_Object's Children
            if (gameObj.Children.FirstOrDefault(HitTest) != null) return true;

            //Check this_Object's children with other_Object
            return Children.FirstOrDefault(child => child.HitTest(gameObj)) != null;
        }
 public void AddChild(GameObject3D child)
 {
     if (!Children.Contains(child))
     {
         child.Scene = Scene;
         child.Parent = this;
         Children.Add(child);
     }
 }
 public void RemoveSceneObject(GameObject3D sceneObject)
 {
     if (SceneObjects3D.Remove(sceneObject))
     {
         sceneObject.Scene = null;
     }
 }