VR-Forces 4.0.4 Class Documentation
include/vrvVrl/DtVrlinkRadioCommLineVisualizer.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2012 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvVrl/vrvVrl.h>
00013 
00014 #include <vrvCore/DtRadioCommLineVisualizer.h>
00015 
00016 #include <vl/signalInter.h>
00017 
00018 #include <set>
00019 
00020 namespace makVrv
00021 {
00022 
00023    namespace DT_PROTOCOL_NAMESPACE
00024    {
00025 
00026       class DtEntityElement;
00027       class DtVrlinkConnection;
00028       class DtVrlinkEntityStateListener;
00029       class DtVrlinkRadioCommLineListener;
00030 
00034       class DL_DLL_IGCONVRLINK DtVrlinkRadioCommLineVisualizer
00035          : public DtRadioCommLineVisualizer
00036       {
00037       public:
00038 
00045          DtVrlinkRadioCommLineVisualizer( DtBaseConnection& sim,
00046             DtStateListener& communicationListener, int modelSet );
00047 
00050          virtual ~DtVrlinkRadioCommLineVisualizer();
00051 
00052       protected:
00053 
00057          virtual void createModelAgents();
00058 
00060          virtual void destroyModelAgents();
00061 
00065          virtual void slot_elementCreated( DtVrlinkEntityStateListener& listener,
00066             DtEntityElement* elem );
00067 
00071          virtual void slot_colorizationChanged();
00072 
00075          virtual void getCommLineColor( float& r, float& g, float& b );
00076 
00079          virtual DtVector getOffsetForEntityType( const DtEntityType& type );
00080 
00082          virtual void setVisualizerDefinition( const DtVisualizerDefinition& vDef );
00083 
00084       protected:
00085 
00089          struct EntityPair {
00090 
00092             EntityPair( DtGlobalObjectDesignator entity1,
00093                DtGlobalObjectDesignator entity2 );
00094 
00097             bool operator < ( const EntityPair& other ) const;
00098 
00099             DtGlobalObjectDesignator entity1;
00100             DtGlobalObjectDesignator entity2;
00101 
00102          };
00103 
00104       protected:
00105 
00107          typedef std::set<EntityPair> PendingCommLinesSet;
00108 
00109          PendingCommLinesSet myPendingCommLines;
00110 
00111          DtVrlinkConnection& myVrlConn;
00112 
00113          DtVrlinkRadioCommLineListener* myListener;
00114 
00115          DtVrlinkEntityStateListener* myReceivingEntityListener;
00116          DtVrlinkEntityStateListener* mySendingEntityListener;
00117 
00118          DtUniqueID myReceiverEntitySceneObjectId;
00119          DtUniqueID mySenderEntitySceneObjectId;
00120 
00121          bool myCustomAnimationRateFlag;
00122 
00123          float myAnimationRate;
00124          float myLifetime;
00125 
00126       };
00127 
00128 
00129       typedef DtStateVisualizerCreatorTemplate<DtVrlinkRadioCommLineVisualizer>
00130          DtVrlinkRadioCommLineVisualizerCreator;
00131    }
00132 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)