Click or drag to resize

float4 Structure

Represents a 4D vector using four single-precision floating-point numbers.

Namespace:  Fusee.Math.Core
Assembly:  Fusee.Math.Core (in Fusee.Math.Core.dll) Version: 0.7.0.0 (0.1.0.0)
Syntax
C#
public struct float4 : IEquatable<float4>

The float4 type exposes the following members.

Constructors
  NameDescription
Public methodfloat4(double4)
Constructs a new float4 by converting from a double4.
Public methodfloat4(float2)
Constructs a new float4 from the given float2.
Public methodfloat4(float3)
Constructs a new float4 from the given float3.
Public methodfloat4(float4)
Constructs a new float4 from the given float4.
Public methodfloat4(float3, Single)
Constructs a new float4 from the specified float3 and ww component.
Public methodfloat4(Single, Single, Single, Single)
Constructs a new float4.
Top
Properties
  NameDescription
Public propertya
The alpha component (same as w)
Public propertyb
The blue component (same as z)
Public propertyg
The green component (same as y)
Public propertyItem
Public propertyLength
Gets the length (magnitude) of the vector.
Public propertyLength1
Gets the length in 1-norm.
Public propertyLengthFast
Gets an approximation of the vector length (magnitude).
Public propertyLengthSquared
Gets the square of the vector length (magnitude).
Public propertyStatic memberParse
Gets or sets the Converter object. Has the ability to convert a string to a float4.
Public propertyr
The red component (same as x)
Public propertyrg
The rg component (same as xy)
Public propertyrgb
The rgb component (same as xyz)
Public propertyxy
Gets or sets an OpenTK.float2 with the x and y components of this instance.
Public propertyxyz
Gets or sets an OpenTK.float3 with the x, y and z components of this instance.
Top
Methods
  NameDescription
Public methodAdd(float4) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodAdd(float4) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodStatic memberAdd(float4, float4)
Adds two vectors.
Public methodStatic memberAdd(float4, float4, float4)
Adds two vectors.
Public methodStatic memberBaryCentric
Interpolate 3 Vectors using Barycentric coordinates
Public methodStatic memberClamp(float4, float4, float4)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberClamp(float4, float4, float4, float4)
Clamp a vector to the given minimum and maximum vectors
Public methodDiv(Single) Obsolete.
Divide this instance by a scalar.
Public methodStatic memberDiv(float4, Single)
Divide a vector by a scalar
Public methodStatic memberDiv(float4, Single, float4)
Divide a vector by a scalar
Public methodStatic memberDivide(float4, float4)
Divides a vector by the components of a vector (scale).
Public methodStatic memberDivide(float4, Single)
Divides a vector by a scalar.
Public methodStatic memberDivide(float4, float4, float4)
Divide a vector by the components of a vector (scale).
Public methodStatic memberDivide(float4, Single, float4)
Divides a vector by a scalar.
Public methodStatic memberDot(float4, float4)
Calculate the dot product of two vectors
Public methodStatic memberDot(float4, float4, Single)
Calculate the dot product of two vectors
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(float4)
Indicates whether the current vector is equal to another vector.
Public methodGetHashCode
Returns the hashcode for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberLerp(float4, float4, Single)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberLerp(float4, float4, Single, float4)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberMax(float4, float4)
Calculate the component-wise maximum of two vectors
Public methodStatic memberMax(float4, float4, float4)
Calculate the component-wise maximum of two vectors
Public methodStatic memberMin(float4, float4)
Calculate the component-wise minimum of two vectors
Public methodStatic memberMin(float4, float4, float4)
Calculate the component-wise minimum of two vectors
Public methodMult(Single) Obsolete.
Multiply this instance by a scalar.
Public methodStatic memberMult(float4, Single)
Multiply a vector and a scalar
Public methodStatic memberMult(float4, Single, float4)
Multiply a vector and a scalar
Public methodStatic memberMultiply(float4, float4)
Multiplies a vector by the components a vector (scale).
Public methodStatic memberMultiply(float4, Single)
Multiplies a vector by a scalar.
Public methodStatic memberMultiply(float4, float4, float4)
Multiplies a vector by the components of a vector (scale).
Public methodStatic memberMultiply(float4, Single, float4)
Multiplies a vector by a scalar.
Public methodNormalize
Scales the float4 to unit length.
Public methodStatic memberNormalize(float4)
Scale a vector to unit length
Public methodStatic memberNormalize(float4, float4)
Scale a vector to unit length
Public methodNormalize1
Scales the float4 to unit length in 1-norm.
Public methodNormalizeFast
Scales the float4 to approximately unit length.
Public methodStatic memberNormalizeFast(float4)
Scale a vector to approximately unit length
Public methodStatic memberNormalizeFast(float4, float4)
Scale a vector to approximately unit length
Public methodRound
Rounds the float4 to 6 digits (max float precision).
Public methodStatic memberRound(float4)
Rounds a vector to 6 digits (max float precision).
Public methodScale(float4) Obsolete.
Scales this instance by the given parameter.
Public methodScale(float4) Obsolete.
Scales this instance by the given parameter.
Public methodScale(Single, Single, Single, Single) Obsolete.
Scales the current float4 by the given amounts.
Public methodSub(float4) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodSub(float4) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodStatic memberSub(float4, float4)
Subtract one Vector from another
Public methodStatic memberSub(float4, float4, float4)
Subtract one Vector from another
Public methodStatic memberSubtract(float4, float4)
Subtract one Vector from another
Public methodStatic memberSubtract(float4, float4, float4)
Subtract one Vector from another
Public methodToArray
XML-Comment
Public methodToString
Returns a System.String that represents the current float4.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform
Transforms a vector by a quaternion rotation.
Public methodTransformPerspective
Transform this Vector by the given Matrix and apply a perspective division.
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Adds two instances.
Public operatorStatic memberDivision
Divides an instance by a scalar.
Public operatorStatic memberEquality
Compares two instances for equality.
Public operatorStatic member(double4 to float4)
Explicit cast operator to cast a double4 into a float4 value.
Public operatorStatic memberInequality
Compares two instances for inequality.
Public operatorStatic memberMultiply(Single, float4)
Multiplies an instance by a scalar.
Public operatorStatic memberMultiply(float4, float4)
Multiplies two instances (componentwise).
Public operatorStatic memberMultiply(float4, Single)
Multiplies an instance by a scalar.
Public operatorStatic memberSubtraction
Subtracts two instances.
Public operatorStatic memberUnaryNegation
Negates an instance.
Top
Fields
  NameDescription
Public fieldStatic memberOne
Defines an instance with all components set to 1.
Public fieldStatic memberUnitW
Defines a unit-length float4 that points towards the w-axis.
Public fieldStatic memberUnitX
Defines a unit-length float4 that points towards the x-axis.
Public fieldStatic memberUnitY
Defines a unit-length float4 that points towards the y-axis.
Public fieldStatic memberUnitZ
Defines a unit-length float4 that points towards the z-axis.
Public fieldw
The w component of the float4.
Public fieldx
The x component of the float4.
Public fieldy
The y component of the float4.
Public fieldz
The z component of the float4.
Public fieldStatic memberZero
Defines a zero-length float4.
Top
Remarks
The float4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats.
See Also