![]() |
VR-Forces Developer's Guide
|
This class handles all the processing of CIGI Symbol Messages. CIGI Symbols require no responses so there is no responder class. CIGI Signals are caught here and processed in a thread safe manner. This handler has access to the render thread. Unlike other CIGI packets, symbols do not have enabled/in use flags for their packet fields, a user must fill all the fields in the packet. If the host does not set a scale in the symbol control, CCL will set that packet with a scale of 0.0, and it will not render here. From the CIGI standard: Once a Symbol Line Definition packet describing a circle symbol is sent to the IG, that symbol’s type may not be changed.If a Symbol Text Definition, Symbol Circle Definition, or Symbol Clone packet is received specifying the same Symbol ID but a different type, then the existing circle symbol will be destroyed along with any children and a new symbol will be created using the new definition packet. When the IG creates a new symbol, that symbol shall always be hidden by default.The symbol shall not be made visible until the Host sends a Symbol Control packet and sets the Symbol State parameter set to Visible( 1 ).
Classes | |
| struct | Circle |
| struct | CircleDefinition |
| struct | PolygonDefinition |
| struct | SymbolControl |
| struct | SymbolSurfaceDefinition |
| struct | TextDefinition |
| struct | Vertex |
Public Types | |
| enum | SymbolState { Hidden = 0, Visible, Destroyed } |
| enum | SurfaceState { SurfaceActive = 0, SurfaceDestroyed } |
| enum | PrimitiveType { Point = 0, Line, LineStrip, LineLoop, Triangle, TriangleStrip, TriangleFan } |
| typedef boost::bimap< unsigned int, DtWindowObjectAgent * > | DtSymbolMap |
| typedef boost::bimap< unsigned int, DtWindowObjectAgent * > | DtSurfaceMap |
| typedef std::map< unsigned int, std::vector < DtWindowObjectAgent * > > | DtGroupedAgentMap |
Public Member Functions | |
| virtual | ~DtCigiSymbolHandler () |
| virtual void | reset () |
| DtCigiSymbolHandler ()=delete | |
| DtCigiSymbolHandler (DtCigiSymbolHandler &)=delete | |
| DtCigiSymbolHandler (DtCigiSymbolHandler &&)=delete | |
| DtCigiSymbolHandler & | operator= (DtCigiSymbolHandler &)=delete |
| DtCigiSymbolHandler & | operator= (DtCigiSymbolHandler &&)=delete |
Protected Member Functions | |
| DtCigiSymbolHandler (DtDe &de, DtCigiConnection &connection) | |
| virtual void | slot_onEntityDeleted (int entityID) |
| virtual void | slot_setChannelOnChildFromSurface () |
| virtual void | setChannelOnChildFromSurface () |
| virtual void | slot_onSymbolControlReceived (CigiBaseSymbolCtrl &packet) |
| virtual void | slot_onSymbolSurfaceDefinitionReceived (CigiBaseSymbolSurfaceDef &packet) |
| virtual void | slot_onSymbolPolygonDefinitionReceived (CigiBaseSymbolLineDef &packet) |
| virtual void | slot_onSymbolLineDefinitionReceived (CigiBaseSymbolLineDef &packet) |
| virtual void | slot_onSymbolTextDefinitionReceived (CigiBaseSymbolTextDef &packet) |
| virtual void | slot_onSymbolCircleDefinitionReceived (CigiBaseSymbolCircleDef &packet) |
| virtual void | performSymbolControl (const SymbolControl &symbolControl) |
| virtual void | performSymbolSurfaceDefinition (const SymbolSurfaceDefinition &surfaceDefinition) |
| virtual void | performPolygonDefinition (const PolygonDefinition &polygonDefinition) |
| virtual void | performTextDefinition (const TextDefinition &textDefinition) |
| virtual void | performCircleDefinition (const CircleDefinition &circleDefinition) |
| virtual DtWindowObjectAgent * | findWindowObjectAgent (unsigned int symbolId) |
| virtual DtWindowObjectAgent * | findWindowObjectAgentFromUniqueId (DtUniqueID uniqueId) |
| virtual void | createPolygon (const PolygonDefinition &polygonDefinition) |
| virtual void | createTextObject (const TextDefinition &textDefinition) |
| virtual void | deleteWindowObjectAndChildren (unsigned int symbolId) |
| virtual void | deleteSurfaceAndChildren (unsigned int surfaceId) |
| virtual void | deleteEntityAttachedSurfaceAndChildren (int entityID) |
Protected Attributes | |
| std::vector< std::pair < unsigned int, unsigned int > > | mySetSurfaceChannelOnSymbolVector |
| DtDe & | myDe |
| DtCigiConnection & | myConnection |
| DtSymbolMap | mySymbolMap |
| DtSurfaceMap | mySurfaceMap |
| DtSignalConnectionManager | mySignalConnections |
| vrvSignalsLib::connection | myPostTickConnection |
| std::multimap< unsigned int, unsigned int > | myEntityIdToSurfaceIdMap |
| std::map< unsigned int, unsigned int > | mySurfaceIdToEntityIdMap |
Friends | |
| class | DtCigiSymbolHandlerCreator |
| typedef boost::bimap<unsigned int, DtWindowObjectAgent*> makVrv::DtCigiSymbolHandler::DtSymbolMap |
Typedef map to store the symbols. Key is Symbol ID.
| typedef boost::bimap<unsigned int, DtWindowObjectAgent*> makVrv::DtCigiSymbolHandler::DtSurfaceMap |
Typedef map to store the surfaces. Key is surface ID.
| typedef std::map<unsigned int, std::vector<DtWindowObjectAgent*> > makVrv::DtCigiSymbolHandler::DtGroupedAgentMap |
Typedef to store grouped object agents An ellipse group can have X number of agents associated with it. Key is symbol ID.
|
virtual |
DTOR.
|
protected |
CTOR.
|
delete |
Not allowed.
|
delete |
Not allowed.
|
delete |
Not allowed.
|
virtual |
Reset the internal containers when the CIGI connection is reset via IGMode reset Symbol containers are all render thread access, when the CIGI connection is running in its own thread, calling this method from the connection thread requires queuing it on the driver.
|
protectedvirtual |
Connection thread only methods.
This slot gets called when signal_symbolControlReceived() is raised as CIGI Symbol COntrol packets arrive. Repackages CCL CigiBaseSymbolCtrl as a SymbolControl() struct, and calls performSymbolControl in a thread safe manner.
|
protectedvirtual |
This slot gets called when slot_onSymbolSurfaceDefinitionReceived is raised as CIGI Surface Definition packets arrive. Repackages CCL CigiBaseSymbolSurfaceDef as a SymbolSurfaceDefinition() struct, and calls performSymbolSurfaceDefinition in a thread safe manner. When the surface is attached to an entity, the upper 4 bits of entity ID field are used for the view ID.
|
protectedvirtual |
This slot gets called when a Symbol Polygon Definition packet is received. It is bound to signal_symbolPolygonDefinitionReceived. Polygons are CIGI V4 only, for version 3 line is used, though they both use the same base CigiBaseSymbolLineDef packet. All of the information required to process Polygon definitions are contained within the base packet, this method repackages the information into a PolygonDefinition. This is passed to performPolygonDefinition() in a thread safe manner.
|
protectedvirtual |
This slot gets called when a Symbol Line Definition packet is received. It is bound to signal_symbolLineDefinitionReceived. Line definitions are CIGI V3 only, for version 4 polygon is used, though they both use the same base CigiBaseSymbolLineDef packet. All of the information required to process Polygon definitions are contained within the base packet, this method repackages the information into a PolygonDefinition. This is passed to performPolygonDefinition() in a thread safe manner.
|
protectedvirtual |
This slot gets called when a Symbol Text Definition packet is received. It repackages the CCL packet into a TextDefinition, and passes it to performTextDefinition() in a thread safe manner. We do not support orientation.
|
protectedvirtual |
This slot gets called when a Symbol Circle Definition packet is received. It repackages the CCL packet into a CircleDefinition, and passes it to performCircleDefinition() in a thread safe manner. We support this entire packet bar stipple pattern length.
|
protectedvirtual |
The following group of methods will execute in the render thread when the CIGI connection is running a separate thread.
Performs a symbol control in line with the CIGI standard. If a user sets a symbol to HIDDEN, they MUST set a color when setting the visibility back to visible.
|
protectedvirtual |
Creates a DtWindowSurface in line with the CIGI standard. The surface can set on specific channels, a user can specify the ViewID associated with the cigiView# keyword. When the surface is attached to an entity, the upper 4 bits of entity ID field are used for the view ID. We only support attaching an entity in a billboard fashion, there are no 3D symbols.
|
protectedvirtual |
Performs the polygon definition in line with the CIGI stanard. If the symbol ID does not exist, createPolygon() is called. Otherwise, the line/polygon is updated if the symbol ID in the definition is assocaited with a line/polygon. If the ID is is a symbol of a different type, that symbol, it's children are deleted, and a new line/polygon is created.
|
protectedvirtual |
Performs the text definition in line with the CIGI standard. Modifies the symbol with the matching ID, or creates a new symbol if none exists or the type is different by calling createTextObject(). We do not support orientation.
|
protectedvirtual |
Performs the circle definition in line with the CIGI standard. Modifies the symbol with the matching ID, or creates a new symbol if none exists or the type is different. Creates DtWindowEllipseAgents.
|
protectedvirtual |
Attempts to find the DtWindowObjectAgent associated with the passed in symbol ID. First it gets the unique ID from the DtSymbolMap(), if it exists, then finds the agent. Returns 0 otherwise.
|
protectedvirtual |
The following group of methods will execute in the render thread when the CIGI connection is running a separate thread.
Performs a symbol control in line with the CIGI standard. If a user sets a symbol to HIDDEN, they MUST set a color when setting the visibility back to visible.
|
protectedvirtual |
Creates a new DtWindowLineAgent or DtWindowPolygonAgent from the passed in polygon definition, the agent is stored in the DtSymbolMap()
|
protectedvirtual |
Creates a new DtWindowTextAgent from the pass in text definition, the agent is stored in the DtSymbolMap()
|
protectedvirtual |
Delete the window object and all of it's children.
|
protectedvirtual |
Delete surface and all of it's children Needed as surfaces are stored separately under their IDs.
|
protectedvirtual |
Delete surface and all of it's children Needed as surfaces attached to entitys are stored separately in a map with entity IDs.
|
protectedvirtual |
When an entity is deleted this slot is called which calls deleteEntityAttachedSurfaceAndChildren in a thread safe manner. Connection thread only.
|
protectedvirtual |
This slot is connected to the postTick signal, it calls setChannelOnChildFromSurface in a thread safe manner. Processes any pairs in mySetSurfaceChannelOnSymbolVector setting the surfaces channel on the symbols Connection thread only.
|
protectedvirtual |
Finds the symbol and the surface, sets the surfaces channel on the symbol if they are different. This method runs in the render thread when multithreading is on.
|
delete |
Not allowed.
|
delete |
Not allowed.
|
friend |
|
protected |
Used in performSymbolControl if the surface and/or the symbol have not been created yet and they require a channel change, they are stored here until the next tick when they have been created and can be moved channels. Pair is <surfaceID,symbolId> This vector is accessed in the render thread. Do not access it in the CIGI thread if multithreading is on.
|
protected |
|
protected |
|
protected |
This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is on.
|
protected |
This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is on.
|
protected |
These are separate because when entities get deleted we need to remove the surface and all the symbols, a CIGI entity has no knowledge of a surface ID. This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is on.
|
protected |
These are separate because when entities get deleted we need to remove the surface and all the symbols, a CIGI entity has no knowledge of a surface ID. This map is accessed in the render thread. Do not access it in the CIGI thread if multithreading is on.
|
protected |
|
protected |