Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
Quantum.MapEntityId Struct Reference

Represents a Quantum entity that is part of a map. More...

Inherits IEquatable< MapEntityId >.

Public Member Functions

bool Equals (MapEntityId other)
 Equal operator. More...
 
override Boolean Equals (Object obj)
 Override equals method to compare the entity id with another object. More...
 
override Int32 GetHashCode ()
 Override GetHashCode method to return the hash code of the entity id. More...
 
override string ToString ()
 Override ToString method to debug output readable class members. More...
 

Static Public Member Functions

static MapEntityId Create (int sceneIndex)
 Creates a new entity id. More...
 
static bool operator!= (MapEntityId left, MapEntityId right)
 Overload unequals operator to compare two map entity ids. More...
 
static bool operator== (MapEntityId left, MapEntityId right)
 Overload equals operator to compare two map entity ids. More...
 
static void Print (void *ptr, FramePrinter printer)
 Prints debug information about the entity id. More...
 
static void Serialize (void *ptr, FrameSerializer serializer)
 Serializes an entity id that is used inside a component. E.g. MapEntityLink. More...
 

Public Attributes

int SceneIndexPlusOne
 The index of the entity inside the map. Is 1-based, 0 means invalid. More...
 

Static Public Attributes

const int SIZE = 4
 The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed. More...
 

Properties

static MapEntityId Invalid [get]
 Returns a invalid entity id. More...
 
bool IsValid [get]
 Is the entity id valid. More...
 
int SceneIndex [get]
 The index of the entity inside the map. More...
 

Detailed Description

Represents a Quantum entity that is part of a map.

Member Function Documentation

◆ Create()

static MapEntityId Quantum.MapEntityId.Create ( int  sceneIndex)
static

Creates a new entity id.

Parameters
sceneIndexScene index
Returns
Map entity id

◆ Serialize()

static void Quantum.MapEntityId.Serialize ( void *  ptr,
FrameSerializer  serializer 
)
inlinestatic

Serializes an entity id that is used inside a component. E.g. MapEntityLink.

Parameters
ptrEntity id data pointer
serializerFrame serializer

◆ Print()

static void Quantum.MapEntityId.Print ( void *  ptr,
FramePrinter  printer 
)
inlinestatic

Prints debug information about the entity id.

Parameters
ptrEntity id pointer
printerThe printer

◆ ToString()

override string Quantum.MapEntityId.ToString ( )
inline

Override ToString method to debug output readable class members.

Returns
Debug string

◆ Equals() [1/2]

bool Quantum.MapEntityId.Equals ( MapEntityId  other)
inline

Equal operator.

Parameters
otherOther map entity id
Returns
true is the map entities are equal.

◆ GetHashCode()

override Int32 Quantum.MapEntityId.GetHashCode ( )
inline

Override GetHashCode method to return the hash code of the entity id.

Returns
Hash of the entity id

◆ Equals() [2/2]

override Boolean Quantum.MapEntityId.Equals ( Object  obj)
inline

Override equals method to compare the entity id with another object.

Parameters
objOther map entity id object
Returns

◆ operator==()

static bool Quantum.MapEntityId.operator== ( MapEntityId  left,
MapEntityId  right 
)
inlinestatic

Overload equals operator to compare two map entity ids.

Parameters
leftMap entity id a
rightMap entity id b
Returns
true is a and b are equal.

◆ operator!=()

static bool Quantum.MapEntityId.operator!= ( MapEntityId  left,
MapEntityId  right 
)
inlinestatic

Overload unequals operator to compare two map entity ids.

Parameters
leftMap entity id a
rightMap entity id b
Returns
true is a and b are unequal.

Member Data Documentation

◆ SIZE

const int Quantum.MapEntityId.SIZE = 4
static

The size of the component (or struct/type) in-memory inside the Frame data-buffers or stack (when passed as value parameter). Not related to the snapshot payload this occupies, which is bit-packed and compressed.

◆ SceneIndexPlusOne

int Quantum.MapEntityId.SceneIndexPlusOne

The index of the entity inside the map. Is 1-based, 0 means invalid.

Property Documentation

◆ SceneIndex

int Quantum.MapEntityId.SceneIndex
get

The index of the entity inside the map.

◆ IsValid

bool Quantum.MapEntityId.IsValid
get

Is the entity id valid.

◆ Invalid

MapEntityId Quantum.MapEntityId.Invalid
staticget

Returns a invalid entity id.