|
@@ -496,29 +496,29 @@ There are five major categories of functions that FastMath provides.
|
|
|
|
|
|
|
|
===== Trig Functions
|
|
===== Trig Functions
|
|
|
|
|
|
|
|
-* cos and acos - provide link:http://en.wikipedia.org/wiki/cosine[cosine] and link:http://en.wikipedia.org/wiki/arc cosine[arc cosine] values (make use of the look-up table if `USE_FAST_TRIG` is true)
|
|
|
|
|
-* sin and asin - provide link:http://en.wikipedia.org/wiki/sine[sine] and link:http://en.wikipedia.org/wiki/arc sine[arc sine] values (make use of the look-up table if `USE_FAST_TRIG` is true)
|
|
|
|
|
-* tan and atan - provide link:http://en.wikipedia.org/wiki/tangent[tangent] and link:http://en.wikipedia.org/wiki/arc tangent[arc tangent] values
|
|
|
|
|
|
|
+* cos and acos - provide link:http://en.wikipedia.org/wiki/cosine[cosine] and link:https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arc cosine] values (make use of the look-up table if `USE_FAST_TRIG` is true)
|
|
|
|
|
+* sin and asin - provide link:http://en.wikipedia.org/wiki/sine[sine] and link:https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arc sine] values (make use of the look-up table if `USE_FAST_TRIG` is true)
|
|
|
|
|
+* tan and atan - provide link:http://en.wikipedia.org/wiki/tangent[tangent] and link:https://en.wikipedia.org/wiki/Inverse_trigonometric_functions[arc tangent] values
|
|
|
|
|
|
|
|
|
|
|
|
|
===== Numerical Methods
|
|
===== Numerical Methods
|
|
|
|
|
|
|
|
* ceil - provides the ceiling (smallest value that is greater than or equal to a given value and an integer)of a value.
|
|
* ceil - provides the ceiling (smallest value that is greater than or equal to a given value and an integer)of a value.
|
|
|
* floor - provides the floor (largest value that is less than or equal to a given value and an integer) of a value.
|
|
* floor - provides the floor (largest value that is less than or equal to a given value and an integer) of a value.
|
|
|
-* exp - provides the link:http://en.wikipedia.org/wiki/euler number[euler number] (e) raised to the provided value.
|
|
|
|
|
|
|
+* exp - provides the link:http://en.wikipedia.org/wiki/Euler_number[euler number] (e) raised to the provided value.
|
|
|
* sqr - provides the square of a value (i.e. value * value).
|
|
* sqr - provides the square of a value (i.e. value * value).
|
|
|
* pow - provides the first given number raised to the second.
|
|
* pow - provides the first given number raised to the second.
|
|
|
* isPowerOfTwo - provides a boolean if a value is a power of two or not (e.g. 32, 64, 4).
|
|
* isPowerOfTwo - provides a boolean if a value is a power of two or not (e.g. 32, 64, 4).
|
|
|
-* abs - provides the link:http://en.wikipedia.org/wiki/absolute value[absolute value] of a given number.
|
|
|
|
|
|
|
+* abs - provides the link:http://en.wikipedia.org/wiki/Absolute_value[absolute value] of a given number.
|
|
|
* sign - provides the sign of a value (1 if positive, -1 if negative, 0 if 0).
|
|
* sign - provides the sign of a value (1 if positive, -1 if negative, 0 if 0).
|
|
|
-* log - provides the link:http://en.wikipedia.org/wiki/natural logarithm[natural logarithm] of a value.
|
|
|
|
|
-* sqrt - provides the link:http://en.wikipedia.org/wiki/square root[square root] of a value.
|
|
|
|
|
-* invSqrt - provides the inverse link:http://en.wikipedia.org/wiki/square root[square root] of a value (1 / sqrt(value).
|
|
|
|
|
|
|
+* log - provides the link:http://en.wikipedia.org/wiki/Natural_logarithm[natural logarithm] of a value.
|
|
|
|
|
+* sqrt - provides the link:http://en.wikipedia.org/wiki/Square_root[square root] of a value.
|
|
|
|
|
+* invSqrt - provides the inverse link:http://en.wikipedia.org/wiki/Square_root[square root] of a value (1 / sqrt(value).
|
|
|
|
|
|
|
|
|
|
|
|
|
===== Linear Algebra
|
|
===== Linear Algebra
|
|
|
|
|
|
|
|
-* LERP - calculate the link:http://en.wikipedia.org/wiki/Linear interpolation[linear interpolation] of two points given a time between 0 and 1.
|
|
|
|
|
|
|
+* LERP - calculate the link:http://en.wikipedia.org/wiki/Linear_interpolation[linear interpolation] of two points given a time between 0 and 1.
|
|
|
* determinant - calculates the link:http://en.wikipedia.org/wiki/determinant[determinant] of a 4x4 matrix.
|
|
* determinant - calculates the link:http://en.wikipedia.org/wiki/determinant[determinant] of a 4x4 matrix.
|
|
|
|
|
|
|
|
|
|
|
|
@@ -526,8 +526,8 @@ There are five major categories of functions that FastMath provides.
|
|
|
|
|
|
|
|
* counterClockwise - given three points (defining a triangle), the winding is determined. 1 if counter-clockwise, -1 if clockwise and 0 if the points define a line.
|
|
* counterClockwise - given three points (defining a triangle), the winding is determined. 1 if counter-clockwise, -1 if clockwise and 0 if the points define a line.
|
|
|
* pointInsideTriangle - calculates if a point is inside a triangle.
|
|
* pointInsideTriangle - calculates if a point is inside a triangle.
|
|
|
-* sphericalToCartesian - converts a point from link:http://en.wikipedia.org/wiki/spherical coordinates[spherical coordinates] to link:http://en.wikipedia.org/wiki/cartesian coordinates[cartesian coordinates].
|
|
|
|
|
-* cartesianToSpherical - converts a point from link:http://en.wikipedia.org/wiki/cartesian coordinates[cartesian coordinates] to link:http://en.wikipedia.org/wiki/spherical coordinates[spherical coordinates].
|
|
|
|
|
|
|
+* sphericalToCartesian - converts a point from link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates] to link:https://en.wikipedia.org/wiki/Cartesian[cartesian coordinates].
|
|
|
|
|
+* cartesianToSpherical - converts a point from link:https://en.wikipedia.org/wiki/Cartesian[cartesian coordinates] to link:https://en.wikipedia.org/wiki/Spherical_coordinate_system[spherical coordinates].
|
|
|
|
|
|
|
|
|
|
|
|
|
===== Misc.
|
|
===== Misc.
|
|
@@ -589,7 +589,7 @@ This gives us the general equation: (ax + by + cz + d = 0)
|
|
|
|
|
|
|
|
jME defines the Plane as ax + by + cz = -d. Therefore, during creation of the plane, the normal of the plane (a,b,c) and the constant d is supplied.
|
|
jME defines the Plane as ax + by + cz = -d. Therefore, during creation of the plane, the normal of the plane (a,b,c) and the constant d is supplied.
|
|
|
|
|
|
|
|
-The most common usage of Plane is <<jme3/introduction_to_the_camera#,Camera>> frustum planes. Therefore, the primary purpose of Plane is to determine if a point is on the positive side, negative side, or intersecting a plane.
|
|
|
|
|
|
|
+The most common usage of Plane is <<jme3/advanced/camera#,Camera>> frustum planes. Therefore, the primary purpose of Plane is to determine if a point is on the positive side, negative side, or intersecting a plane.
|
|
|
|
|
|
|
|
Plane defines the constants:
|
|
Plane defines the constants:
|
|
|
|
|
|
|
@@ -700,7 +700,7 @@ See link:http://javadoc.jmonkeyengine.org/com/jme3/math/Ray.html[Ray Javadoc]
|
|
|
|
|
|
|
|
Ray defines a line that starts at a point *A* and continues in a direction through *B* into infinity.
|
|
Ray defines a line that starts at a point *A* and continues in a direction through *B* into infinity.
|
|
|
|
|
|
|
|
-This Ray is used extensively in jME for <<jme3/picking#,Picking>>. A Ray is cast from a point in screen space into the scene. Intersections are found and returned. To create a ray supply the object with two points, where the first point is the origin.
|
|
|
|
|
|
|
+This Ray is used extensively in jME for <<jme3/beginner/hello_picking,Picking>>. A Ray is cast from a point in screen space into the scene. Intersections are found and returned. To create a ray supply the object with two points, where the first point is the origin.
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Example 1 - Create a Ray That Represents Where the Camera is Looking
|
|
=== Example 1 - Create a Ray That Represents Where the Camera is Looking
|
|
@@ -725,7 +725,7 @@ Rectangle defines a finite plane within three dimensional space that is specifie
|
|
|
|
|
|
|
|
=== jME Usage
|
|
=== jME Usage
|
|
|
|
|
|
|
|
-Rectangle is a straight forward data class that simply maintains values that defines a Rectangle in 3D space. One interesting use is the `random` method that will create a random point on the Rectangle. The <<jme3/particle_system#,Particle System>> makes use of this to define an area that generates <<jme3/particles#,Particles>>.
|
|
|
|
|
|
|
+Rectangle is a straight forward data class that simply maintains values that defines a Rectangle in 3D space. One interesting use is the `random` method that will create a random point on the Rectangle. The <<jme3/advanced/effects_overview#,Particle System>> makes use of this to define an area that generates <<jme3/advanced/particle_emitters#,Particles>>.
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Example 1 : Define a Rectangle and Get a Point From It
|
|
=== Example 1 : Define a Rectangle and Get a Point From It
|
|
@@ -754,7 +754,7 @@ A triangle is a 3-sided polygon. Every triangle has three sides and three angles
|
|
|
|
|
|
|
|
=== Usage
|
|
=== Usage
|
|
|
|
|
|
|
|
-jME's Triangle class is a simple data class. It contains three <<jme3/vector#,Vector3f>> objects that represent the three points of the triangle. These can be retrieved via the `get` method. The `get` method, obtains the point based on the index provided. Similarly, the values can be set via the `set` method.
|
|
|
|
|
|
|
+jME's Triangle class is a simple data class. It contains three <<jme3/terminology.html#vectors#,Vector3f>> objects that represent the three points of the triangle. These can be retrieved via the `get` method. The `get` method, obtains the point based on the index provided. Similarly, the values can be set via the `set` method.
|
|
|
|
|
|
|
|
|
|
|
|
|
=== Example 1 - Creating a Triangle
|
|
=== Example 1 - Creating a Triangle
|