public void setDirection(Vector3f direction) {
        assert direction.isUnitVector();
        this.direction.set(direction);
    }
<code>setDirection</code> sets the direction vector of the ray.

@param direction the direction of the ray.
jme3-core/src/main/java/com/jme3/math/Ray.java