public override bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f) { return(world.Intersects(Transform(transform, ghostRegion), buffer)); }
public override bool IsVisible(Viewport viewport, Transform transform, GhostRegion ghostRegion) { return(viewport.IsVisible(Transform(transform, ghostRegion))); }
public override bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion) { return(world.IsCollidable(Transform(transform, ghostRegion))); }
public override bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f) { return(world.Contains(Transform(transform, ghostRegion), buffer)); }
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))); }
private Sphere Transform(Transform transform, GhostRegion ghostRegion) { var scale = transform.lossyScale; return(ghostRegion.Transform(new Sphere(transform.TransformPoint(sphere.center), sphere.radius * scale.MaxAbsComponent()))); }
public abstract bool ContainedBy(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
public virtual void DrawGizmosSelected(Transform transform, GhostRegion ghostRegion, Color color) { }
public abstract bool Intersects(World world, Transform transform, GhostRegion ghostRegion, float buffer = 0f);
public abstract bool IsCollidable(World world, Transform transform, GhostRegion ghostRegion);
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))); }