Click or drag to resize

float3 Structure

Represents a 3D vector using three 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 float3 : IEquatable<float3>

The float3 type exposes the following members.

Constructors
  NameDescription
Public methodfloat3(double3)
Constructs a new float3 by converting from a double3.
Public methodfloat3(float2)
Constructs a new float3 from the given float2.
Public methodfloat3(float3)
Constructs a new float3 from the given float3.
Public methodfloat3(float4)
Constructs a new float3 from the given float4.
Public methodfloat3(Single, Single, Single)
Constructs a new float3.
Top
Properties
  NameDescription
Public propertyb
The blue component (same as z)
Public propertyg
The green component (same as y)
Public propertyLength
Gets the length (magnitude) of the vector.
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 float3.
Public propertyr
The red component (same as x)
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(float3) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodAdd(float3) Obsolete.
Add the Vector passed as parameter to this instance.
Public methodStatic memberAdd(float3, float3)
Adds two vectors.
Public methodStatic memberAdd(float3, float3, float3)
Adds two vectors.
Public methodStatic memberBarycentric
Interpolate 3 Vectors using Barycentric coordinates
Public methodStatic memberCalculateAngle(float3, float3)
Calculates the angle (in radians) between two vectors.
Public methodStatic memberCalculateAngle(float3, float3, Single)
Calculates the angle (in radians) between two vectors.
Public methodStatic memberClamp(float3, float3, float3)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberClamp(float3, float3, float3, float3)
Clamp a vector to the given minimum and maximum vectors
Public methodStatic memberComponentMax(float3, float3)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMax(float3, float3, float3)
Calculate the component-wise maximum of two vectors
Public methodStatic memberComponentMin(float3, float3)
Calculate the component-wise minimum of two vectors
Public methodStatic memberComponentMin(float3, float3, float3)
Calculate the component-wise minimum of two vectors
Public methodStatic memberCross(float3, float3)
Caclulate the cross (vector) product of two vectors
Public methodStatic memberCross(float3, float3, float3)
Caclulate the cross (vector) product of two vectors
Public methodDiv(Single) Obsolete.
Divide this instance by a scalar.
Public methodStatic memberDiv(float3, Single) Obsolete.
Divide a vector by a scalar
Public methodStatic memberDiv(float3, Single, float3) Obsolete.
Divide a vector by a scalar
Public methodStatic memberDivide(float3, float3)
Divides a vector by the components of a vector (scale).
Public methodStatic memberDivide(float3, Single)
Divides a vector by a scalar.
Public methodStatic memberDivide(float3, float3, float3)
Divide a vector by the components of a vector (scale).
Public methodStatic memberDivide(float3, Single, float3)
Divides a vector by a scalar.
Public methodStatic memberDot(float3, float3)
Calculate the dot (scalar) product of two vectors
Public methodStatic memberDot(float3, float3, Single)
Calculate the dot (scalar) product of two vectors
Public methodEquals(Object)
Indicates whether this instance and a specified object are equal.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(float3)
Indicates whether the current vector is equal to another vector.
Public methodStatic memberGetBarycentric
Calculates the barycentric coordinates for the given point in the given triangle, such that u*a + v*b + (1-u-v)*c = point.
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(float3, float3, Single)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberLerp(float3, float3, Single, float3)
Returns a new Vector that is the linear blend of the 2 given Vectors
Public methodStatic memberMax
Returns the float3 with the minimum magnitude
Public methodStatic memberMin
Returns the float3 with the minimum magnitude
Public methodMult(Single) Obsolete.
Multiply this instance by a scalar.
Public methodStatic memberMult(float3, Single) Obsolete.
Multiply a vector and a scalar
Public methodStatic memberMult(float3, Single, float3) Obsolete.
Multiply a vector and a scalar
Public methodStatic memberMultiply(float3, float3)
Multiplies a vector by the components a vector (scale).
Public methodStatic memberMultiply(float3, Single)
Multiplies a vector by a scalar.
Public methodStatic memberMultiply(float3, float3, float3)
Multiplies a vector by the components of a vector (scale).
Public methodStatic memberMultiply(float3, Single, float3)
Multiplies a vector by a scalar.
Public methodNormalize
Scales the float3 to unit length.
Public methodStatic memberNormalize(float3)
Scale a vector to unit length
Public methodStatic memberNormalize(float3, float3)
Scale a vector to unit length
Public methodNormalizeFast
Scales the float3 to approximately unit length.
Public methodStatic memberNormalizeFast(float3)
Scale a vector to approximately unit length
Public methodStatic memberNormalizeFast(float3, float3)
Scale a vector to approximately unit length
Public methodStatic memberOrthoNormalize
Orthoes the normalize.
Public methodScale(float3) Obsolete.
Scales this instance by the given parameter.
Public methodScale(float3) Obsolete.
Scales this instance by the given parameter.
Public methodScale(Single, Single, Single) Obsolete.
Scales the current float3 by the given amounts.
Public methodSub(float3) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodSub(float3) Obsolete.
Subtract the Vector passed as parameter from this instance.
Public methodStatic memberSub(float3, float3) Obsolete.
Subtract one Vector from another
Public methodStatic memberSub(float3, float3, float3) Obsolete.
Subtract one Vector from another
Public methodStatic memberSubtract(float3, float3)
Subtract one Vector from another
Public methodStatic memberSubtract(float3, float3, float3)
Subtract one Vector from another
Public methodToArray
Returns an array of floats with the three components of the vector.
Public methodToString
Returns a System.String that represents the current float3.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform(float3, float4x4)
Transform a Vector by the given Matrix
Public methodStatic memberTransform(float3, Quaternion)
Transforms a vector by a quaternion rotation.
Public methodStatic memberTransform(float3, Quaternion, float3)
Transforms a vector by a quaternion rotation.
Public methodStatic memberTransformNormal(float3, float4x4)
Transform a Normal by the given Matrix
Public methodStatic memberTransformNormal(float3, float4x4, float3)
Transform a Normal by the given Matrix
Public methodStatic memberTransformNormalInverse(float3, float4x4)
Transform a Normal by the (transpose of the) given Matrix
Public methodStatic memberTransformNormalInverse(float3, float4x4, float3)
Transform a Normal by the (transpose of the) given Matrix
Public methodTransformPerspective
Transform this instance by the given Matrix, and project the resulting float4 back to a float3
Public methodStatic memberTransformPosition(float3, float4x4)
Transform a Position by the given Matrix
Public methodStatic memberTransformPosition(float3, float4x4, float3)
Transform a Position by the given Matrix
Public methodStatic memberTransformVector(float3, float4x4)
Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.
Public methodStatic memberTransformVector(float3, float4x4, float3)
Transform a direction vector by the given Matrix Assumes the matrix has a bottom row of (0,0,0,1), that is the translation part is ignored.
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(double3 to float3)
Explicit cast operator to cast a double3 into a float3 value.
Public operatorStatic memberInequality
Compares two instances for inequality.
Public operatorStatic memberMultiply(Single, float3)
Multiplies an instance by a scalar.
Public operatorStatic memberMultiply(float3, float3)
Multiplies two instances (componentwise).
Public operatorStatic memberMultiply(float3, 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 memberUnitX
Defines a unit-length float3 that points towards the x-axis.
Public fieldStatic memberUnitY
Defines a unit-length float3 that points towards the y-axis.
Public fieldStatic memberUnitZ
Defines a unit-length float3 that points towards the z-axis.
Public fieldx
The x component of the float3.
Public fieldy
The y component of the float3.
Public fieldz
The z component of the float3.
Public fieldStatic memberZero
Defines a zero-length float3.
Top
Remarks
The float3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats.
See Also