/** * Gets the direction vector of a certain theta and phi in radians. This uses the standard math spherical coordinate system. * * @param theta in radians * @param phi in radians * @return the direction vector */ public static Vector3f createDirectionRad(double theta, double phi) { return createDirectionRad((float) theta, (float) phi); }
/** * Gets the direction vector of a certain theta and phi in radians. This uses the standard math spherical coordinate system. * * @param theta in radians * @param phi in radians * @return the direction vector */ public static Vector3f createDirectionRad(double theta, double phi) { return createDirectionRad((float) theta, (float) phi); }
/** * Gets the direction vector of a random pitch and yaw using the random specified. * * @param random to use * @return the random direction vector */ public static Vector3f createRandomDirection(Random random) { return createDirectionRad(random.nextFloat() * (float) TrigMath.TWO_PI, random.nextFloat() * (float) TrigMath.TWO_PI); }
/** * Gets the direction vector of a random pitch and yaw using the random specified. * * @param random to use * @return the random direction vector */ public static Vector3f createRandomDirection(Random random) { return createDirectionRad(random.nextFloat() * (float) TrigMath.TWO_PI, random.nextFloat() * (float) TrigMath.TWO_PI); }
/** * Gets the direction vector of a certain theta and phi in degrees. This uses the standard math spherical coordinate system. * * @param theta in degrees * @param phi in degrees * @return the direction vector */ public static Vector3f createDirectionDeg(float theta, float phi) { return createDirectionRad((float) Math.toRadians(theta), (float) Math.toRadians(phi)); }
/** * Gets the direction vector of a certain theta and phi in degrees. This uses the standard math spherical coordinate system. * * @param theta in degrees * @param phi in degrees * @return the direction vector */ public static Vector3f createDirectionDeg(float theta, float phi) { return createDirectionRad((float) Math.toRadians(theta), (float) Math.toRadians(phi)); }