VR-Exchange 2.2 API Documentation
tenaBroker/libTenaBroker/detInTrans.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "interactionTrans.h"
13 
14 class DtDetonationInteraction;
15 
16 namespace MAKVrExchange
17 {
18 
19  class DtPortalDetonationInteraction;
20 
21  namespace DtTenaBroker
22  {
23 
24  class DtTenaBroker;
25 
30  {
31  public:
32 
34  Dt_DEF_TRANSLATOR_NAME( "Detonation" );
35 
37 
39 
41  virtual void enableTranslator(bool enabled);
42 
59  virtual DtPortalDetonationInteraction* translate(
60  DtPortalDetonationInteraction* destination,
61  const DtDetonationInteraction& source );
62 
81  virtual DtDetonationInteraction* translate( DtDetonationInteraction* destination,
82  const DtPortalDetonationInteraction& source );
83 
84  protected:
85 
87  static const char thisTranslatorName[];
88 
89  void loadWarheadTypeMappingFile();
90  void loadDetonatinResultMappingFile();
91 
92  virtual void createTenaInteraction( const DtPortalDetonationInteraction& incoming );
93 
94  virtual void createPortalInteraction( const DtDetonationInteraction& incoming );
95 
96  virtual void generateFirePdu( const DtDetonationInteraction& incomding );
97 
100  virtual void remapDetonationResult( DtDetonationInteraction* incoming,
101  DtDetonationResult detonationType) const;
103  virtual void remapDetonationResult( DtPortalDetonationInteraction* outgoing,
104  DtU32 detonationType ) const;
105 
106  static void receiveTenaInteraction( DtDetonationInteraction* interaction, void* userData );
107 
108  static void receivePortalInteraction( const DtPortalDetonationInteraction& interaction, void* userData );
109 
110  private:
111 
114 
117 
119  int operator==( const DtDetonationInteractionTranslator& rightOperand ) const;
120 
122  int operator!=( const DtDetonationInteractionTranslator& rightOperand ) const;
123 
124  protected:
125 
126  std::map<unsigned int,unsigned int> myTenaToPortalWarheadMap;
127  std::map<unsigned int,unsigned int> myPortalToTenaWarheadMap;
128 
129  std::map<unsigned int, DtDetonationResult> myTenaToPortalResultMap;
130  std::map<DtDetonationResult, unsigned int> myPortalToTenaResultMap;
131 
132  };
133 
134  }
135 }

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)