Represents a three-dimensional vector with integer components. More...
Inherits IEquatable< IntVector3 >.
Classes | |
class | EqualityComparer |
Represents an equality comparer for IntVector3 objects. More... | |
Public Member Functions | |
IntVector3 (int x, int y, int z) | |
Constructs a new IntVector3 with the given components. More... | |
bool | Equals (IntVector3 other) |
Returns true if the vector is exactly equal to another vector. More... | |
override bool | Equals (object obj) |
override int | GetHashCode () |
Returns a hash code for the vector. More... | |
override string | ToString () |
Returns a string representation of the IntVector3. More... | |
Static Public Member Functions | |
static IntVector3 | CeilToInt (FPVector3 v) |
Returns a new IntVector3 with the ceiling of the components of the input vector. More... | |
static IntVector3 | Clamp (IntVector3 value, IntVector3 min, IntVector3 max) |
Clamps a IntVector3 value between a minimum and maximum IntVector3 value. More... | |
static FP | Distance (IntVector3 a, IntVector3 b) |
Calculates the distance between two IntVector3 points. More... | |
static IntVector3 | FloorToInt (FPVector3 v) |
Returns the largest integer less than or equal to the specified floating-point number. More... | |
static IntVector3 | Max (IntVector3 a, IntVector3 b) |
Returns a new IntVector3 with the largest components of the input vectors. More... | |
static IntVector3 | Min (IntVector3 a, IntVector3 b) |
Returns a new IntVector3 with the smallest components of the input vectors. More... | |
static implicit | operator FPVector3 (IntVector3 v) |
Converts a IntVector3 object to FPVector3 object. More... | |
static | operator IntVector3 (FPVector3 v) |
Converts a FPVector3 object to a IntVector3 object. More... | |
static Boolean | operator!= (IntVector3 a, IntVector3 b) |
Returns true if two vectors are not exactly equal. More... | |
static IntVector3 | operator* (Int32 s, IntVector3 v) |
Multiplies each component of v times s . More... | |
static IntVector3 | operator* (IntVector3 v, Int32 s) |
Multiplies each component of v times s . More... | |
static IntVector3 | operator+ (IntVector3 a, IntVector3 b) |
Adds two vectors. More... | |
static IntVector3 | operator- (IntVector3 a, IntVector3 b) |
Subtracts b from a More... | |
static IntVector3 | operator- (IntVector3 v) |
Negates each component of v vector. More... | |
static IntVector3 | operator/ (IntVector3 v, Int32 s) |
Divides each component of v by s . More... | |
static Boolean | operator== (IntVector3 a, IntVector3 b) |
Returns true if two vectors are exactly equal. More... | |
static IntVector3 | RoundToInt (FPVector3 v) |
Rounds the components of the given FPVector3 to the nearest integer values. More... | |
static void | Serialize (IntVector3 *ptr, IDeterministicFrameSerializer serializer) |
Serializes a IntVector3 to a stream using an IDeterministicFrameSerializer. If the serializer is in writing mode, the method writes the X, Y, and Z components of the vector to the stream. If the serializer is in reading mode, the method reads the X, Y, and Z components from the stream and assigns them to the vector. More... | |
Public Attributes | |
int | X |
The X component of the vector. More... | |
int | Y |
The Y component of the vector. More... | |
int | Z |
The Z component of the vector. More... | |
Static Public Attributes | |
static IntVector3 | Down => new IntVector3(0, -1, 0) |
Represents the downward direction with coordinates (0, -1, 0). More... | |
static IntVector3 | Left => new IntVector3(-1, 0, 0) |
Represents a 3-dimensional vector with integer components. More... | |
static IntVector3 | MaxValue => new IntVector3(int.MaxValue, int.MaxValue, int.MaxValue) |
A vector with the components (int.MaxValue, int.MaxValue, int.MaxValue). More... | |
static IntVector3 | MinValue => new IntVector3(int.MinValue, int.MinValue, int.MinValue) |
A vector with the components (int.MinValue, int.MinValue, int.MinValue). More... | |
static IntVector3 | One => new IntVector3(1, 1, 1) |
The vector representing a coordinate of (1, 1, 1). More... | |
static IntVector3 | Right => new IntVector3(1, 0, 0) |
The right direction vector (1, 0, 0). More... | |
const int | SIZE = sizeof(int) * 3 |
The size of the struct in memory. More... | |
static IntVector3 | Up => new IntVector3(0, 1, 0) |
Represents an upward vector with x = 0, y = 1, and z = 0. More... | |
static IntVector3 | Zero => new IntVector3(0, 0, 0) |
Represents a zero vector with all components set to 0. More... | |
Properties | |
FP | Magnitude [get] |
Calculates the magnitude (length) of the IntVector3. More... | |
int | SqrMagnitude [get] |
Gets the square of the magnitude of the vector. More... | |
Represents a three-dimensional vector with integer components.
|
inline |
Constructs a new IntVector3 with the given components.
|
inline |
Returns a hash code for the vector.
|
inline |
Returns a string representation of the IntVector3.
|
inlinestatic |
Serializes a IntVector3 to a stream using an IDeterministicFrameSerializer. If the serializer is in writing mode, the method writes the X, Y, and Z components of the vector to the stream. If the serializer is in reading mode, the method reads the X, Y, and Z components from the stream and assigns them to the vector.
ptr | A pointer to the IntVector3 that is being serialized. |
serializer | The IDeterministicFrameSerializer used for serialization. |
|
inlinestatic |
Calculates the distance between two IntVector3 points.
a | The first IntVector3 point. |
b | The second IntVector3 point. |
|
inlinestatic |
Clamps a IntVector3 value between a minimum and maximum IntVector3 value.
value | The IntVector3 value to clamp. |
min | The minimum IntVector3 value. |
max | The maximum IntVector3 value. |
|
inlinestatic |
Returns a new IntVector3 with the smallest components of the input vectors.
a | The first IntVector3. |
b | The second IntVector3. |
|
inlinestatic |
Returns a new IntVector3 with the largest components of the input vectors.
a | The first IntVector3. |
b | The second IntVector3. |
|
inlinestatic |
Rounds the components of the given FPVector3 to the nearest integer values.
v | The vector to round. |
|
inlinestatic |
Returns the largest integer less than or equal to the specified floating-point number.
v | The number to round down. |
|
inlinestatic |
Returns a new IntVector3 with the ceiling of the components of the input vector.
v | The input vector. |
|
inlinestatic |
Converts a IntVector3 object to FPVector3 object.
v | The IntVector3 object to convert. |
|
inlineexplicitstatic |
Converts a FPVector3 object to a IntVector3 object.
|
inlinestatic |
Returns true
if two vectors are exactly equal.
a | |
b |
|
inlinestatic |
Returns true
if two vectors are not exactly equal.
a | |
b |
|
inlinestatic |
Negates each component of v vector.
v |
|
inlinestatic |
Multiplies each component of v times s .
v | |
s |
|
inlinestatic |
Multiplies each component of v times s .
v | |
s |
|
inlinestatic |
Divides each component of v by s .
v | |
s |
|
inlinestatic |
Subtracts b from a
a | |
b |
|
inlinestatic |
Adds two vectors.
a | |
b |
|
inline |
Returns true if the vector is exactly equal to another vector.
|
static |
The size of the struct in memory.
|
static |
A vector with the components (int.MaxValue, int.MaxValue, int.MaxValue).
|
static |
A vector with the components (int.MinValue, int.MinValue, int.MinValue).
|
static |
Represents an upward vector with x = 0, y = 1, and z = 0.
|
static |
Represents the downward direction with coordinates (0, -1, 0).
|
static |
Represents a 3-dimensional vector with integer components.
This struct is part of the Photon.Deterministic namespace.
|
static |
The right direction vector (1, 0, 0).
The right direction vector.
|
static |
The vector representing a coordinate of (1, 1, 1).
|
static |
Represents a zero vector with all components set to 0.
int Photon.Deterministic.IntVector3.X |
The X component of the vector.
int Photon.Deterministic.IntVector3.Y |
The Y component of the vector.
int Photon.Deterministic.IntVector3.Z |
The Z component of the vector.
|
get |
Calculates the magnitude (length) of the IntVector3.
The magnitude of the IntVector3.
|
get |
Gets the square of the magnitude of the vector.
The square of the magnitude of the vector.