3rd Eye Scene C#
3rd Eye Scene C# documentation
|
An interface for tracking shared resources. More...
Public Member Functions | |
int | Create (PacketBuffer packet) |
Send initial creation message for this resource. | |
int | Destroy (PacketBuffer packet) |
Send destruction message for this resource. | |
void | Transfer (PacketBuffer packet, int byteLimit, ref TransferProgress progress) |
Update transfer of the shared resource. | |
Properties | |
uint | ID [get] |
Unique ID for the shared resource. | |
ushort | TypeID [get] |
Type ID of the resource. |
An interface for tracking shared resources.
A shared resource represents data referenced by multiple other objects or shapes. Mesh data and materials are good examples of shared resources. Shared resources are transferred on the connection as required, and the destruction message sent some time after the resource is no longer referenced.
Typically calling pattern on the resource is:
int Tes::Resource::Create | ( | PacketBuffer | packet | ) |
Send initial creation message for this resource.
packet | Packet to populate with the create message. |
Implemented in Tes::Shapes::MeshBase.
int Tes::Resource::Destroy | ( | PacketBuffer | packet | ) |
Send destruction message for this resource.
packet | Packet to populate with the destruction message. |
Implemented in Tes::Shapes::MeshBase.
void Tes::Resource::Transfer | ( | PacketBuffer | packet, |
int | byteLimit, | ||
ref TransferProgress | progress | ||
) |
Update transfer of the shared resource.
packet | The packet buffer in which to compose the transfer message. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
Supports amortised transfer via the progress argument. On first call, this is the default initialised structure (zero). On subsequent calls it is the last returned value unless Failed
was true.
The semantics of this value are entirely dependent on the internal implementation.
Implemented in Tes::Shapes::MeshBase.
uint Tes::Resource::ID [get] |
Unique ID for the shared resource.
Only unique amongst resources with the same TypeID.
Implemented in Tes::Shapes::MeshBase.
ushort Tes::Resource::TypeID [get] |
Type ID of the resource.
This matches the routing ID for the handler.
Implemented in Tes::Shapes::MeshBase.