Quantum 3 3.0.5

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Photon.Deterministic.NullableFPVector3 Struct Reference

A serializable equivalent of Nullable<FPVector3>. More...

Public Member Functions

readonly override int GetHashCode ()
 Gets the hash code of the NullableFPVector3 instance. More...
 
readonly FPVector3 ValueOrDefault (FPVector3 v)
 If HasValue is true, returns Value. Otherwise returns v . More...
 

Static Public Member Functions

static implicit operator NullableFPVector3 (FPVector3 v)
 Implicitly converts an FPVector3 to a NullableFPVector3. More...
 
static void Serialize (NullableFPVector3 *ptr, IDeterministicFrameSerializer serializer)
 Serialize the data of a NullableFPVector3 object using the provided serializer. More...
 

Public Attributes

long _hasValue
 If 1, then _value is valid. More...
 
FPVector3 _value
 The value. More...
 

Static Public Attributes

const int SIZE = sizeof(long) + FPVector3.SIZE
 Size of the struct in bytes. More...
 

Properties

readonly Boolean HasValue [get]
 Returns true if this nullable has a value. More...
 
readonly FPVector3 Value [get]
 Returns current value. More...
 

Detailed Description

A serializable equivalent of Nullable<FPVector3>.

Member Function Documentation

◆ ValueOrDefault()

readonly FPVector3 Photon.Deterministic.NullableFPVector3.ValueOrDefault ( FPVector3  v)
inline

If HasValue is true, returns Value. Otherwise returns v .

Parameters
v
Returns

◆ operator NullableFPVector3()

static implicit Photon.Deterministic.NullableFPVector3.operator NullableFPVector3 ( FPVector3  v)
inlinestatic

Implicitly converts an FPVector3 to a NullableFPVector3.

Parameters
vThe FPVector3 to convert.
Returns
A NullableFPVector3 instance with the converted value.

◆ Serialize()

static void Photon.Deterministic.NullableFPVector3.Serialize ( NullableFPVector3 ptr,
IDeterministicFrameSerializer  serializer 
)
inlinestatic

Serialize the data of a NullableFPVector3 object using the provided serializer.

Parameters
ptrA pointer to the NullableFPVector3 object to be serialized.
serializerThe serializer object used to perform the serialization.

◆ GetHashCode()

readonly override int Photon.Deterministic.NullableFPVector3.GetHashCode ( )
inline

Gets the hash code of the NullableFPVector3 instance.

Returns
The hash code of the NullableFPVector3.

If HasValue is false, the hash code is always 0. If HasValue is true, the hash code is calculated based on the value of Value.

Member Data Documentation

◆ SIZE

const int Photon.Deterministic.NullableFPVector3.SIZE = sizeof(long) + FPVector3.SIZE
static

Size of the struct in bytes.

◆ _hasValue

long Photon.Deterministic.NullableFPVector3._hasValue

If 1, then _value is valid.

◆ _value

FPVector3 Photon.Deterministic.NullableFPVector3._value

The value.

Property Documentation

◆ HasValue

readonly Boolean Photon.Deterministic.NullableFPVector3.HasValue
get

Returns true if this nullable has a value.

◆ Value

readonly FPVector3 Photon.Deterministic.NullableFPVector3.Value
get

Returns current value.

Exceptions
NullReferenceExceptionIf HasValue is false