VR-Exchange 2.2 API Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
examples
modPortalApp
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.
23
class
DtPortalBoomInteraction
:
public
MAKVrExchange::DtPortalInteraction
24
{
25
public
:
26
27
typedef
void (*
DtPortalBoomInteractionCb
)
28
(
const
DtPortalBoomInteraction
&inter,
void
*usr);
29
30
public
:
31
32
// The default CTOR
33
DtPortalBoomInteraction
();
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
46
virtual
MAKVrExchange::DtPortalMessageKind
kind
()
const
;
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
57
static
const
MAKVrExchange::DtPortalMessageKind
theKind
;
58
59
static
DtPortalMessage
*
create
();
60
61
static
void
addCallback
(
MAKVrExchange::DtPortalConnection
*conn,
62
DtPortalBoomInteractionCb
cb,
void
*usr);
63
static
void
removeCallback
(
MAKVrExchange::DtPortalConnection
*conn,
64
DtPortalBoomInteractionCb
cb,
void
*usr);
65
66
};
67
68
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
)