WebLVC 1.8 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pBoomInter.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
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 namespace MAKVrExchange
18 {
19  class DtPortalConnection;
20 }
21 
28 {
29 public:
30 
31  typedef void (*DtPortalBoomInteractionCb) (
32  const DtPortalBoomInteraction& inter, void* usr );
33 
34 public:
35 
38 
40  virtual ~DtPortalBoomInteraction();
41 
44  DtPortalBoomInteractionCb cb, void* usr );
45 
48  DtPortalBoomInteractionCb cb, void* usr );
49 
52 
53  // The Volume of the Boom. Valid range is 0->10 with 10 being very loud.
54  DtDEC_ATTRIBUTE( DtU32, Volume, volume );
55 
56  // Answers the question, did the ground move?
57  DtDEC_ATTRIBUTE( bool, GroundMovement, groundMovement );
58 
60 
62 public:
63 
65 
66  static DtPortalMessage* create();
67 
68  virtual unsigned int netSize() const;
69  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const ;
70  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
71 
72  virtual std::ostream& printDataToStream( std::ostream& str ) const;
73 
74 };
75 
76 
78 {
79  return new DtPortalBoomInteraction();
80 }
virtual void writeSelfToBuffer(void *buffer, int bufferSize) const
Writes this message into the memory buffer provided by buffer.
static void removeCallback(MAKVrExchange::DtPortalConnection *conn, DtPortalBoomInteractionCb cb, void *usr)
Removes the callback for when interactions are received.
The base class for all messages passed through the portal.
Definition: pMessage.h:66
Contains the DtPortalInteraction class declaration.
virtual std::ostream & printDataToStream(std::ostream &str) const
Prints the current state of this message to the stream specified by str.
DtDEC_ATTRIBUTE(DtU32, Volume, volume)
Represents a weapon fire event.
Definition: pBoomInter.h:27
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
virtual unsigned int netSize() const
NOTE: DtDEC_ATTRIBUTE resets the access specifier to protected.
virtual void readSelfFromBuffer(const void *buffer, int bufferSize)
Reads this message from the memory buffer into this object.
static const MAKVrExchange::DtPortalMessageKind theKind
NOTE: DtDEC_ATTRIBUTE resets the access specifier to protected.
Definition: pBoomInter.h:64
virtual ~DtPortalBoomInteraction()
Virtual DTOR.
void(* DtPortalBoomInteractionCb)(const DtPortalBoomInteraction &inter, void *usr)
Definition: pBoomInter.h:31
static void addCallback(MAKVrExchange::DtPortalConnection *conn, DtPortalBoomInteractionCb cb, void *usr)
Adds a callback to be called when interactions are received.
static DtPortalMessage * create()
Definition: pBoomInter.h:77
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
DtPortalMessage(DtPortalMessageKind kind)
CTOR.

Document ID: Generated on Wed Mar 12 15:05:17 EDT 2025 from SVN revision 274272
Copyright © 2005-2025 MAK Technologies. All Rights Reserved (www.mak.com)