Photon Fusion 2.0.0

Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
Vector2Compressed Struct Reference

Represents a compressed Vector2 value for network transmission. More...

Inherits INetworkStruct, and IEquatable< Vector2Compressed >.

Public Member Functions

override bool Equals (object obj)
 Checks if the provided object is a Vector2Compressed instance and if it's equal to the current Vector2Compressed instance.
 
bool Equals (Vector2Compressed other)
 Checks if the current Vector2Compressed instance is equal to the other Vector2Compressed instance.
 
override int GetHashCode ()
 Returns the hash code for the current Vector2Compressed instance.
 

Static Public Member Functions

static implicit operator Vector2 (Vector2Compressed q)
 Implicit conversion from Vector2Compressed to Vector2.
 
static implicit operator Vector2Compressed (Vector2 v)
 Implicit conversion from Vector2 to Vector2Compressed.
 
static bool operator!= (Vector2Compressed left, Vector2Compressed right)
 Inequality operator for Vector2Compressed struct.
 
static bool operator== (Vector2Compressed left, Vector2Compressed right)
 Equality operator for Vector2Compressed struct.
 

Public Attributes

int xEncoded
 Encoded value of the x component.
 
int yEncoded
 Encoded value of the y component.
 

Properties

float X [get, set]
 Gets or sets the x component.
 
float Y [get, set]
 Gets or sets the y component.
 

Detailed Description

Represents a compressed Vector2 value for network transmission.

Member Function Documentation

◆ Equals() [1/2]

override bool Equals ( object  obj)

Checks if the provided object is a Vector2Compressed instance and if it's equal to the current Vector2Compressed instance.

Parameters
objThe object to compare with the current Vector2Compressed instance.
Returns
True if the provided object is a Vector2Compressed instance and it's equal to the current Vector2Compressed instance, otherwise false.

◆ Equals() [2/2]

bool Equals ( Vector2Compressed  other)

Checks if the current Vector2Compressed instance is equal to the other Vector2Compressed instance.

Parameters
otherThe other Vector2Compressed instance to compare with the current Vector2Compressed instance.
Returns
True if the values of both Vector2Compressed instances are equal, otherwise false.

◆ GetHashCode()

override int GetHashCode ( )

Returns the hash code for the current Vector2Compressed instance.

Returns
A hash code for the current Vector2Compressed instance.

◆ operator Vector2()

static implicit operator Vector2 ( Vector2Compressed  q)
static

Implicit conversion from Vector2Compressed to Vector2.

Parameters
qThe Vector2Compressed instance to convert.
Returns
The decompressed Vector2 value of the Vector2Compressed instance.

◆ operator Vector2Compressed()

static implicit operator Vector2Compressed ( Vector2  v)
static

Implicit conversion from Vector2 to Vector2Compressed.

Parameters
vThe Vector2 value to convert.
Returns
A new Vector2Compressed instance with the compressed value of the Vector2.

◆ operator!=()

static bool operator!= ( Vector2Compressed  left,
Vector2Compressed  right 
)
static

Inequality operator for Vector2Compressed struct.

Parameters
leftFirst Vector2Compressed instance.
rightSecond Vector2Compressed instance.
Returns
True if the value of the first Vector2Compressed instance is not equal to the value of the second Vector2Compressed instance, otherwise false.

◆ operator==()

static bool operator== ( Vector2Compressed  left,
Vector2Compressed  right 
)
static

Equality operator for Vector2Compressed struct.

Parameters
leftFirst Vector2Compressed instance.
rightSecond Vector2Compressed instance.
Returns
True if the value of the first Vector2Compressed instance is equal to the value of the second Vector2Compressed instance, otherwise false.