示例#1
0
 public override bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f)
 {
     return(world.Intersects(Transform(transform, ghostRegion), buffer));
 }
示例#2
0
 public override bool IsVisible(Viewport viewport, Transform transform, GhostRegion ghostRegion)
 {
     return(viewport.IsVisible(Transform(transform, ghostRegion)));
 }
示例#3
0
 public override bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion)
 {
     return(world.IsCollidable(Transform(transform, ghostRegion)));
 }
示例#4
0
 public override bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f)
 {
     return(world.Contains(Transform(transform, ghostRegion), buffer));
 }
示例#5
0
        private Bounds Transform(Transform transform, GhostRegion ghostRegion)
        {
            var scale = transform.lossyScale;

            return(ghostRegion.Transform(new Bounds(transform.position + box.center.MultiplyComponents(scale), box.size.MultiplyComponents(scale))));
        }
示例#6
0
 private Vector3 Transform(Transform transform, GhostRegion ghostRegion)
 {
     return(ghostRegion.Transform(transform.TransformPoint(position)));
 }
示例#7
0
        private Sphere Transform(Transform transform, GhostRegion ghostRegion)
        {
            var scale = transform.lossyScale;

            return(ghostRegion.Transform(new Sphere(transform.TransformPoint(sphere.center), sphere.radius * scale.MaxAbsComponent())));
        }
示例#8
0
 public abstract bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
示例#9
0
 public virtual void DrawGizmosSelected(Transform transform, GhostRegion ghostRegion, Color color)
 {
 }
示例#10
0
 public abstract bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
示例#11
0
 public abstract bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion);
示例#12
0
 public abstract bool IsVisible(Viewport viewport, Transform transform, GhostRegion ghostRegion);
示例#13
0
        private Sphere Transform(Transform transform, GhostRegion ghostRegion)
        {
            var scale = transform.lossyScale;

            return(ghostRegion.Transform(new Sphere(transform.position + sphere.center.MultiplyComponents(scale), sphere.radius * scale.MaxAbsComponent())));
        }
示例#14
0
 private Vector3 Transform(Transform transform, GhostRegion ghostRegion)
 {
     return(ghostRegion.Transform(transform.position + transform.TransformDirection(position)));
 }