Class RayUtil

java.lang.Object
net.glowstone.util.RayUtil

public class RayUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static float
    getExposure(org.bukkit.Location target, org.bukkit.Location... sources)
     
    static org.bukkit.util.Vector
    getRayBetween(org.bukkit.Location target, org.bukkit.Location source)
     
    static org.bukkit.util.Vector
    getVelocityRay(org.bukkit.util.Vector ray)
    Maps {0, 0, 0} to {0, 1, 0} and all other vectors to their normalized form.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RayUtil

      public RayUtil()
  • Method Details

    • getVelocityRay

      public static org.bukkit.util.Vector getVelocityRay(org.bukkit.util.Vector ray)
      Maps {0, 0, 0} to {0, 1, 0} and all other vectors to their normalized form.
      Parameters:
      ray - the ray to transform
      Returns:
      a ray of length 1
    • getExposure

      public static float getExposure(org.bukkit.Location target, org.bukkit.Location... sources)
    • getRayBetween

      public static org.bukkit.util.Vector getRayBetween(org.bukkit.Location target, org.bukkit.Location source)