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

Maintains camera objects which may be used to view the scene. More...

Inheritance diagram for Tes::Handlers::CategoriesHandler:
Tes::Runtime::MessageHandler

List of all members.

Classes

class  Category
 Category details. More...

Public Member Functions

delegate void NewCategoryDelegate (Category category)
 Delegate for receiving a message defining a new category.
delegate void ClearCategoriesDelegate ()
 Delegate for clearing/resetting all categories.
delegate void ActivationChangeDelegate (ushort categoryId, bool active)
 Delegate for changes to the active state of a category.
 CategoriesHandler ()
 Constructor initialising the persistent and transient caches.
void AddCategory (ushort id, ushort parentId, string name, bool active)
 Add a category to the list of known categories.
Category Lookup (ushort id)
 Lookup and retrieve details of a category.
IEnumerable< CategoryChildCategories (ushort id)
 Enumerates categories which are children of the category with id
bool IsActive (ushort id)
 Check if a category is active.
void SetActive (ushort id, bool active)
 Set the active state of a category.
override void BeginFrame (uint frameNumber, bool maintainTransient)
 Empty.
override void EndFrame (uint frameNumber)
 Empty.
override void Initialise (GameObject root, GameObject serverRoot, MaterialLibrary materials)
 Initialise the shape handler by initialising the shape scene root and fetching the default materials.
override void Reset ()
 Clear all current objects.
override Error ReadMessage (PacketBuffer packet, BinaryReader reader)
 The primary message handling function.
override Error Serialise (BinaryWriter writer, ref SerialiseInfo info)
 Serialises the currently active objects in for playback from file.
override void OnCategoryChange (ushort categoryId, bool active)
 Empty: this event is sourced from this class.

Protected Member Functions

void NotifyNewCategory (Category category)
 Invoke OnNewCategory

Properties

override string Name [get]
 Handler name.
override ushort RoutingID [get]
 Routing ID.
IEnumerable< CategoryCategories [get]
 Enumerates the known categories.

Events

NewCategoryDelegate OnNewCategory
 Invoked on receiving a message defining a new category.
ClearCategoriesDelegate OnClearCategories
 Invoked on clearing/resetting all categories.
ActivationChangeDelegate OnActivationChange
 Invoked on changes to the active state of a category.

Detailed Description

Maintains camera objects which may be used to view the scene.

Camera objects represent predetermined views into the scene. A camera object is really just a reference transform which the scene camera may optionally follow.

Camera objects are implicitly created when a message with a new camera ID arrives. A camera object is never destroyed and may only be updated with a new message.


Member Function Documentation

delegate void Tes::Handlers::CategoriesHandler::ActivationChangeDelegate ( ushort  categoryId,
bool  active 
)

Delegate for changes to the active state of a category.

Parameters:
categoryIdThe category changing state.
activeTrue when becoming active.
void Tes::Handlers::CategoriesHandler::AddCategory ( ushort  id,
ushort  parentId,
string  name,
bool  active 
) [inline]

Add a category to the list of known categories.

Parameters:
idThe category ID
parentIdThe parent ID. Zero is none (even though 0 is a valid category).
nameThe category display name.
activeThe default active state.
override void Tes::Handlers::CategoriesHandler::BeginFrame ( uint  frameNumber,
bool  maintainTransient 
) [inline, virtual]

Empty.

Parameters:
frameNumber
maintainTransient

Reimplemented from Tes::Runtime::MessageHandler.

IEnumerable<Category> Tes::Handlers::CategoriesHandler::ChildCategories ( ushort  id) [inline]

Enumerates categories which are children of the category with id

Parameters:
idThe category ID to enumerate the children of.
override void Tes::Handlers::CategoriesHandler::EndFrame ( uint  frameNumber) [inline, virtual]

Empty.

Parameters:
frameNumber

Reimplemented from Tes::Runtime::MessageHandler.

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

Initialise the shape handler by initialising the shape scene root and fetching the default materials.

Parameters:
rootThe 3rd Eye Scene root object.
serverRootThe server scene root (transformed into the server reference frame).
materialsMaterial library from which to resolve materials.

Reimplemented from Tes::Runtime::MessageHandler.

bool Tes::Handlers::CategoriesHandler::IsActive ( ushort  id) [inline]

Check if a category is active.

Parameters:
idThe category ID.
Returns:
True if active or unknown/
Category Tes::Handlers::CategoriesHandler::Lookup ( ushort  id) [inline]

Lookup and retrieve details of a category.

Parameters:
idThe category to lookup.
Returns:
A shallow copy of the category on success, null on failure.
delegate void Tes::Handlers::CategoriesHandler::NewCategoryDelegate ( Category  category)

Delegate for receiving a message defining a new category.

Parameters:
categoryThe new category details.
void Tes::Handlers::CategoriesHandler::NotifyNewCategory ( Category  category) [inline, protected]

Invoke OnNewCategory

Parameters:
categoryThe new category details.
override void Tes::Handlers::CategoriesHandler::OnCategoryChange ( ushort  categoryId,
bool  active 
) [inline, virtual]

Empty: this event is sourced from this class.

Parameters:
categoryId
active

Implements Tes::Runtime::MessageHandler.

override Error Tes::Handlers::CategoriesHandler::ReadMessage ( PacketBuffer  packet,
BinaryReader  reader 
) [inline, virtual]

The primary message handling function.

Parameters:
packet
reader
Returns:

Implements Tes::Runtime::MessageHandler.

override Error Tes::Handlers::CategoriesHandler::Serialise ( BinaryWriter  writer,
ref SerialiseInfo  info 
) [inline, virtual]

Serialises the currently active objects in for playback from file.

Parameters:
writerThe write to serialise to.
infoStatistics
Returns:
An error code on failure.

Implements Tes::Runtime::MessageHandler.

void Tes::Handlers::CategoriesHandler::SetActive ( ushort  id,
bool  active 
) [inline]

Set the active state of a category.

Parameters:
idThe category ID.
activeThe desired active state.

This invokes the OnActivationChange event when active does not match the category state.

Unknown id values are ignored.


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