3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Resource Interface Reference

An interface for tracking shared resources. More...

Inheritance diagram for Tes::Resource:
Tes::Shapes::MeshResource Tes::Shapes::MeshBase Tes::Handlers::MeshResourcePlaceholder Tes::Shapes::PointCloud Tes::Shapes::SimpleMesh

List of all members.

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.

Detailed Description

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:


Member Function Documentation

int Tes::Resource::Create ( PacketBuffer  packet)

Send initial creation message for this resource.

Parameters:
packetPacket to populate with the create message.
Returns:
Zero on success.

Implemented in Tes::Shapes::MeshBase.

int Tes::Resource::Destroy ( PacketBuffer  packet)

Send destruction message for this resource.

Parameters:
packetPacket to populate with the destruction message.
Returns:
Zero on success.

Implemented in Tes::Shapes::MeshBase.

void Tes::Resource::Transfer ( PacketBuffer  packet,
int  byteLimit,
ref TransferProgress  progress 
)

Update transfer of the shared resource.

Parameters:
packetThe packet buffer in which to compose the transfer message.
byteLimitAn advisory byte limit used to restrict how much data should be sent (in bytes).
progressTrack 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.


Property Documentation

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.


The documentation for this interface was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties Events