Package net.glowstone.util
Class RayUtil
java.lang.Object
net.glowstone.util.RayUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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)
-