The VMath type exposes the following members.

Constructors

  NameDescription
Public methodVMath
Initializes a new instance of the VMath class

Methods

  NameDescription
Public methodStatic memberAbs(Double)
Abs function for values, just for completeness
Public methodStatic memberAbs(Vector2D)
Abs function for 2d-vectors
Public methodStatic memberAbs(Vector3D)
Abs function for 3d-vectors
Public methodStatic memberAbs(Vector4D)
Abs function for 4d-vectors
Public methodStatic memberBilerp(Vector2D, Double, Double, Double, Double)
2d linear interpolation in x and y direction for single values
Public methodStatic memberBilerp(Vector2D, Vector2D, Vector2D, Vector2D, Vector2D)
2d linear interpolation in x and y direction for 2d-vectors
Public methodStatic memberBilerp(Vector2D, Vector3D, Vector3D, Vector3D, Vector3D)
2d linear interpolation in x and y direction for 3d-vectors
Public methodStatic memberBilerp(Vector2D, Vector4D, Vector4D, Vector4D, Vector4D)
2d linear interpolation in x and y direction for 4d-vectors
Public methodStatic memberBilerpMatrix
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)
Public methodStatic memberBinomial
Binomial function
Public methodStatic memberCartesian(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.
Public methodStatic memberCartesian(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.
Public methodStatic memberCartesianVVVV(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.
Public methodStatic memberCartesianVVVV(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.
Public methodStatic memberClamp(Double, Double, Double)
Clamp function, clamps a floating point value into the range [min..max]
Public methodStatic memberClamp(Int32, Int32, Int32)
Clamp function, clamps an integer value into the range [min..max]
Public methodStatic memberClamp(Vector2D, Double, Double)
Clamp function, clamps a 2d-vector into the range [min..max]
Public methodStatic memberClamp(Vector2D, Vector2D, Vector2D)
Clamp function, clamps a 2d-vector into the range [min..max]
Public methodStatic memberClamp(Vector3D, Double, Double)
Clamp function, clamps a 3d-vector into the range [min..max]
Public methodStatic memberClamp(Vector3D, Vector3D, Vector3D)
Clamp function, clamps a 3d-vector into the range [min..max]
Public methodStatic memberClamp(Vector4D, Double, Double)
Clamp function, clamps a 4d-vector into the range [min..max]
Public methodStatic memberClamp(Vector4D, Vector4D, Vector4D)
Clamp function, clamps a 4d-vector into the range [min..max]
Public methodStatic memberDet
Calculates the determinat of a 4x4 matrix Note that the unary ~ operator of Matrix4x4 does the same
Public methodStatic memberDist(Double, Double)
Calculates the distance between two values
Public methodStatic memberDist(Vector2D, Vector2D)
Calculates the distance between two 2d-points
Public methodStatic memberDist(Vector3D, Vector3D)
Calculates the distance between two 3d-points
Public methodStatic memberDist(Vector4D, Vector4D)
Calculates the distance between two 4d-points
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberFactorial
Factorial function, DON'T FEED ME WITH LARGE NUMBERS !!! (n>10 can be huge)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberInverse
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
Public methodStatic memberLerp(Double, Double, Double)
Linear interpolation (blending) between two values
Public methodStatic memberLerp(Vector2D, Vector2D, Double)
Linear interpolation (blending) between two 2d-vectors
Public methodStatic memberLerp(Vector3D, Vector3D, Double)
Linear interpolation (blending) between two 3d-vectors
Public methodStatic memberLerp(Vector4D, Vector4D, Double)
Linear interpolation (blending) between two 4d-vectors
Public methodStatic memberMap(Double, Double, Double, Double, Double, TMapMode)
The infamous Map function of vvvv for values
Public methodStatic memberMap(Vector2D, Double, Double, Double, Double, TMapMode)
The infamous Map function of vvvv for 2d-vectors and value range bounds
Public methodStatic memberMap(Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, TMapMode)
The infamous Map function of vvvv for 2d-vectors and range bounds given as vectors
Public methodStatic memberMap(Vector3D, Double, Double, Double, Double, TMapMode)
The infamous Map function of vvvv for 3d-vectors and value range bounds
Public methodStatic memberMap(Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, TMapMode)
The infamous Map function of vvvv for 3d-vectors and range bounds given as vectors
Public methodStatic memberMap(Vector4D, Double, Double, Double, Double, TMapMode)
The infamous Map function of vvvv for 4d-vectors and value range bounds
Public methodStatic memberMap(Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, TMapMode)
The infamous Map function of vvvv for 4d-vectors and range bounds given as vectors
Public methodStatic memberMax
Max function
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberMin
Min function
Public methodStatic memberPerspectiveLH
Builds a left-handed perspective projection matrix based on a field of view.
Public methodStatic memberPerspectiveRH
Builds a right-handed perspective projection matrix based on a field of view.
Public methodStatic memberPolar(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.
Public methodStatic memberPolar(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.
Public methodStatic memberPolarVVVV(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.
Public methodStatic memberPolarVVVV(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.
Public methodStatic memberPow
Raises x to the power of y.
Public methodStatic memberQuaternionToEulerYawPitchRoll(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.
Public methodStatic memberQuaternionToEulerYawPitchRoll(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.
Public methodStatic memberRandomVector2D
Creates a random 2d vector.
Public methodStatic memberRandomVector3D
Creates a random 3d vector.
Public methodStatic memberRandomVector4D
Creates a random 4d vector.
Public methodStatic memberRotate(Vector3D)
Creates a rotation matrix from 3 angles given as 3d-vector
Public methodStatic memberRotate(Double, Double, Double)
Creates a rotation matrix from 3 angles
Public methodStatic memberRotateX
Creates a rotation matrix from a given angle around the x-axis
Public methodStatic memberRotateY
Creates a rotation matrix from a given angle around the y-axis
Public methodStatic memberRotateZ
Creates a rotation matrix from a given angle around the z-axis
Public methodStatic memberScale(Vector3D)
Creates a scaling matrix from a given 3d-vector
Public methodStatic memberScale(Double, Double, Double)
Creates a scaling matrix from 3 given values
Public methodStatic memberSlerp(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
Public methodStatic memberSlerp(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
Public methodStatic memberSolveCubic
Cubic interpolation curve used in the vvvv timeline
Public methodSolveQuadratic
Solves a quadratic equation a*x^2 + b*x + c for x
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Public methodStatic memberTransform(Vector3D, Vector3D, Vector3D)
Creates a transform matrix from translation, scaling and rotation parameters given as 3d-vectors Like the vvvv node Transform (3d Vector)
Public methodStatic memberTransform(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)
Public methodStatic memberTranslate(Vector3D)
Creates a translation matrix from a given 3d-vector
Public methodStatic memberTranslate(Double, Double, Double)
Creates a translation matrix from 3 given values
Public methodStatic memberTranspose
Transpose a 4x4 matrix
Public methodStatic memberTrilateration
Intersaction of 3 Spheres
Public methodStatic memberTrilerp(Vector3D, Double, Double, Double, Double, Double, Double, Double, Double)
3d linear interpolation in x, y and z direction for single values
Public methodStatic memberTrilerp(Vector3D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D, Vector2D)
3d linear interpolation in x, y and z direction for 2d-vectors
Public methodStatic memberTrilerp(Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D, Vector3D)
3d linear interpolation in x, y and z direction for 3d-vectors
Public methodStatic memberTrilerp(Vector3D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D, Vector4D)
3d linear interpolation in x, y and z direction for 4d-vectors
Public methodStatic memberZmod
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

  NameDescription
Public fieldStatic memberCycToDeg
Conversion factor from radians to degree, 360
Public fieldStatic memberCycToRad
Conversion factor from cycles to radians, (2 * Pi)
Public fieldStatic memberDegToCyc
Conversion factor from degree to radians, 1/360
Public fieldStatic memberDegToRad
Conversion factor from degree to radians, (2 * Pi)/360
Public fieldStatic memberIdentityMatrix
Identity matrix 1000 0100 0010 0001
Public fieldStatic memberPi
Pi, as you know it
Public fieldStatic memberPiRez
1 / Pi, multiply by this if you have to divide by Pi
Public fieldStatic memberRadToCyc
Conversion factor from radians to cycles, 1/(2 * Pi)
Public fieldStatic memberRadToDeg
Conversion factor from radians to degree, 360/(2 * Pi)
Public fieldStatic memberRandom
A random object for conveninece
Public fieldStatic memberTwoPi
Pi * 2
Public fieldStatic memberTwoPiRez
2 / Pi, multiply by this if you have to divide by 2*Pi

See Also