VR-Exchange 2.1 API Documentation
pBoomInter.h
Go to the documentation of this file.
1 /*********************************************************************
2  ** Copyright (c) 2005 VT MAK
3  *********************************************************************/
4 #pragma once
5 
6 #include <portal/pInteraction.h>
7 #include <vlutil/vlString.h>
8 #include <vlutil/vlNetTypes.h>
9 #include <matrix/vlVector.h>
10 
13 
14 namespace MAKVrExchange {
15 class DtPortalConnection;
16 }
17 
18 // \brief Represents a weapon fire event.
19 //
20 // DtPortalBoomInteraction represents a noise that sounds like "Boom". This example is
21 // very simple and silly, but is intended to show users to how to create portal Interaction
22 // messages.
24 {
25 public:
26 
27  typedef void (*DtPortalBoomInteractionCb)
28  (const DtPortalBoomInteraction &inter, void *usr);
29 
30 public:
31 
32  // The default CTOR
34 
35  // The default DTOR
36  virtual ~DtPortalBoomInteraction();
37 
38  // The Volume of the Boom. Valid range is 0->10 with 10 being very loud.
39  DtDEC_ATTRIBUTE(DtU32, Volume, volume);
40 
41  // Answers the question, did the ground move?
42  DtDEC_ATTRIBUTE(bool, GroundMovement, groundMovement);
43 
44 public:
45 
47  virtual const char * interactionKindName() const { return "Boom"; }
48 
49  virtual unsigned int netSize() const;
50  virtual void writeSelfToBuffer(void *buffer) const ;
51  virtual void readSelfFromBuffer(const void *buffer);
52  virtual std::ostream &printDataToStream(std::ostream &str) const;
53 
54 
55 public:
56 
58 
59  static DtPortalMessage *create();
60 
62  DtPortalBoomInteractionCb cb, void *usr);
64  DtPortalBoomInteractionCb cb, void *usr);
65 
66 };
67 
68 

Document ID: Generated on Tue Aug 7 22:07:13 EDT 2012 from SVN revision 117874
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)