![]() |
VR-Forces 4.10 Class Documentation
|
This class handles all the processing of CIGI Symbol Messages. More...
Classes | |
| struct | Circle |
| Struct for storing a single circle Many circles can be associated with a single symbol id. More... | |
| struct | CircleDefinition |
| Struct for non-ccl circle definitions. More... | |
| struct | PolygonDefinition |
| Struct for non-ccl polygon and line packet storage. More... | |
| struct | SymbolControl |
| Struct for symbol control, used to reduce amount of code; CIGI base contains all the V3 & V4 information, no need for separate perform methods with this struct. More... | |
| struct | SymbolSurfaceDefinition |
| Struct for surface definition, used to reduce amount of code; CIGI base contains all the V3 & V4 information, no need for separate perform methods with this struct. More... | |
| struct | TextDefinition |
| Struct for non-ccl Text definition. More... | |
| struct | Vertex |
| Struct for a vertex. More... | |
Public Types | |
| enum | SymbolState { Hidden = 0, Visible, Destroyed } |
| If a user sets a symbol to HIDDEN, they MUST set a color when setting the visibility back to visible. More... | |
| enum | SurfaceState { SurfaceActive = 0, SurfaceDestroyed } |
| State of a surface. More... | |
| enum | PrimitiveType { Point = 0, Line, LineStrip, LineLoop, Triangle, TriangleStrip, TriangleFan } |
| Enum for polygon & line primitive types. More... | |
| typedef boost::bimap< unsigned int, DtWindowObjectAgent * > | DtSymbolMap |
| Typedef map to store the symbols. Key is Symbol ID. More... | |
| typedef boost::bimap< unsigned int, DtWindowObjectAgent * > | DtSurfaceMap |
| Typedef map to store the surfaces. Key is surface ID. More... | |
| typedef std::map< unsigned int, std::vector < DtWindowObjectAgent * > > | DtGroupedAgentMap |
| Typedef to store grouped object agents An ellipse group can have X number of agents associated with it. More... | |
Public Member Functions | |
| virtual | ~DtCigiSymbolHandler () |
| DTOR. More... | |
Protected Member Functions | |
| DtCigiSymbolHandler (DtDe &de, DtCigiConnection &connection) | |
| CTOR. More... | |
| virtual void | slot_onEntityDeleted (int entityID) |
| When an entity is deleted this slot is called which calls deleteEntityAttachedSurfaceAndChildren in a thread safe manner. More... | |
| virtual void | slot_setChannelOnChildFromSurface () |
| This slot is connected to the postTick signal, it calls setChannelOnChildFromSurface in a thread safe manner. More... | |
| virtual void | setChannelOnChildFromSurface () |
| Finds the symbol and the surface, sets the surfaces channel on the symbol if they are different. More... | |
| DtCigiSymbolHandler (const DtCigiSymbolHandler &orig) | |
| DtCigiSymbolHandler & | operator= (const DtCigiSymbolHandler &orig) |
| virtual void | slot_onSymbolControlReceived (CigiBaseSymbolCtrl &packet) |
| Connection thread only methods. More... | |
| virtual void | slot_onSymbolSurfaceDefinitionReceived (CigiBaseSymbolSurfaceDef &packet) |
| This slot gets called when slot_onSymbolSurfaceDefinitionReceived is raised as CIGI Surface Definition packets arrive. More... | |
| virtual void | slot_onSymbolPolygonDefinitionReceived (CigiBaseSymbolLineDef &packet) |
| This slot gets called when a Symbol Polygon Definition packet is received. More... | |
| virtual void | slot_onSymbolLineDefinitionReceived (CigiBaseSymbolLineDef &packet) |
| This slot gets called when a Symbol Line Definition packet is received. More... | |
| virtual void | slot_onSymbolTextDefinitionReceived (CigiBaseSymbolTextDef &packet) |
| This slot gets called when a Symbol Text Definition packet is received. More... | |
| virtual void | slot_onSymbolCircleDefinitionReceived (CigiBaseSymbolCircleDef &packet) |
| This slot gets called when a Symbol Circle Definition packet is received. More... | |
| virtual void | performSymbolControl (const SymbolControl &symbolControl) |
| The following group of methods will execute in the render thread when the CIGI connection is running a separate thread. More... | |
| virtual void | performSymbolSurfaceDefinition (const SymbolSurfaceDefinition &surfaceDefinition) |
| Creates a DtWindowSurface in line with the CIGI standard. More... | |
| virtual void | performPolygonDefinition (const PolygonDefinition &polygonDefinition) |
| Performs the polygon definition in line with the CIGI stanard. More... | |
| virtual void | performTextDefinition (const TextDefinition &textDefinition) |
| Performs the text definition in line with the CIGI standard. More... | |
| virtual void | performCircleDefinition (const CircleDefinition &circleDefinition) |
| Performs the circle definition in line with the CIGI standard. More... | |
| virtual DtWindowObjectAgent * | findWindowObjectAgent (unsigned int symbolId) |
| Attempts to find the DtWindowObjectAgent associated with the passed in symbol ID. More... | |
| virtual DtWindowObjectAgent * | findWindowObjectAgentFromUniqueId (DtUniqueID uniqueId) |
| virtual void | createPolygon (const PolygonDefinition &polygonDefinition) |
| Creates a new DtWindowLineAgent or DtWindowPolygonAgent from the passed in polygon definition, the agent is stored in the DtSymbolMap() More... | |
| virtual void | createTextObject (const TextDefinition &textDefinition) |
| Creates a new DtWindowTextAgent from the pass in text definition, the agent is stored in the DtSymbolMap() More... | |
| virtual void | deleteWindowObjectAndChildren (unsigned int symbolId) |
| Delete the window object and all of it's children. More... | |
| virtual void | deleteSurfaceAndChildren (unsigned int surfaceId) |
| Delete surface and all of it's children Needed as surfaces are stored separately under their IDs. More... | |
| virtual void | deleteEntityAttachedSurfaceAndChildren (int entityID) |
| Delete surface and all of it's children Needed as surfaces attached to entitys are stored separately in a map with entity IDs. More... | |
Protected Attributes | |
| std::vector< std::pair < unsigned int, unsigned int > > | mySetSurfaceChannelOnSymbolVector |
| 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. More... | |
| boost::signals2::connection | myPostTickConnection |
| DtDe & | myDe |
| DtCigiConnection & | myConnection |
| DtSymbolMap | mySymbolMap |
| This map is accessed in the render thread. More... | |
| DtSurfaceMap | mySurfaceMap |
| This map is accessed in the render thread. More... | |
| DtSignalConnectionManager | mySignalConnections |
| std::multimap< unsigned int, unsigned int > | myEntityIdToSurfaceIdMap |
| std::map< unsigned int, unsigned int > | mySurfaceIdToEntityIdMap |
Private Member Functions | |
| DtCigiSymbolHandler () | |
Friends | |
| class | DtCigiSymbolHandlerCreator |
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 ).
| 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.
|
private |
|
protected |
|
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 |
|
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.
|
protected |
|
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 |
|
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 |
|
protected |