![]() TGE Version 1.5.2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SimSet Class Reference#include <simBase.h>
Inheritance diagram for SimSet: ![]() Detailed DescriptionA set of SimObjects.It is often necessary to keep track of an arbitrary set of SimObjects. For instance, Torque's networking code needs to not only keep track of the set of objects which need to be ghosted, but also the set of objects which must always be ghosted. It does this by working with two sets. The first of these is the RootGroup (which is actually a SimGroup) and the second is the GhostAlwaysSet, which contains objects which must always be ghosted to the client. Some general notes on SimSets:
Using SimSets, the code to work with these two sets becomes relatively straightforward:
// (Example from netObject.cc) // To iterate over all the objects in the Sim: for (SimSetIterator obj(Sim::getRootGroup()); *obj; ++obj) { NetObject* nobj = dynamic_cast<NetObject*>(*obj); if (nobj) { // ... do things ... } } // (Example from netGhost.cc) // To iterate over the ghostAlways set. SimSet* ghostAlwaysSet = Sim::getGhostAlwaysSet(); SimSet::iterator i; U32 sz = ghostAlwaysSet->size(); S32 j; for(i = ghostAlwaysSet->begin(); i != ghostAlwaysSet->end(); i++) { NetObject *obj = (NetObject *)(*i); /// ... do things with obj... }
Member Typedef Documentation
Reimplemented from SimObject. Reimplemented in SimGroup, SimChunk, UnknownChunk, CreatorTree, EditManager, EditTSCtrl, GuiTerrPreviewCtrl, MissionAreaEditor, TerrainEditor, WorldEditor, AIClient, AIConnection, DebugView, GameConnection, GameTSCtrl, GuiPlayerView, GuiControlArrayControl, GuiFrameSetCtrl, GuiPaneControl, GuiScrollCtrl, GuiStackControl, GuiTabBookCtrl, GuiWindowCtrl, GuiBackgroundCtrl, GuiBitmapButtonCtrl, GuiBitmapButtonTextCtrl, GuiBitmapCtrl, GuiButtonBaseCtrl, GuiButtonCtrl, GuiCheckBoxCtrl, GuiColorPickerCtrl, GuiConsole, GuiConsoleEditCtrl, GuiConsoleTextCtrl, GuiDirectoryFileListCtrl, GuiDirectoryTreeCtrl, GuiListBoxCtrl, GuiMLTextCtrl, GuiMLTextEditCtrl, GuiPopUpTextListCtrl, GuiPopUpMenuCtrl, GuiRadioCtrl, GuiSliderCtrl, GuiTabPageCtrl, GuiTextCtrl, GuiTextEditCtrl, GuiTextEditSliderCtrl, GuiTextListCtrl, GuiTreeViewCtrl, GuiArrayCtrl, GuiCanvas, GuiControl, GuiTSCtrl, DbgFileView, GuiEditCtrl, GuiFilterCtrl, GuiGraphCtrl, GuiInspector, GuiInspectorField, GuiInspectorGroup, GuiInspectorDynamicField, GuiInspectorDynamicGroup, GuiInspectorDatablockField, GuiInspectorTypeEnum, GuiInspectorTypeCheckBox, GuiInspectorTypeGuiProfile, GuiInspectorTypeFileName, GuiInspectorTypeColor, GuiInspectorTypeColorI, GuiInspectorTypeColorF, GuiMenuBackgroundCtrl, GuiSubmenuBackgroundCtrl, GuiMenuTextListCtrl, GuiMenuBar, GuiAviBitmapCtrl, GuiMessageVectorCtrl, GuiProgressCtrl, GuiEffectCanvas, GuiTheoraCtrl, GuiTickCtrl, GuiBubbleTextCtrl, GuiInputCtrl, GuiMouseEventCtrl, GuiVectorFieldCtrl, DInputManager, UInputManager, NetConnection, and Path.
Constructor & Destructor Documentation
Member Function Documentation
Reimplemented in GuiStackControl.
Called when the object is removed from the sim.
Reimplemented from SimObject. Reimplemented in SimGroup, GameConnection, GuiTabBookCtrl, GuiTextListCtrl, GuiControl, GuiMessageVectorCtrl, GuiVectorFieldCtrl, DInputManager, UInputManager, NetConnection, and Path. Called when a SimObject is deleted. When you are on the notification list for another object and it is deleted, this method is called. Reimplemented from SimObject. Reimplemented in TerrainEditor, DInputManager, and UInputManager. Add an object to the set.
Reimplemented in SimGroup, GuiFrameSetCtrl, GuiScrollCtrl, GuiStackControl, GuiControl, and Path. Remove an object from the set.
Reimplemented in SimGroup, GuiFrameSetCtrl, GuiStackControl, GuiControl, and Path. Add object to end of list. It will force the object to the end of the list if it already exists in the list.
Remove an object from the end of the list.
Output the TorqueScript to recreate this object. This calls writeFields internally.
Reimplemented from SimObject. Reimplemented in GuiControl.
Field Documentation
|