Back to class index
float3[Class Summary]
x
y
z
zero[static][const]
one[static][const]
unitX[static][const]
unitY[static][const]
unitZ[static][const]
nan[static][const]
inf[static][const]
ctor (+5 overloads)
ptr() (+1 overload)
operator[](index) (+1 overload)
At(index) (+1 overload)
operators +,-,*,/(v)[const]
operators +=,-=,*=,/=(v)
Add/Sub/Mul/Div(v)[const] (+1 overload)
xx/xy/xz/..()[const]
xyz/xzy/yzx/..()[const]
Swizzled(i,j)[const] (+2 overloads)
SetFromScalar(scalar)
Set(x,y,z)
ToPos4()[const]
ToDir4()[const]
Length()[const]
LengthSq()[const]
Normalize()
Normalized()[const]
ScaleToLength(newLength)
ScaledToLength(newLength)[const]
IsNormalized(epsilonSq)[const]
IsZero(epsilonSq)[const]
IsFinite()[const]
IsPerpendicular(other,epsilon)[const]
Equals(other,epsilon)[const] (+1 overload)
SumOfElements()[const]
ProductOfElements()[const]
AverageOfElements()[const]
MinElement()[const]
MinElementIndex()[const]
MaxElement()[const]
MaxElementIndex()[const]
Abs()[const]
Neg()[const]
Recip()[const]
Min(ceil)[const] (+1 overload)
Max(floor)[const] (+1 overload)
Clamp(floor,ceil)[const] (+1 overload)
Clamp01()[const]
Distance(point)[const] (+9 overloads)
DistanceSq(point)[const]
Dot(v)[const]
Cross(v)[const]
OuterProduct(rhs)[const]
Perpendicular(hint,hint2)[const]
AnotherPerpendicular(hint,hint2)[const]
Reflect(normal)[const]
Refract(...)[const]
ProjectTo(direction)[const]
ProjectToNorm(direction)[const]
AngleBetween(other)[const]
AngleBetweenNorm(normalizedVector)[const]
Decompose(...)[const]
Lerp(b,t)[const]
FromScalar(scalar)[static]
FromString(str)[static]
ScalarTripleProduct(u,v,w)[static]
Lerp(a,b,t)[static]
Orthogonalize(a,b)[static] (+1 overload)
AreOrthogonal(a,b,epsilon)[static] (+1 overload)
Orthonormalize(a,b)[static] (+1 overload)
AreOrthonormal(a,b,epsilon)[static] (+1 overload)
RandomDir(lcg,length)[static]
RandomSphere(lcg,center,radius)[static]
RandomBox(...)[static] (+1 overload)

float3::operators +,-,*,/

Syntax

float3 float3::operator+(const float3 &v) const; [4 lines of code]

Adds two vectors.

This function is identical to the member function Add().

Return Value

float3(x + v.x, y + v.y, z + v.z);

Syntax

float3 float3::operator-() const; [4 lines of code]

Performs an unary negation of this vector.

This function is identical to the member function Neg().

Return Value

float3(-x, -y, -z).

Syntax

float3 float3::operator-(const float3 &v) const; [4 lines of code]

Subtracts the given vector from this vector.

This function is identical to the member function Sub().

Return Value

float3(x - v.x, y - v.y, z - v.z);

Syntax

float3 float3::operator*(float scalar) const; [4 lines of code]

Multiplies this vector by a scalar.

This function is identical to the member function Mul().

Return Value

float3(x * scalar, y * scalar, z * scalar);

Syntax

float3 float3::operator/(float scalar) const; [5 lines of code]

Divides this vector by a scalar.

This function is identical to the member function Div().

Return Value

float3(x / scalar, y / scalar, z / scalar);

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index