Server Meshing
Loading...
Searching...
No Matches
ServerCoordinator Class Reference

#include <ServerCoordinator.h>

Collaboration diagram for ServerCoordinator:

Classes

struct  OwnershipInfo

Public Types

using EntityId = uint32_t
using ServerPeerId = uint16_t

Public Member Functions

bool ShouldTranferOwnership (const uint32_t aEntityID, const Tga::Vector3f aPosition, TransferDecision &outDecision)
bool DecideOwnership (const TransferRequest &aRequest, TransferDecision &outDecision)
void ApplyOwnershipTransfer (const TransferDecision &aDecision)
ServerPeerId GetOwner (EntityId aId) const
uint32_t GetEpoch (EntityId aId) const
bool RegisterEntity (EntityId aId, ServerPeerId aOwner)
void UnregisterEntity (EntityId aId)
void ApplyOwnershipTransfer (EntityId aId, ServerPeerId aNewOwner)
bool TryRegisterEndpoint (ServerPeerId aId)
bool HasEndpoint (ServerPeerId aId)
const std::vector< ServerPeerId > & GetServerIDs () const

Member Typedef Documentation

◆ EntityId

using ServerCoordinator::EntityId = uint32_t

◆ ServerPeerId

Member Function Documentation

◆ ApplyOwnershipTransfer() [1/2]

void ServerCoordinator::ApplyOwnershipTransfer ( const TransferDecision & aDecision)

◆ ApplyOwnershipTransfer() [2/2]

void ServerCoordinator::ApplyOwnershipTransfer ( EntityId aId,
ServerPeerId aNewOwner )

◆ DecideOwnership()

bool ServerCoordinator::DecideOwnership ( const TransferRequest & aRequest,
TransferDecision & outDecision )

◆ GetEpoch()

uint32_t ServerCoordinator::GetEpoch ( EntityId aId) const

◆ GetOwner()

ServerCoordinator::ServerPeerId ServerCoordinator::GetOwner ( EntityId aId) const

◆ GetServerIDs()

const std::vector< ServerCoordinator::ServerPeerId > & ServerCoordinator::GetServerIDs ( ) const

◆ HasEndpoint()

bool ServerCoordinator::HasEndpoint ( ServerPeerId aId)

◆ RegisterEntity()

bool ServerCoordinator::RegisterEntity ( EntityId aId,
ServerPeerId aOwner )

◆ ShouldTranferOwnership()

bool ServerCoordinator::ShouldTranferOwnership ( const uint32_t aEntityID,
const Tga::Vector3f aPosition,
TransferDecision & outDecision )

◆ TryRegisterEndpoint()

bool ServerCoordinator::TryRegisterEndpoint ( ServerPeerId aId)

◆ UnregisterEntity()

void ServerCoordinator::UnregisterEntity ( EntityId aId)