VR-Exchange 2.5 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pViewControlInter.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/pInteraction.h>
13 #include <vlutil/vlNetTypes.h>
14 #include <vlutil/vlString.h>
15 #include <matrix/vlVector.h>
16 
17 #define DtDEC_ATTRIBUTE_PRESENT(T, N, n) \
18  public : \
19  void set##N(const T& val) { my##N = val; long long shiftNum = (1ull << DtVC##N); myOptionPresent = myOptionPresent | shiftNum; }\
20  const T& n() const { return my##N;} \
21  T& n() { return my##N;} \
22  protected: \
23  T my##N;
24 
25 #define DtDEC_ATTRIBUTE_PRESENT2(T, N, n) \
26  public : \
27  void set##N(const T& val) { my##N = val; long long shiftNum = (1ul << DtVC##N); myOptionPresent2 = myOptionPresent2 | shiftNum; }\
28  const T& n() const { return my##N;} \
29  T& n() { return my##N;} \
30  protected: \
31  T my##N;
32 
33 namespace MAKVrExchange
34 {
35 
36  class DtPortalConnection;
37 
39  {
103  };
104 
106  {
111  };
112 
118  : public DtPortalInteraction
119  {
120  public:
121 
122  typedef void (*DtPortalViewControlInteractionCb) (
123  const DtPortalViewControlInteraction& inter, void* usr );
124 
127 
130 
131  virtual bool contains( DtViewControlOption opt ) const;
132  virtual bool contains( DtViewControlOption2 opt ) const;
133 
135  static void addCallback( DtPortalConnection* conn,
136  DtPortalViewControlInteractionCb cb, void* usr );
137 
139  static void removeCallback( DtPortalConnection* conn,
140  DtPortalViewControlInteractionCb cb, void* usr );
141 
144 
146  DtDEC_ATTRIBUTE(DtString, ViewerId, viewerId);
147 
149  DtDEC_ATTRIBUTE(DtString, SenderId, senderId);
150 
152  DtDEC_ATTRIBUTE(DtU32, ViewerCommand, viewerCommand);
153 
155  DtDEC_ATTRIBUTE(DtU32, IgnoreFlag, ignoreFlag);
156 
158  DtDEC_ATTRIBUTE(DtBoolean, StatusCommand, statusCommand);
159 
162  DtDEC_ATTRIBUTE(DtString, ViewString, viewString);
163 
166  DtDEC_ATTRIBUTE(std::vector<DtString>, ObjectIds, objectIds);
167 
168  DtDEC_ATTRIBUTE(DtU64, OptionPresent, optionPresent);
169  DtDEC_ATTRIBUTE(DtU64, OptionPresent2, optionPresent2);
170 
172  DtDEC_ATTRIBUTE_PRESENT(DtU32, OverlayOption, overlayOption);
173  DtDEC_ATTRIBUTE_PRESENT(double, LocatorRange, locatorRange);
174  DtDEC_ATTRIBUTE_PRESENT(DtU32, Smoothing, smoothing);
175  DtDEC_ATTRIBUTE_PRESENT(double, SmoothingPeriod, smoothingPeriod);
176  DtDEC_ATTRIBUTE_PRESENT(bool, Sound, sound);
177  DtDEC_ATTRIBUTE_PRESENT(bool, EntityLabels, entityLabels);
178  DtDEC_ATTRIBUTE_PRESENT(bool, TrailingEffects, trailingEffects);
179  DtDEC_ATTRIBUTE_PRESENT(bool, TrajectoryHistory, trajectoryHistory);
180  DtDEC_ATTRIBUTE_PRESENT(bool, Recording, recording);
181  DtDEC_ATTRIBUTE_PRESENT(DtU32, AggregateLevel, aggregateLevel);
182  DtDEC_ATTRIBUTE_PRESENT(bool, AggregateHighestOnly, aggregateHighestOnly);
183  DtDEC_ATTRIBUTE_PRESENT(bool, AggregatesAltitudeControlled, aggregatesAltitudeControlled);
184  DtDEC_ATTRIBUTE_PRESENT(bool, NestedAggregates, nestedAggregates);
185  DtDEC_ATTRIBUTE_PRESENT(bool, NestedEntities, nestedEntities);
186  DtDEC_ATTRIBUTE_PRESENT(bool, GroundClamping, groundClamping);
187  DtDEC_ATTRIBUTE_PRESENT(double, ClampRange, clampRange);
188  DtDEC_ATTRIBUTE_PRESENT(bool, FollowGround, followGround);
189  DtDEC_ATTRIBUTE_PRESENT(bool, ConstrainWithFloor, constrainWithFloor);
190  DtDEC_ATTRIBUTE_PRESENT(double, Floor, floor);
191  DtDEC_ATTRIBUTE_PRESENT(double, TimeOfDay, timeOfDay);
192  DtDEC_ATTRIBUTE_PRESENT(double, NearClip, nearClip);
193  DtDEC_ATTRIBUTE_PRESENT(double, FarClip, farClip);
194  DtDEC_ATTRIBUTE_PRESENT(double, Fov, fov);
195  DtDEC_ATTRIBUTE_PRESENT(bool, Fog, fog);
196  DtDEC_ATTRIBUTE_PRESENT(double, NearFog, nearFog);
197  DtDEC_ATTRIBUTE_PRESENT(double, FarFog, farFog);
198  DtDEC_ATTRIBUTE_PRESENT(bool, Texture, texture);
199  DtDEC_ATTRIBUTE_PRESENT(DtString, DatabaseToLoad, databaseToLoad);
200  DtDEC_ATTRIBUTE_PRESENT(float, Stepsize, stepsize);
201  DtDEC_ATTRIBUTE_PRESENT(float, Turnrate, turnrate);
202  DtDEC_ATTRIBUTE_PRESENT(bool, IncrementStepsize, incrementStepsize);
203  DtDEC_ATTRIBUTE_PRESENT(bool, IncrementTurnrate, incrementTurnrate);
204  DtDEC_ATTRIBUTE_PRESENT(bool, DecrementStepsize, decrementStepsize);
205  DtDEC_ATTRIBUTE_PRESENT(bool, DecrementTurnrate, decrementTurnrate);
206  DtDEC_ATTRIBUTE_PRESENT(DtString, Date, date);
207  DtDEC_ATTRIBUTE_PRESENT(bool, Xr, xr);
208  DtDEC_ATTRIBUTE_PRESENT(bool, HatLabels, hatLabels);
209  DtDEC_ATTRIBUTE_PRESENT(DtString, CurrentModelSet, currentModelSet);
210  DtDEC_ATTRIBUTE_PRESENT(bool, ShowNextModelSet, showNextModelSet);
211  DtDEC_ATTRIBUTE_PRESENT(bool, ShowPrevModelSet, showPrevModelSet);
212  DtDEC_ATTRIBUTE_PRESENT(DtString, CurrentTextureSet, currentTextureSet);
213  DtDEC_ATTRIBUTE_PRESENT(bool, ShowNextTextureSet, showNextTextureSet);
214  DtDEC_ATTRIBUTE_PRESENT(bool, ShowPrevTextureSet, showPrevTextureSet);
215  DtDEC_ATTRIBUTE_PRESENT(double, TerrainScale, terrainScale);
216  DtDEC_ATTRIBUTE_PRESENT(double, ObjectScale, objectScale);
217  DtDEC_ATTRIBUTE_PRESENT(bool, Exit, exit);
218  DtDEC_ATTRIBUTE_PRESENT(bool, SkyDome, skyDome);
219  DtDEC_ATTRIBUTE_PRESENT(bool, Clouds, clouds);
220  DtDEC_ATTRIBUTE_PRESENT(bool, Mirroring, mirroring);
221  DtDEC_ATTRIBUTE_PRESENT(bool, MirrorMessageEveryFrame, mirrorMessageEveryFrame);
222  DtDEC_ATTRIBUTE_PRESENT(bool, Broadcasting, broadcasting);
223  DtDEC_ATTRIBUTE_PRESENT(bool, ClusteringLabels, clusteringLabels);
224  DtDEC_ATTRIBUTE_PRESENT(bool, TacticalGraphicsLabels, tacticalGraphicsLabels);
225  DtDEC_ATTRIBUTE_PRESENT(bool, TacticalGraphics, tacticalGraphics);
226  DtDEC_ATTRIBUTE_PRESENT(bool, ShowAggregates, showAggregates);
227  DtDEC_ATTRIBUTE_PRESENT(bool, ShowEmitters, showEmitters);
228  DtDEC_ATTRIBUTE_PRESENT(DtU32, VideoCaptureCommand, videoCaptureCommand);
229  DtDEC_ATTRIBUTE_PRESENT(bool, VideoCaptureRecordInsets, videoCaptureRecordInsets);
230  DtDEC_ATTRIBUTE_PRESENT(DtU32, VideoCaptureFramesPerSecond, videoCaptureFramesPerSecond);
231  DtDEC_ATTRIBUTE_PRESENT(DtString, VideoCaptureFilename, videoCaptureFilename);
232  DtDEC_ATTRIBUTE_PRESENT(DtString, VideoCaptureFilenameBase, videoCaptureFilenameBase);
233  DtDEC_ATTRIBUTE_PRESENT(DtString, VideoCaptureDirectory, videoCaptureDirectory);
234  DtDEC_ATTRIBUTE_PRESENT(bool, ConstrainedToAll, constrainedToAll);
235 
236  DtDEC_ATTRIBUTE_PRESENT2(double, BlockedDistance, blockedDistance);
237  DtDEC_ATTRIBUTE_PRESENT2(bool, UseNearClipForBlockedDistance, useNearClipForBlockedDistance);
238  DtDEC_ATTRIBUTE_PRESENT2(DtU32, FeatureCommand, featureCommand);
239  DtDEC_ATTRIBUTE_PRESENT2(DtString, FeatureFilename, featureFilename);
241 
243  public:
244 
246 
247  static DtPortalMessage* create();
248 
249  virtual unsigned int netSize() const;
250  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
251  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
252 
253  virtual std::ostream& printDataToStream( std::ostream& str ) const;
254 
255  };
256 
257 
259  {
260  return new DtPortalViewControlInteraction();
261  }
262 
263 }

Document ID: Generated on Wed Dec 21 15:05:11 EST 2016 from SVN revision 171891
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)