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

Defines a simple mesh shape for remote rendering. More...

Inheritance diagram for Tes::Shapes::MeshShape:
Tes::Shapes::Shape

List of all members.

Public Types

enum  SendDataType { Vertices, Indices, Normals, UniformNormal }
 Codes for WriteData(PacketBuffer, ref uint). More...

Public Member Functions

 MeshShape (MeshDrawType drawType, Vector3[] vertices, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, ushort category, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, ushort category, Vector3 position, Quaternion rotation, Vector3 scale)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, ushort category, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, ushort category, Vector3 position, Quaternion rotation)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, ushort category, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, ushort category, Vector3 position)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, uint id, ushort category)
 Create a mesh shape.
 MeshShape (MeshDrawType drawType, Vector3[] vertices, int[] indices, uint id, ushort category)
 Create a mesh shape.
void SetUniformNormal (Vector3 normal)
 Set a single normal to be applied to all vertices (e.g.
override bool WriteCreate (PacketBuffer packet)
 Overridden to include the triangle count.
override int WriteData (PacketBuffer packet, ref uint progressMarker)
 Overridden to write mesh data.
override object Clone ()
 Clone this shape.

Static Public Member Functions

static int WriteData (ushort routingID, uint objectID, PacketBuffer packet, ref uint progressMarker, Vector3[] vertices, Vector3[] normals, int[] indices)
 A helper function for writing as many DataMessage messsages as required.

Properties

bool CalculateNormals [get, set]
 Reflects the state of the flag MeshShapeFlag.CalculateNormals
Vector3[] Normals [get, set]
 Optional normals access.
MeshDrawType DrawType [get, set]
 Defines the mesh topology.

Detailed Description

Defines a simple mesh shape for remote rendering.

This equates to so called "immediate mode" rendering and should only be used for small data sets.

The shape can be used to render triangles, lines or points. The vertex and/or index data must match the topology. That is, there must be three indices or vertices per triangle.

The shape does support splitting large data sets.


Member Enumeration Documentation

Codes for WriteData(PacketBuffer, ref uint).

Enumerator:
Vertices 

Sending vertex data.

Indices 

Sending index data.

Normals 

Sending per vertex normals.

UniformNormal 

Sending a single normals for all vertices (voxel extents).


Constructor & Destructor Documentation

Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
ushort  category,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
ushort  category,
Vector3  position,
Quaternion  rotation,
Vector3  scale 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
rotationLocal rotation.
scaleLocal scaling.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
ushort  category,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
ushort  category,
Vector3  position,
Quaternion  rotation 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
rotationLocal rotation.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
ushort  category,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
ushort  category,
Vector3  position 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
positionLocal position.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
uint  id,
ushort  category 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.
Tes::Shapes::MeshShape::MeshShape ( MeshDrawType  drawType,
Vector3[]  vertices,
int[]  indices,
uint  id,
ushort  category 
) [inline]

Create a mesh shape.

Parameters:
drawTypeMesh topology.
verticesVertex data.
indicesIndex data. Must match topology.
idThe shape ID. Zero for transient shapes.
categoryCategory to which the shape belongs.

Member Function Documentation

override object Tes::Shapes::MeshShape::Clone ( ) [inline, virtual]

Clone this shape.

Returns:
A deep copy of this object.

Reimplemented from Tes::Shapes::Shape.

void Tes::Shapes::MeshShape::SetUniformNormal ( Vector3  normal) [inline]

Set a single normal to be applied to all vertices (e.g.

for voxels).

Parameters:
normalThe shared normal.
override bool Tes::Shapes::MeshShape::WriteCreate ( PacketBuffer  packet) [inline, virtual]

Overridden to include the triangle count.

Returns:
true on success.
Parameters:
packetPacket to write the message to.

Reimplemented from Tes::Shapes::Shape.

static int Tes::Shapes::MeshShape::WriteData ( ushort  routingID,
uint  objectID,
PacketBuffer  packet,
ref uint  progressMarker,
Vector3[]  vertices,
Vector3[]  normals,
int[]  indices 
) [inline, static]

A helper function for writing as many DataMessage messsages as required.

Parameters:
routingIDRouting id for the message being composed.
objectIDID of the object to which the data belong.
packetData packet to compose in.
progressMarkerProgress or pagination marker.
verticesMesh vertex array.
normalsMesh normal array. One per vertex or just a single normal to apply to all vertices.
indicesMesh indices.

Call recursively until zero is returned. Packet does not get finalised here.

override int Tes::Shapes::MeshShape::WriteData ( PacketBuffer  packet,
ref uint  progressMarker 
) [inline, virtual]

Overridden to write mesh data.

Parameters:
packetPacket to write the message to.
progressMarkerProgress marker.
Returns:
Zero when done, 1 otherwise.

Reimplemented from Tes::Shapes::Shape.


Property Documentation

bool Tes::Shapes::MeshShape::CalculateNormals [get, set]

Reflects the state of the flag MeshShapeFlag.CalculateNormals


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