Example #1
0
 public override bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f)
 {
     return(world.Intersects(Transform(transform, ghostRegion), buffer));
 }
Example #2
0
 public override bool IsVisible(Viewport viewport, Transform transform, GhostRegion ghostRegion)
 {
     return(viewport.IsVisible(Transform(transform, ghostRegion)));
 }
Example #3
0
 public override bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion)
 {
     return(world.IsCollidable(Transform(transform, ghostRegion)));
 }
Example #4
0
 public override bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f)
 {
     return(world.Contains(Transform(transform, ghostRegion), buffer));
 }
Example #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))));
        }
 private Vector3 Transform(Transform transform, GhostRegion ghostRegion)
 {
     return(ghostRegion.Transform(transform.TransformPoint(position)));
 }
Example #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())));
        }
Example #8
0
 public abstract bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
Example #9
0
 public virtual void DrawGizmosSelected(Transform transform, GhostRegion ghostRegion, Color color)
 {
 }
Example #10
0
 public abstract bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
Example #11
0
 public abstract bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion);
Example #12
0
 public abstract bool IsVisible(Viewport viewport, Transform transform, GhostRegion ghostRegion);
        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())));
        }
 private Vector3 Transform(Transform transform, GhostRegion ghostRegion)
 {
     return(ghostRegion.Transform(transform.position + transform.TransformDirection(position)));
 }