Represents a 3D Vector More...
Classes | |
class | EqualityComparer |
Represents an equality comparer for FPVector3 objects. More... | |
Public Member Functions | |
FPVector3 (FP x, FP y) | |
Constructor initializing a new instance of the structure More... | |
FPVector3 (FP x, FP y, FP z) | |
Constructor initializing a new instance of the structure More... | |
FPVector3 (int x, int y) | |
Constructor initializing a new instance of the structure More... | |
FPVector3 (int x, int y, int z) | |
Constructor initializing a new instance of the structure More... | |
Boolean | Equals (FPVector3 other) |
Determines whether the current instance is equal to the specified FPVector3. More... | |
override Boolean | Equals (Object obj) |
Tests if an object is equal to this vector. More... | |
override Int32 | GetHashCode () |
Gets the hashcode of the vector. More... | |
override String | ToString () |
Builds a string from the FPVector3. More... | |
Static Public Member Functions | |
static FPVector3 | Abs (FPVector3 value) |
Returns a vector where each component is the absolute value of same component in value . More... | |
static FP | Angle (FPVector3 a, FPVector3 b) |
Returns the angle in degrees between a and b . More... | |
static FPVector3 | ClampMagnitude (FPVector3 vector, FP maxLength) |
Clamps the magnitude of a vector More... | |
static FPVector3 | Cross (FPVector3 a, FPVector3 b) |
The cross product of two vectors. More... | |
static FP | Distance (FPVector3 a, FPVector3 b) |
Calculates the distance between two vectors More... | |
static FP | DistanceSquared (FPVector3 a, FPVector3 b) |
Calculates the squared distance between two vectors More... | |
static FP | Dot (FPVector3 a, FPVector3 b) |
Calculates the dot product of two vectors. More... | |
static FPVector3 | Lerp (FPVector3 start, FPVector3 end, FP t) |
Linearly interpolates between start and end by t . t is clamped to the range [0, 1] More... | |
static FPVector3 | LerpUnclamped (FPVector3 start, FPVector3 end, FP t) |
Linearly interpolates between start and end by t . More... | |
static FPVector3 | Max (FPVector3 value1, FPVector3 value2) |
Gets a vector with the maximum x,y and z values of both vectors. More... | |
static FPVector3 | Min (FPVector3 value1, FPVector3 value2) |
Gets a vector with the minimum x,y and z values of both vectors. More... | |
static FPVector3 | MoveTowards (FPVector3 from, FPVector3 to, FP maxDelta) |
Calculate a position between the points specified by from and to , moving no farther than the distance specified by maxDelta . More... | |
static FPVector3 | Normalize (FPVector3 value) |
Normalizes the given vector. If the vector is too short to normalize, Zero will be returned. More... | |
static FPVector3 | Normalize (FPVector3 value, out FP magnitude) |
Normalizes the given vector. If the vector is too short to normalize, Zero will be returned. More... | |
static Boolean | operator!= (FPVector3 a, FPVector3 b) |
Returns true if two vectors are not exactly equal. More... | |
static FPVector3 | operator* (FP s, FPVector3 v) |
Multiplies each component of v times s . More... | |
static FPVector3 | operator* (FPVector3 v, FP s) |
Multiplies each component of v times s . More... | |
static FPVector3 | operator+ (FPVector3 a, FPVector3 b) |
Adds two vectors. More... | |
static FPVector3 | operator- (FPVector3 a, FPVector3 b) |
Subtracts b from a More... | |
static FPVector3 | operator- (FPVector3 v) |
Negates each component of v vector. More... | |
static FPVector3 | operator/ (FPVector3 v, FP s) |
Divides each component of v by s . More... | |
static FPVector3 | operator/ (FPVector3 v, Int32 s) |
Divides each component of v by s . More... | |
static Boolean | operator== (FPVector3 a, FPVector3 b) |
Returns true if two vectors are exactly equal. More... | |
static FPVector3 | Project (FPVector3 vector, FPVector3 normal) |
Projects a vector onto another vector. More... | |
static FPVector3 | ProjectOnPlane (FPVector3 vector, FPVector3 planeNormal) |
Projects a vector onto a plane defined by a normal orthogonal to the plane. More... | |
static FPVector3 | Reflect (FPVector3 vector, FPVector3 normal) |
Reflects a vector off the plane defined by a normal. More... | |
static FPVector3 | Scale (FPVector3 a, FPVector3 b) |
Multiplies each component of the vector by the same components of the provided vector. More... | |
static FP | SignedAngle (FPVector3 a, FPVector3 b, FPVector3 axis) |
Returns the signed angle in degrees between a and b when rotated around an axis . More... | |
static FPVector3 | Slerp (FPVector3 from, FPVector3 to, FP t) |
Spherically interpolates between from and to by t , which is clamped to the range [0, 1]. More... | |
static FPVector3 | SlerpUnclamped (FPVector3 from, FPVector3 to, FP t) |
Spherically interpolates between from and to by t . More... | |
Public Attributes | |
FP | X |
The X component of the vector. More... | |
FP | Y |
The Y component of the vector. More... | |
FP | Z |
The Z component of the vector. More... | |
Static Public Attributes | |
const int | SIZE = FP.SIZE * 3 |
The size of the vector (3 FP values). More... | |
static FPVector3 | Zero => new FPVector3() |
A vector with components (0,0,0); More... | |
Properties | |
static FPVector3 | Back [get] |
A vector with components (0,0,-1); More... | |
static FPVector3 | Down [get] |
A vector with components (0,-1,0); More... | |
static FPVector3 | Forward [get] |
A vector with components (0,0,1); More... | |
static FPVector3 | Left [get] |
A vector with components (-1,0,0); More... | |
FP | Magnitude [get] |
Gets the length of the vector. More... | |
static FPVector3 | MaxValue [get] |
A vector with components (FP.MaxValue,FP.MaxValue,FP.MaxValue); More... | |
static FPVector3 | MinValue [get] |
A vector with components (FP.MinValue,FP.MinValue,FP.MinValue); More... | |
FPVector3 | Normalized [get] |
Gets a normalized version of the vector. More... | |
static FPVector3 | One [get] |
A vector with components (1,1,1); More... | |
static FPVector3 | Right [get] |
A vector with components (1,0,0); More... | |
FP | SqrMagnitude [get] |
Gets the squared length of the vector. More... | |
static FPVector3 | Up [get] |
A vector with components (0,1,0); More... | |
static FPVector3 | UseableMax [get] |
A vector with components (FP.UseableMax,FP.UseableMax,FP.UseableMax); More... | |
static FPVector3 | UseableMin [get] |
A vector with components (FP.UseableMin,FP.UseableMin,FP.UseableMin); More... | |
Represents a 3D Vector
|
inline |
Constructor initializing a new instance of the structure
x | The X component of the vector. |
y | The Y component of the vector. |
z | The Z component of the vector. |
|
inline |
Constructor initializing a new instance of the structure
x | The X component of the vector. |
y | The Y component of the vector. |
Constructor initializing a new instance of the structure
x | The X component of the vector. |
y | The Y component of the vector. |
z | The Z component of the vector. |
Constructor initializing a new instance of the structure
x | The X component of the vector. |
y | The Y component of the vector. |
Normalizes the given vector. If the vector is too short to normalize, Zero will be returned.
value | The vector which should be normalized. |
|
inlinestatic |
Normalizes the given vector. If the vector is too short to normalize, Zero will be returned.
value | The vector which should be normalized. |
magnitude | The original vector's magnitude. |
|
inline |
Builds a string from the FPVector3.
|
inline |
Tests if an object is equal to this vector.
obj | The object to test. |
true
if they are euqal, otherwise false
.
|
inline |
Determines whether the current instance is equal to the specified FPVector3.
other | The FPVector3 to compare with the current instance. |
true
if the current instance is equal to the specified FPVector3; otherwise, false
.
|
inline |
Gets the hashcode of the vector.
Returns a vector where each component is the absolute value of same component in value .
value |
|
inlinestatic |
Linearly interpolates between start and end by t . t is clamped to the range [0, 1]
start | |
end | |
t |
|
inlinestatic |
Linearly interpolates between start and end by t .
start | |
end | |
t |
|
inlinestatic |
Spherically interpolates between from and to by t , which is clamped to the range [0, 1].
Input vectors are normalized and treated as directions. The resultant vector has direction spherically interpolated using the angle and magnitude linearly interpolated between the magnitudes of to and from .
from | |
to | |
t |
|
inlinestatic |
Spherically interpolates between from and to by t .
Input vectors are normalized and treated as directions. The resultant vector has direction spherically interpolated using the angle and magnitude linearly interpolated between the magnitudes of to and from .
from | |
to | |
t |
Multiplies each component of the vector by the same components of the provided vector.
a | |
b |
|
inlinestatic |
Clamps the magnitude of a vector
vector | Vector to clamp |
maxLength | Max length of the supplied vector |
|
inlinestatic |
Gets a vector with the minimum x,y and z values of both vectors.
value1 | The first value. |
value2 | The second value. |
|
inlinestatic |
Gets a vector with the maximum x,y and z values of both vectors.
value1 | The first value. |
value2 | The second value. |
Calculates the distance between two vectors
a | First vector |
b | Second vector |
Calculates the squared distance between two vectors
a | First vector |
b | Second vector |
The cross product of two vectors.
a | The first vector. |
b | The second vector. |
Calculates the dot product of two vectors.
a | The first vector. |
b | The second vector. |
|
inlinestatic |
Returns the signed angle in degrees between a and b when rotated around an axis .
a | |
b | |
axis |
Returns the angle in degrees between a and b .
a | |
b |
|
inlinestatic |
Calculate a position between the points specified by from and to , moving no farther than the distance specified by maxDelta .
from | |
to | |
maxDelta |
|
inlinestatic |
Projects a vector onto another vector.
vector | |
normal |
|
inlinestatic |
Projects a vector onto a plane defined by a normal orthogonal to the plane.
vector | |
planeNormal |
|
inlinestatic |
Reflects a vector off the plane defined by a normal.
vector | |
normal |
Returns true
if two vectors are exactly equal.
a | |
b |
Returns true
if two vectors are not exactly equal.
a | |
b |
Negates each component of v vector.
v |
Multiplies each component of v times s .
v | |
s |
Multiplies each component of v times s .
v | |
s |
Divides each component of v by s .
v | |
s |
Divides each component of v by s .
v | |
s |
Subtracts b from a
a | |
b |
Adds two vectors.
a | |
b |
|
static |
The size of the vector (3 FP values).
FP Photon.Deterministic.FPVector3.X |
The X component of the vector.
FP Photon.Deterministic.FPVector3.Y |
The Y component of the vector.
FP Photon.Deterministic.FPVector3.Z |
The Z component of the vector.
A vector with components (0,0,0);
|
staticget |
A vector with components (-1,0,0);
|
staticget |
A vector with components (1,0,0);
|
staticget |
A vector with components (0,1,0);
|
staticget |
A vector with components (0,-1,0);
|
staticget |
A vector with components (0,0,-1);
|
staticget |
A vector with components (0,0,1);
|
staticget |
A vector with components (1,1,1);
|
staticget |
A vector with components (FP.MinValue,FP.MinValue,FP.MinValue);
|
staticget |
A vector with components (FP.MaxValue,FP.MaxValue,FP.MaxValue);
|
staticget |
A vector with components (FP.UseableMin,FP.UseableMin,FP.UseableMin);
|
staticget |
A vector with components (FP.UseableMax,FP.UseableMax,FP.UseableMax);
|
get |
Gets the squared length of the vector.
|
get |
Gets the length of the vector.
|
get |
Gets a normalized version of the vector.