/** * Set the scale of Terrain Note: sy is multiplied by the height map (0:1) * * @param sx * @param sy * @param sz */ public void setScale(double sx, double sy, double sz) { scale.setAll(sx, sy, sz); }
/** * Defines an elliptical orbit around a point with no orbital inclination. * * @param focalPoint Point which the {@link ATransformable3D} orbits around. * @param periapsis Point which the object passes closest to the focal point. * @param eccentricity Eccentricity of the orbit. Zero value results in a circular orbit. * @param direction Direction of the orbit. */ public EllipticalOrbitAnimation3D(Vector3 focalPoint, Vector3 periapsis, double eccentricity, double angle, OrbitDirection direction) { this(focalPoint, periapsis, Vector3.getAxisVector(Axis.Y), eccentricity, angle, direction); }
/** * Computes the Euclidean length of this {@link Vector3}; * * @return double The Euclidean length. */ public double length() { return length(this); }
/** * Checks if the length of this {@link Vector3} is smaller than the specified margin. * * @param margin double The desired margin of error for the test. * * @return boolean True if this {@link Vector3}'s length is smaller than the margin specified. */ public boolean isZero(double margin) { return (length2() <= margin * margin); }
/** * Checks if this {@link Vector3} is of unit length with a default * margin of error of 1e-8. * * @return boolean True if this {@link Vector3} is of unit length. */ public boolean isUnit() { return isUnit(1e-8); }
public ShadowMapVertexShader() { super(); mFrustumCorners = new Vector3[8]; for(int i=0; i<8; i++) mFrustumCorners[i] = new Vector3(); }
/** * Sets the world space coordinates of the lens flare. * Make sure this is the same position as the light position for which to apply the lens flare effect. * @param position */ public void setPosition(Vector3 position) { mPosition.setAll(position); }
/** * Defines an elliptical orbit around a point with no orbital inclination. * * @param focalPoint Point which the {@link ATransformable3D} orbits around. * @param periapsis Point which the object passes closest to the focal point. * @param eccentricity Eccentricity of the orbit. Zero value results in a circular orbit. * @param direction Direction of the orbit. */ public EllipticalOrbitAnimation3D(Vector3 focalPoint, Vector3 periapsis, double eccentricity, OrbitDirection direction) { this(focalPoint, periapsis, Vector3.getAxisVector(Axis.Y), eccentricity, direction); }
/** * Defines an elliptical orbit around a point with no orbital inclination. * * @param focalPoint Point which the {@link ATransformable3D} orbits around. * @param periapsis Point which the object passes closest to the focal point. * @param eccentricity Eccentricity of the orbit. Zero value results in a circular orbit. * @param angle Degrees to rotate. */ public EllipticalOrbitAnimation3D(Vector3 focalPoint, Vector3 periapsis, double eccentricity, double angle) { this(focalPoint, periapsis, Vector3.getAxisVector(Axis.Y), eccentricity, angle); }
private Vector3 reflect(Vector3 point, Vector3 mirror) { double x = mirror.x + (mirror.x - point.x); double y = mirror.y + (mirror.y - point.y); return new Vector3(x, y, 0); }
public ScaleAnimation3D(Vector3 toScale) { super(); mToScale = toScale; mFromScale = new Vector3(); }