예제 #1
0
            /// <summary>
            /// Pre hit test on <see cref="BoundsWithTransform"/> and <see cref="BoundsSphereWithTransform"/>.
            /// If return false, <see cref="SceneNode.OnHitTest"/> will not be called.
            /// </summary>
            /// <param name="context"></param>
            /// <returns></returns>
            protected virtual bool PreHitTestOnBounds(HitTestContext context)
            {
                var ray = context.RayWS;

                return(BoundsSphereWithTransform.Intersects(ref ray) && BoundsWithTransform.Intersects(ref ray));
            }
예제 #2
0
 /// <summary>
 /// Pre hit test on <see cref="BoundsWithTransform"/> and <see cref="BoundsSphereWithTransform"/>.
 /// If return false, <see cref="SceneNode.OnHitTest"/> will not be called.
 /// </summary>
 /// <param name="ray">The ray.</param>
 /// <returns></returns>
 protected virtual bool PreHitTestOnBounds(ref Ray ray)
 {
     return(BoundsSphereWithTransform.Intersects(ref ray) && BoundsWithTransform.Intersects(ref ray));
 }