VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvLocalMS
DtLocalMetadataPublisher.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2012 VT-MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
#pragma once
10
11
#include <
vrvLocalMS/vrvLocalMS.h
>
12
13
#include <
vrvVideoStream/DtMetadataPublisher.h
>
14
#include <
vrvVideoStream/DtMetadataElement.h
>
15
16
#include <matrix/vlVector.h>
17
18
namespace
makVrv
19
{
20
class
DtDe;
21
22
class
DT_DLL_VRVLOCALMS
DtLocalMetadataPublisher
:
public
DtMetadataPublisher
23
{
24
public
:
25
26
friend
class
DtLocalMetadataPublisherCreator
;
27
28
virtual
~
DtLocalMetadataPublisher
();
29
30
virtual
void
tick(
double
dt );
31
32
// Velocity of object attached to, if attached, in Database (local)
33
// coordinates
34
virtual
DtVector
attachedVelocity();
35
36
// Get the wind direction, from 0-360. Used by multiple elements
37
virtual
double
windDirection();
38
39
// Get the wind speed (m/s). Used by multiple elements
40
virtual
double
windSpeed();
41
43
44
45
46
virtual
bool
haveValidUpperLeftCorner()
const
;
47
virtual
bool
haveValidUpperRightCorner()
const
;
48
virtual
bool
haveValidLowerRightCorner()
const
;
49
virtual
bool
haveValidLowerLeftCorner()
const
;
51
53
54
55
virtual
DtVector
upperLeftCorner()
const
;
57
virtual
DtVector
upperRightCorner()
const
;
59
virtual
DtVector
lowerRightCorner()
const
;
61
virtual
DtVector
lowerLeftCorner()
const
;
63
protected
:
64
65
DtLocalMetadataPublisher
(
DtDe
& de,
const
DtVideoStream
& videoStream );
66
67
DtLocalMetadataPublisher
();
68
69
virtual
void
updateTargetCorners();
70
71
virtual
void
updateAttachedVelocity(
double
dt);
72
73
virtual
DtVector
calcLookAt(
double
hfov,
double
vfov );
74
75
virtual
void
getFieldsOfView(
double
& hfov,
double
& vfov );
76
77
unsigned
int
calcChecksum(
unsigned
char
* buffer,
unsigned
int
length);
78
79
void
setChecksum(
unsigned
char
* buffer,
unsigned
int
length,
unsigned
int
checksum);
80
81
protected
:
82
DtVector
myAttachedVelocity
;
83
DtVector
myAttachedLastPosition
;
84
double
myAttachedLastDt
;
85
86
bool
myValidUpperLeftCorner
;
87
bool
myValidUpperRightCorner
;
88
bool
myValidLowerRightCorner
;
89
bool
myValidLowerLeftCorner
;
90
DtVector
myUpperLeftCorner
;
// point 1 in standard
91
DtVector
myUpperRightCorner
;
// point 2 in standard
92
DtVector
myLowerRightCorner
;
// point 3 in standard
93
DtVector
myLowerLeftCorner
;
// point 4 in standard
94
};
95
96
class
DT_DLL_VRVLOCALMS
DtLocalMetadataPublisherCreator
:
public
DtMetadataPublisherCreator
97
{
98
public
:
99
DtLocalMetadataPublisherCreator
();
100
101
virtual
~
DtLocalMetadataPublisherCreator
();
102
103
virtual
DtMetadataPublisher
* create(
DtDe
& de,
const
DtVideoStream
& videoStream );
104
};
105
}
106
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)