3rd Eye Scene C#
3rd Eye Scene C# documentation
Tes::Handlers::Shape3D::MeshSetHandler Class Reference

Handle messages for objects representing instances of mesh data from the MeshCache. More...

Inheritance diagram for Tes::Handlers::Shape3D::MeshSetHandler:
Tes::Handlers::ShapeHandler Tes::Runtime::MessageHandler

List of all members.

Public Member Functions

 MeshSetHandler (Runtime.CategoryCheckDelegate categoryCheck, MeshCache meshCache)
 Create the shape handler.
override void Initialise (GameObject root, GameObject serverRoot, MaterialLibrary materials)
 Override.
override void Reset ()
 Clear all current objects and mesh references.
override void PreRender ()
 Ensures mesh objects are finalised.

Protected Member Functions

override GameObject CreateObject ()
 Overridden to not add mesh components.
override Shapes.Shape CreateSerialisationShape (ShapeComponent shapeComponent)
 Creates a mesh set shape for serialising the mesh and its resource references.
override Error HandleMessage (CreateMessage msg, PacketBuffer packet, BinaryReader reader)
 Overridden to read information about mesh parts.
virtual Error AddMeshPart (GameObject parent, BinaryReader reader, int partNumber)
 Called for each mesh part in the create messages.
override Error PostHandleMessage (GameObject obj, DestroyMessage msg, PacketBuffer packet, BinaryReader reader)
 Post destroy handling: destroy all sub-part objects.
virtual void OnMeshFinalised (MeshCache.MeshDetails meshDetails)
 Mesh resource completion notification.
virtual void OnMeshRemoved (MeshCache.MeshDetails meshDetails)
 Mesh resource removal notification.
virtual void SetMesh (ShapeComponent partObject, MeshCache.MeshDetails meshDetails)
 Set the visuals of <pararef name="partObject"> to use meshDetails .

Properties

override string Name [get]
 Handler name.
override ushort RoutingID [get]
 ShapeID.MeshSet
override Mesh SolidMesh [get]
 Irrelevant.
override Mesh WireframeMesh [get]
 Irrelevant.
MeshCache MeshCache [get, set]
 Access the MeshCache from which mesh resources are resolved.

Detailed Description

Handle messages for objects representing instances of mesh data from the MeshCache.

Supports dual creation order: meshes resources then objects or objects then mesh resources.

Note: objects from the MeshCache can be marked for redefinition. In this case objects maintain the last valid visuals until a new finalisation message arrives.


Constructor & Destructor Documentation

Tes::Handlers::Shape3D::MeshSetHandler::MeshSetHandler ( Runtime.CategoryCheckDelegate  categoryCheck,
MeshCache  meshCache 
) [inline]

Create the shape handler.

Parameters:
categoryCheck
meshCacheThe mesh cache from which to read resources.

Member Function Documentation

virtual Error Tes::Handlers::Shape3D::MeshSetHandler::AddMeshPart ( GameObject  parent,
BinaryReader  reader,
int  partNumber 
) [inline, protected, virtual]

Called for each mesh part in the create messages.

Parameters:
parentThe parent object for the part object.
readerMessage data reader.
partNumberThe part number/index.
Returns:
An error code on failure.
override GameObject Tes::Handlers::Shape3D::MeshSetHandler::CreateObject ( ) [inline, protected, virtual]

Overridden to not add mesh components.

These are handled by child objects.

Returns:

Reimplemented from Tes::Handlers::ShapeHandler.

override Shapes.Shape Tes::Handlers::Shape3D::MeshSetHandler::CreateSerialisationShape ( ShapeComponent  shapeComponent) [inline, protected, virtual]

Creates a mesh set shape for serialising the mesh and its resource references.

Parameters:
shapeComponentThe component to create a shape for.
Returns:
A shape instance suitable for configuring to generate serialisation messages.

Implements Tes::Handlers::ShapeHandler.

override Error Tes::Handlers::Shape3D::MeshSetHandler::HandleMessage ( CreateMessage  msg,
PacketBuffer  packet,
BinaryReader  reader 
) [inline, protected, virtual]

Overridden to read information about mesh parts.

Parameters:
msg
packet
reader
Returns:

Reimplemented from Tes::Handlers::ShapeHandler.

override void Tes::Handlers::Shape3D::MeshSetHandler::Initialise ( GameObject  root,
GameObject  serverRoot,
MaterialLibrary  materials 
) [inline, virtual]

Override.

Parameters:
root
serverRoot
materials

Reimplemented from Tes::Handlers::ShapeHandler.

virtual void Tes::Handlers::Shape3D::MeshSetHandler::OnMeshFinalised ( MeshCache.MeshDetails  meshDetails) [inline, protected, virtual]

Mesh resource completion notification.

Parameters:
meshDetailsThe mesh(es) finalised.

Links objects waiting on meshDetails to use the associated meshes.

virtual void Tes::Handlers::Shape3D::MeshSetHandler::OnMeshRemoved ( MeshCache.MeshDetails  meshDetails) [inline, protected, virtual]

Mesh resource removal notification.

Parameters:
meshDetailsThe mesh(es) being removed.

Stops referencing the associated mesh objects.

override Error Tes::Handlers::Shape3D::MeshSetHandler::PostHandleMessage ( GameObject  obj,
DestroyMessage  msg,
PacketBuffer  packet,
BinaryReader  reader 
) [inline, protected, virtual]

Post destroy handling: destroy all sub-part objects.

Parameters:
obj
msg
packet
reader
Returns:

Reimplemented from Tes::Handlers::ShapeHandler.

virtual void Tes::Handlers::Shape3D::MeshSetHandler::SetMesh ( ShapeComponent  partObject,
MeshCache.MeshDetails  meshDetails 
) [inline, protected, virtual]

Set the visuals of <pararef name="partObject"> to use meshDetails .

Parameters:
partObjectThe part object
meshDetailsThe mesh details.

Adds multiple children to partObject when meshDetails contains multiple mesh objects.


Property Documentation

override ushort Tes::Handlers::Shape3D::MeshSetHandler::RoutingID [get]

ShapeID.MeshSet

Reimplemented from Tes::Runtime::MessageHandler.

override Mesh Tes::Handlers::Shape3D::MeshSetHandler::SolidMesh [get]

Irrelevant.

Each object has its own geometry.

Reimplemented from Tes::Handlers::ShapeHandler.

override Mesh Tes::Handlers::Shape3D::MeshSetHandler::WireframeMesh [get]

Irrelevant.

Each object has its own geometry.

Reimplemented from Tes::Handlers::ShapeHandler.


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