VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ddmFedAmb13.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2009 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 #pragma once
6 
7 #if DtHLA
8 #if !DtHLA_1516
9 
11 
12 class DtDdmFederateAmbassador : public DtVrlFederateAmbassador
13 {
14 public:
15  struct DtRegionInfo
16  {
17  unsigned long lowerXBound;
18  unsigned long lowerYBound;
19  unsigned long upperXBound;
20  unsigned long upperYBound;
21  bool infoSet;
22  };
23 
24  DtDdmFederateAmbassador();
25 
26  virtual ~DtDdmFederateAmbassador() throw();
27 
28  // Override adds the handle and an empty "region info" to the map
29  virtual void discoverObjectInstance(
30  RTI::ObjectHandle theObject,
31  RTI::ObjectClassHandle theObjectClass,
32  const char* theObjectName )
33  throw( RTI::CouldNotDiscover,
34  RTI::ObjectClassNotKnown,
35  RTI::FederateInternalError );
36 
37  // Override gets the region information and sets it in the map
38  virtual void reflectAttributeValues(
39  RTI::ObjectHandle theObject,
40  const RTI::AttributeHandleValuePairSet& theAttributes,
41  const char* theTag )
42  throw( RTI::ObjectNotKnown,
43  RTI::AttributeNotKnown,
44  RTI::FederateOwnsAttributes,
45  RTI::FederateInternalError);
46 
47  // Override removes the handle from the map
48  virtual void removeObjectInstance(
49  RTI::ObjectHandle theObject,
50  const char* theTag )
51  throw( RTI::ObjectNotKnown,
52  RTI::FederateInternalError );
53 
54  virtual void receiveInteraction(
55  RTI::InteractionClassHandle theInteraction,
56  const RTI::ParameterHandleValuePairSet& theParameters,
57  const char* theTag )
58  throw( RTI::InteractionClassNotKnown,
59  RTI::InteractionParameterNotKnown,
60  RTI::FederateInternalError );
61 
62  static DtVrlFederateAmbassador* create();
63 
64  virtual void setXHandle(RTI::DimensionHandle handle);
65  virtual void setYHandle(RTI::DimensionHandle handle);
66 
67  virtual DtRegionInfo regionInfoForObject(RTI::ObjectHandle handle) const;
68  virtual DtRegionInfo lastInteractionRegion() const;
69 
70  virtual void clearLastInteractionRegion();
71 
72 protected:
73  std::map<RTI::ObjectHandle, DtRegionInfo> myHandleToRegionMap;
74  DtRegionInfo myLastInteractionRegion;
75 
76  RTI::DimensionHandle myXHandle;
77  RTI::DimensionHandle myYHandle;
78 
79  DtRegionInfo myEmptyRegionInfo;
80 };
81 
82 #endif // DtHLA
83 #endif // !DtHLA_1516
84 
This file declares the class DtVrlFederateAmbassador for HLA 1.3.

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)