3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Shapes::MeshBase Class Reference

An implementation of MeshResource which implements transfer. More...

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

List of all members.

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.

Detailed Description

An implementation of MeshResource which implements transfer.

Interface functions are declared as abstract (some exceptions).


Member Enumeration Documentation

Resource.Transfer(PacketBuffer, int, ref TransferProgress) phases enumeration.

Enumerator:
Vertex 

Vertex data transfer.

Index 

Index data transfer.

Normal 

Vertex normal data transfer.

Colour 

Vertex colour data transfer.

UV 

Vertex UV data transfer.

Finalise 

Finalisation.

End 

Done.


Member Function Documentation

abstract uint [] Tes::Shapes::MeshBase::Colours ( int  stream = 0) [pure virtual]

Supports iteration of per vertex colours of the mesh.

Parameters:
streamFor 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.

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

Implements Tes::Resource.

int Tes::Shapes::MeshBase::Destroy ( PacketBuffer  packet) [inline]

Send mesh destruction message.

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

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

Parameters:
elementSizeThe byte size of each element.
byteLimitThe maximum number of bytes to transfer. Note: a hard limit of 0xffff is enforced.
overheadAdditional byte overhead to a account for. This reduces the effectivel, total byte limit.
Returns:
The maximum number of elements which can be accommodated in the byte limit (conservative).
abstract uint Tes::Shapes::MeshBase::IndexCount ( int  stream = 0) [pure virtual]

Exposes the number of indices in the mesh.

Returns:
The number of indices in this mesh.
Parameters:
streamFor 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.

Parameters:
streamFor 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.

Parameters:
streamFor future use. Must be zero.

Implements Tes::Shapes::MeshResource.

Reimplemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.

Phase Tes::Shapes::MeshBase::NextPhase ( Phase  phase) [inline]

Helper to set the next phase item.

Returns:
The next phase after phase .
Parameters:
phaseThe current phase.
abstract Vector3 [] Tes::Shapes::MeshBase::Normals ( int  stream = 0) [pure virtual]

Supports iteration of the normal of the mesh.

Parameters:
streamFor 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.

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

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

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

Parameters:
packetThe packet buffer in which to compose the transfer message.
componentThe component type.
itemsData to transfer.
byteLimitAn advisory byte limit used to restrict how much data should be sent (in bytes).
progressTrack the transfer progress between calls.
void Tes::Shapes::MeshBase::Transfer ( PacketBuffer  packet,
int  byteLimit,
ref TransferProgress  progress 
) [inline]

Handles transfer of mesh content.

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).
progressThe progress value from the last call to this method.
Returns:
A new value for progress to use on the next call.

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.

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

Parameters:
streamFor 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.

Returns:
The number of vertices in this mesh.
Parameters:
streamFor 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.

Parameters:
streamFor future use. Must be zero.

Implements Tes::Shapes::MeshResource.

Implemented in Tes::Shapes::PointCloud, Tes::Shapes::SimpleMesh, and Tes::Handlers::MeshResourcePlaceholder.


Property Documentation

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]

Root transform for the mesh.

This defines the origin.

Implements Tes::Shapes::MeshResource.


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