3rd Eye Scene C#
3rd Eye Scene C# documentation
|
An implementation of MeshResource which implements transfer. More...
Public Types | |
enum | Phase { Vertex, Index, Normal, Colour, UV, Finalise, End } |
Resource.Transfer(PacketBuffer, int, ref TransferProgress) phases enumeration. More... | |
Public Member Functions | |
MeshBase () | |
Constructor. | |
abstract uint | VertexCount (int stream=0) |
Exposes the number of vertices in the mesh. | |
abstract uint | IndexCount (int stream=0) |
Exposes the number of indices in the mesh. | |
abstract Vector3[] | Vertices (int stream=0) |
Supports iteration of the vertices of the mesh. | |
virtual ushort[] | Indices2 (int stream=0) |
Supports iteration of the indices of the mesh when using two byte indices. | |
virtual int[] | Indices4 (int stream=0) |
Supports iteration of the indices of the mesh when using four byte indices. | |
abstract Vector3[] | Normals (int stream=0) |
Supports iteration of the normal of the mesh. | |
abstract Vector2[] | UVs (int stream=0) |
Supports iteration of the UV coordinates of the mesh. | |
abstract uint[] | Colours (int stream=0) |
Supports iteration of per vertex colours of the mesh. | |
Phase | NextPhase (Phase phase) |
Helper to set the next phase item. | |
int | Create (PacketBuffer packet) |
Send initial mesh creation message. | |
int | Destroy (PacketBuffer packet) |
Send mesh destruction message. | |
void | Transfer (PacketBuffer packet, int byteLimit, ref TransferProgress progress) |
Handles transfer of mesh content. | |
Static Public Member Functions | |
static ushort | EstimateTransferCount (int elementSize, int byteLimit, int overhead=0) |
Estimate the number of elements which can be transferred at the given byteLimit | |
Protected Member Functions | |
bool | Transfer (PacketBuffer packet, MeshMessageType component, Vector3[] items, int byteLimit, ref TransferProgress progress) |
Data transfer helper for packing Vector3 data. | |
bool | Transfer (PacketBuffer packet, MeshMessageType component, Vector2[] items, int byteLimit, ref TransferProgress progress) |
Data transfer helper for packing Vector2 data. | |
bool | Transfer (PacketBuffer packet, MeshMessageType component, ushort[] items, int byteLimit, ref TransferProgress progress) |
Data transfer helper for packing ushort data. | |
bool | Transfer (PacketBuffer packet, MeshMessageType component, int[] items, int byteLimit, ref TransferProgress progress) |
Data transfer helper for packing int data. | |
bool | Transfer (PacketBuffer packet, MeshMessageType component, uint[] items, int byteLimit, ref TransferProgress progress) |
Data transfer helper for packing uint data. | |
Properties | |
uint | ID [get, set] |
Unique ID for the mesh. | |
ushort | TypeID [get] |
The Mesh type ID. | |
Matrix4 | Transform [get, set] |
Root transform for the mesh. | |
uint | Tint [get, set] |
A global tint colour applied to the mesh. | |
byte | DrawType [get, set] |
The DrawType of the mesh. | |
bool | CalculateNormals [get, set] |
Flag the mesh to calculate normals at the client when none are provided here? | |
MeshDrawType | MeshDrawType [get, set] |
The DrawType of the mesh. | |
MeshComponentFlag | Components [get, set] |
Identifies which MeshComponentFlag items are present. | |
abstract int | IndexSize [get] |
Defines the byte size used by indices in this mesh. |
An implementation of MeshResource which implements transfer.
Interface functions are declared as abstract (some exceptions).
Resource.Transfer(PacketBuffer, int, ref TransferProgress) phases enumeration.
abstract uint [] Tes::Shapes::MeshBase::Colours | ( | int | stream = 0 | ) | [pure virtual] |
Supports iteration of per vertex colours of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
int Tes::Shapes::MeshBase::Create | ( | PacketBuffer | packet | ) | [inline] |
Send initial mesh creation message.
packet | Packet to populate with the create message. |
Implements Tes::Resource.
int Tes::Shapes::MeshBase::Destroy | ( | PacketBuffer | packet | ) | [inline] |
Send mesh destruction message.
packet | Packet to populate with the destruction message. |
Implements Tes::Resource.
static ushort Tes::Shapes::MeshBase::EstimateTransferCount | ( | int | elementSize, |
int | byteLimit, | ||
int | overhead = 0 |
||
) | [inline, static] |
Estimate the number of elements which can be transferred at the given byteLimit
elementSize | The byte size of each element. |
byteLimit | The maximum number of bytes to transfer. Note: a hard limit of 0xffff is enforced. |
overhead | Additional byte overhead to a account for. This reduces the effectivel, total byte limit. |
abstract uint Tes::Shapes::MeshBase::IndexCount | ( | int | stream = 0 | ) | [pure virtual] |
Exposes the number of indices in the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
virtual ushort [] Tes::Shapes::MeshBase::Indices2 | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the indices of the mesh when using two byte indices.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Reimplemented in Tes::Shapes::PointCloud, and Tes::Handlers::MeshResourcePlaceholder.
virtual int [] Tes::Shapes::MeshBase::Indices4 | ( | int | stream = 0 | ) | [inline, virtual] |
Supports iteration of the indices of the mesh when using four byte indices.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Reimplemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
Helper to set the next phase item.
phase | The current phase. |
abstract Vector3 [] Tes::Shapes::MeshBase::Normals | ( | int | stream = 0 | ) | [pure virtual] |
Supports iteration of the normal of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
bool Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
MeshMessageType | component, | ||
ushort[] | items, | ||
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline, protected] |
Data transfer helper for packing ushort
data.
packet | The packet buffer in which to compose the transfer message. |
component | The component type. |
items | Data to transfer. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
bool Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
MeshMessageType | component, | ||
Vector2[] | items, | ||
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline, protected] |
Data transfer helper for packing Vector2 data.
packet | The packet buffer in which to compose the transfer message. |
component | The component type. |
items | Data to transfer. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
bool Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
MeshMessageType | component, | ||
int[] | items, | ||
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline, protected] |
Data transfer helper for packing int
data.
packet | The packet buffer in which to compose the transfer message. |
component | The component type. |
items | Data to transfer. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
bool Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
MeshMessageType | component, | ||
Vector3[] | items, | ||
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline, protected] |
Data transfer helper for packing Vector3 data.
packet | The packet buffer in which to compose the transfer message. |
component | The component type. |
items | Data to transfer. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
void Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline] |
Handles transfer of mesh content.
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 | The progress value from the last call to this method. |
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.
Implements Tes::Resource.
bool Tes::Shapes::MeshBase::Transfer | ( | PacketBuffer | packet, |
MeshMessageType | component, | ||
uint[] | items, | ||
int | byteLimit, | ||
ref TransferProgress | progress | ||
) | [inline, protected] |
Data transfer helper for packing uint
data.
packet | The packet buffer in which to compose the transfer message. |
component | The component type. |
items | Data to transfer. |
byteLimit | An advisory byte limit used to restrict how much data should be sent (in bytes). |
progress | Track the transfer progress between calls. |
abstract Vector2 [] Tes::Shapes::MeshBase::UVs | ( | int | stream = 0 | ) | [pure virtual] |
Supports iteration of the UV coordinates of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
abstract uint Tes::Shapes::MeshBase::VertexCount | ( | int | stream = 0 | ) | [pure virtual] |
Exposes the number of vertices in the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
abstract Vector3 [] Tes::Shapes::MeshBase::Vertices | ( | int | stream = 0 | ) | [pure virtual] |
Supports iteration of the vertices of the mesh.
stream | For future use. Must be zero. |
Implements Tes::Shapes::MeshResource.
Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
bool Tes::Shapes::MeshBase::CalculateNormals [get, set] |
Flag the mesh to calculate normals at the client when none are provided here?
abstract int Tes::Shapes::MeshBase::IndexSize [get] |
Defines the byte size used by indices in this mesh.
The size of each index value in bytes.
Implements Tes::Shapes::MeshResource.
Reimplemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.
Matrix4 Tes::Shapes::MeshBase::Transform [get, set] |