The VMath type exposes the following members.
Constructors
Methods
Name | Description | |
---|---|---|
Abs(Double) |
Abs function for values, just for completeness
| |
Abs(Vector2D) |
Abs function for 2d-vectors
| |
Abs(Vector3D) |
Abs function for 3d-vectors
| |
Abs(Vector4D) |
Abs function for 4d-vectors
| |
Bilerp(Vector2D, Double, Double, Double, Double) |
2d linear interpolation in x and y direction for single values
| |
Bilerp(Vector2D, Vector2D, Vector2D, Vector2D, Vector2D) |
2d linear interpolation in x and y direction for 2d-vectors
| |
Bilerp(Vector2D, Vector3D, Vector3D, Vector3D, Vector3D) |
2d linear interpolation in x and y direction for 3d-vectors
| |
Bilerp(Vector2D, Vector4D, Vector4D, Vector4D, Vector4D) |
2d linear interpolation in x and y direction for 4d-vectors
| |
BilerpMatrix |
Builds a matrix that interpolates 4d-vectors like a 2d bilinear interpolation in x and y direction
Should be used to transform 4d vectors with interpolation foacors in the 4d-form (x, y, x*y, 1)
| |
Binomial |
Binomial function
| |
Cartesian(Vector3D) |
Convert polar coordinates (pitch, yaw, lenght) in radian to cartesian coordinates (x, y, z).
To convert angles from cycles to radian, multiply them with VMath.CycToDec.
| |
Cartesian(Double, Double, Double) |
Convert polar coordinates (pitch, yaw, lenght) in radian to cartesian coordinates (x, y, z).
To convert angles from cycles to radian, multiply them with VMath.CycToDec.
| |
CartesianVVVV(Vector3D) |
Convert polar coordinates (pitch, yaw, lenght) in radian to cartesian coordinates (x, y, z) exacly like the vvvv node Cartesian.
To convert angles from cycles to radian, multiply them with VMath.CycToDec.
| |
CartesianVVVV(Double, Double, Double) |
Convert polar coordinates (pitch, yaw, lenght) in radian to cartesian coordinates (x, y, z) exacly like the vvvv node Cartesian.
To convert angles from cycles to radian, multiply them with VMath.CycToDec.
| |
Clamp(Double, Double, Double) |
Clamp function, clamps a floating point value into the range [min..max]
| |
Clamp(Int32, Int32, Int32) |
Clamp function, clamps an integer value into the range [min..max]
| |
Clamp(Vector2D, Double, Double) |
Clamp function, clamps a 2d-vector into the range [min..max]
| |
Clamp(Vector2D, Vector2D, Vector2D) |
Clamp function, clamps a 2d-vector into the range [min..max]
| |
Clamp(Vector3D, Double, Double) |
Clamp function, clamps a 3d-vector into the range [min..max]
| |
Clamp(Vector3D, Vector3D, Vector3D) |
Clamp function, clamps a 3d-vector into the range [min..max]
| |
Clamp(Vector4D, Double, Double) |
Clamp function, clamps a 4d-vector into the range [min..max]
| |
Clamp(Vector4D, Vector4D, Vector4D) |
Clamp function, clamps a 4d-vector into the range [min..max]
| |
Det |
Calculates the determinat of a 4x4 matrix
Note that the unary ~ operator of Matrix4x4 does the same
| |
Dist(Double, Double) |
Calculates the distance between two values
| |
Dist(Vector2D, Vector2D) |
Calculates the distance between two 2d-points
| |
Dist(Vector3D, Vector3D) |
Calculates the distance between two 3d-points
| |
Dist(Vector4D, Vector4D) |
Calculates the distance between two 4d-points
| |
Equals | (Inherited from Object.) | |
Factorial |
Factorial function, DON'T FEED ME WITH LARGE NUMBERS !!! (n>10 can be huge)
| |
Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Inverse |
Optimized 4x4 matrix inversion using cramer's rule, found in the game engine http://www.ogre3d.org
Note that the unary ! operator of Matrix4x4 does the same
Code takes about 1,8ns to execute on intel core2 duo 2Ghz, the intel reference
implementation (not assembly optimized) was about 2,2ns.
http://www.intel.com/design/pentiumiii/sml/24504301.pdf
| |
Lerp(Double, Double, Double) |
Linear interpolation (blending) between two values
| |
Lerp(Vector2D, Vector2D, Double) |
Linear interpolation (blending) between two 2d-vectors
| |
Lerp(Vector3D, Vector3D, Double) |
Linear interpolation (blending) between two 3d-vectors
| |
Lerp(Vector4D, Vector4D, Double) |
Linear interpolation (blending) between two 4d-vectors
| |
Map(Double, Double, Double, Double, Double, TMapMode) |
The infamous Map function of vvvv for values
| |
Map(Vector2D, Double, Double, Double, Double, TMapMode) |
The infamous Map function of vvvv for 2d-vectors and value range bounds
| |
Map(Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, TMapMode) |
The infamous Map function of vvvv for 2d-vectors and range bounds given as vectors
| |
Map(Vector3D, Double, Double, Double, Double, TMapMode) |
The infamous Map function of vvvv for 3d-vectors and value range bounds
| |
Map(Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, TMapMode) |
The infamous Map function of vvvv for 3d-vectors and range bounds given as vectors
| |
Map(Vector4D, Double, Double, Double, Double, TMapMode) |
The infamous Map function of vvvv for 4d-vectors and value range bounds
| |
Map(Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, TMapMode) |
The infamous Map function of vvvv for 4d-vectors and range bounds given as vectors
| |
Max |
Max function
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Min |
Min function
| |
PerspectiveLH |
Builds a left-handed perspective projection matrix based on a field of view.
| |
PerspectiveRH |
Builds a right-handed perspective projection matrix based on a field of view.
| |
Polar(Vector3D) |
Convert cartesian coordinates (x, y, z) to polar coordinates (pitch, yaw, lenght) in radian.
To convert the angles to cycles, multiply them with VMath.DegToCyc.
| |
Polar(Double, Double, Double) |
Convert cartesian coordinates (x, y, z) to polar coordinates (pitch, yaw, lenght) in radian.
To convert the angles to cycles, multiply them with VMath.DegToCyc.
| |
PolarVVVV(Vector3D) |
Convert cartesian coordinates (x, y, z) to polar VVVV style coordinates (pitch, yaw, lenght) in radian.
To convert the angles to cycles, multiply them with VMath.DegToCyc.
| |
PolarVVVV(Double, Double, Double) |
Convert cartesian coordinates (x, y, z) to VVVV style polar coordinates (pitch, yaw, lenght) in radian.
To convert the angles to cycles, multiply them with VMath.DegToCyc.
| |
Pow |
Raises x to the power of y.
| |
QuaternionToEulerYawPitchRoll(Vector4D) |
Converts a quaternion into euler angles, assuming that the euler angle multiplication to create the quaternion was yaw*pitch*roll.
All angles in radian.
| |
QuaternionToEulerYawPitchRoll(Vector4D, Double%, Double%, Double%) |
Converts a quaternion into euler angles, assuming that the euler angle multiplication to create the quaternion was yaw*pitch*roll.
All angles in radian.
| |
RandomVector2D |
Creates a random 2d vector.
| |
RandomVector3D |
Creates a random 3d vector.
| |
RandomVector4D |
Creates a random 4d vector.
| |
Rotate(Vector3D) |
Creates a rotation matrix from 3 angles given as 3d-vector
| |
Rotate(Double, Double, Double) |
Creates a rotation matrix from 3 angles
| |
RotateX |
Creates a rotation matrix from a given angle around the x-axis
| |
RotateY |
Creates a rotation matrix from a given angle around the y-axis
| |
RotateZ |
Creates a rotation matrix from a given angle around the z-axis
| |
Scale(Vector3D) |
Creates a scaling matrix from a given 3d-vector
| |
Scale(Double, Double, Double) |
Creates a scaling matrix from 3 given values
| |
Slerp(Vector3D, Vector3D, Double) |
Spherical interpolation between two points (3d-vectors)
The effect is a rotation with uniform angular velocity around a fixed rotation axis from one state of rotation to another
| |
Slerp(Vector4D, Vector4D, Double) |
Spherical interpolation between two quaternions (4d-vectors)
The effect is a rotation with uniform angular velocity around a fixed rotation axis from one state of rotation to another
| |
SolveCubic |
Cubic interpolation curve used in the vvvv timeline
| |
SolveQuadratic |
Solves a quadratic equation a*x^2 + b*x + c for x
| |
ToString | (Inherited from Object.) | |
Transform(Vector3D, Vector3D, Vector3D) |
Creates a transform matrix from translation, scaling and rotation parameters given as 3d-vectors
Like the vvvv node Transform (3d Vector)
| |
Transform(Double, Double, Double, Double, Double, Double, Double, Double, Double) |
Creates a transform matrix from translation, scaling and rotation parameters
Like the vvvv node Transform (3d)
| |
Translate(Vector3D) |
Creates a translation matrix from a given 3d-vector
| |
Translate(Double, Double, Double) |
Creates a translation matrix from 3 given values
| |
Transpose |
Transpose a 4x4 matrix
| |
Trilateration |
Intersaction of 3 Spheres
| |
Trilerp(Vector3D, Double, Double, Double, Double, Double, Double, Double, Double) |
3d linear interpolation in x, y and z direction for single values
| |
Trilerp(Vector3D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D) |
3d linear interpolation in x, y and z direction for 2d-vectors
| |
Trilerp(Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D) |
3d linear interpolation in x, y and z direction for 3d-vectors
| |
Trilerp(Vector3D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D) |
3d linear interpolation in x, y and z direction for 4d-vectors
| |
Zmod |
Modulo function with the property, that the remainder of a division z / d
and z < 0 is positive. For example: zmod(-2, 30) = 28.
|
Fields
Name | Description | |
---|---|---|
CycToDeg |
Conversion factor from radians to degree, 360
| |
CycToRad |
Conversion factor from cycles to radians, (2 * Pi)
| |
DegToCyc |
Conversion factor from degree to radians, 1/360
| |
DegToRad |
Conversion factor from degree to radians, (2 * Pi)/360
| |
IdentityMatrix |
Identity matrix
1000
0100
0010
0001
| |
Pi |
Pi, as you know it
| |
PiRez |
1 / Pi, multiply by this if you have to divide by Pi
| |
RadToCyc |
Conversion factor from radians to cycles, 1/(2 * Pi)
| |
RadToDeg |
Conversion factor from radians to degree, 360/(2 * Pi)
| |
Random |
A random object for conveninece
| |
TwoPi |
Pi * 2
| |
TwoPiRez |
2 / Pi, multiply by this if you have to divide by 2*Pi
|