VR-Vantage
Loading...
Searching...
No Matches
rfxOcclusionMessage.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 "export.h"
13#include "rfxMessage.h"
14
15#include <vlutil/vlString.h>
16#include <matrix/vlVector.h>
17
18namespace makRadarFx
19{
23{
24 public:
28
32 virtual void useObserverAsHost();
33
36 virtual void setOwnshipLocation(DtVector location);
37 virtual DtVector ownshipLocation();
38
41 virtual void setOwnshipEntityId(const std::string& name);
42 virtual std::string ownshipEntityId();
43
45 virtual bool isUsingObserverAsHost();
46 virtual bool isUsingEntityAsHost();
48
51 virtual void useObserverForTarget();
52
55 virtual void setTargetEntityId(const std::string& name);
56 virtual std::string targetEntityId();
57
60 virtual void setTargetLocation(DtVector location);
61 virtual DtVector targetLocation();
62
65 virtual bool isUsingEntityForTarget();
67
68
70 virtual int messageSize() const;
72 static DtBaseMessage* decode(unsigned char* buffer, int length);
74 virtual DtBaseMessage* clone();
75
76 protected:
77 virtual void serialize(DtStreamWriter& writer);
78 virtual void deserialize(DtStreamReader& reader);
79
86
87 std::string myOwnshipName;
88 std::string myTargetName;
91};
92
95{
96 public:
100
102 virtual void setOcclusion(bool occluded);
103 virtual bool occluded();
104
106 virtual int messageSize() const;
108 static DtBaseMessage* decode(unsigned char* buffer, int length);
111
112
113 protected:
114 virtual void serialize(DtStreamWriter& writer);
115 virtual void deserialize(DtStreamReader& reader);
116
118};
119}
120
DtBaseMessage(unsigned int messageType)
CTOR/DTOR.
virtual bool isUsingObserverAsHost()
functions to determine how to place the sensor
virtual void setOwnshipLocation(DtVector location)
if the ownship is not hosted in the simulation system, we can explicitly state where we want to perfo...
virtual DtVector ownshipLocation()
virtual void setTargetEntityId(const std::string &name)
If the ownship is the target of the sensor, we can use its global simulation name to look it up.
bool myUseObserverAsHost
Definition rfxOcclusionMessage.h:80
std::string myTargetName
Definition rfxOcclusionMessage.h:88
virtual std::string targetEntityId()
virtual bool isUsingAbsoluteLocation()
virtual void setOwnshipEntityId(const std::string &name)
If the ownship is hosted by the simulation system, we can use its global simulation name to look it u...
bool myUseEntityAsTarget
Definition rfxOcclusionMessage.h:84
virtual bool isUsingLocationForTarget()
std::string myOwnshipName
Definition rfxOcclusionMessage.h:87
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
bool myUseEntityAsHost
Definition rfxOcclusionMessage.h:81
virtual void useObserverForTarget()
calling this function causes the message to use the current observer's view to determine the target f...
bool myUseAbsoluteOwnship
Definition rfxOcclusionMessage.h:82
virtual bool isUsingObserverForTarget()
functions to determine how to place the target
virtual void serialize(DtStreamWriter &writer)
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
bool myUseAbsoluteTarget
Definition rfxOcclusionMessage.h:85
bool myUseObserverForTarget
Definition rfxOcclusionMessage.h:83
virtual DtVector targetLocation()
virtual std::string ownshipEntityId()
virtual int messageSize() const
size of the message
virtual bool isUsingEntityForTarget()
DtVector myOwnshipLocation
Definition rfxOcclusionMessage.h:89
virtual void setTargetLocation(DtVector location)
this is the target that we would like to look at. Location format is latitude/longitude/altitude (in ...
virtual void deserialize(DtStreamReader &reader)
DtVector myTargetLocation
Definition rfxOcclusionMessage.h:90
virtual void useObserverAsHost()
calling this function causes the message to use the current observer's position and orientation for t...
virtual bool isUsingEntityAsHost()
virtual int messageSize() const
size of the message
virtual void serialize(DtStreamWriter &writer)
virtual void deserialize(DtStreamReader &reader)
bool myOcclusion
Definition rfxOcclusionMessage.h:117
virtual void setOcclusion(bool occluded)
Returns whether or not the requesting platform has line of sight of the target location.
static DtBaseMessage * decode(unsigned char *buffer, int length)
decode a message. Used by the factory
virtual DtBaseMessage * clone()
clone a message. Caller of function is responsible managing this memory
Instances of DtStreamReader decode values from a byte array this assumes the data in the byte stream ...
Definition byteStream.h:28
Instances of DtStreamWriter encode values into a byte array this writes the data to the stream in lit...
Definition byteStream.h:75
#define RFX_DLL_SHARED
Definition include/radarFxShared/export.h:15
Definition radarFxConnector.h:28
Defines the base class for all messages that can be sent between the server and the client.