Пример #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)));
 }