Avionics
Dropship Simulator
Waypoint.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Vehicle.h
"
4
5
6
7
class
Waypoint
8
{
9
private
:
10
Vehicle
*
referenceVehicle
=
nullptr
;
11
12
public
:
13
enum
WaypointType
14
{
15
FlyoverFix
,
16
FinalApproachFix
,
17
TouchdownZone
18
};
19
20
std::string
FixId
;
21
WaypointType
type
=
FlyoverFix
;
22
D3DXVECTOR3
relativeLocation
;
23
D3DXVECTOR3
absoluteLocation
()
const
24
{
25
// rotate based on orientation
26
D3DXMATRIX mOrient;
27
D3DXMatrixRotationQuaternion(&mOrient, &
referenceVehicle
->
orientation
);
28
mOrient =
referenceVehicle
->
mBaseOrient
* mOrient;
29
D3DXVECTOR3 transformedLocation;
30
D3DXVec3TransformCoord(&transformedLocation, &
relativeLocation
, &mOrient);
31
return
transformedLocation +
referenceVehicle
->
location
;
32
}
33
34
Waypoint
(
Vehicle
* prmReference)
35
{
36
referenceVehicle
= prmReference;
37
}
38
};
Waypoint::absoluteLocation
D3DXVECTOR3 absoluteLocation() const
Definition:
Waypoint.h:23
Vehicle.h
Waypoint::WaypointType
WaypointType
Definition:
Waypoint.h:13
Waypoint::type
WaypointType type
Definition:
Waypoint.h:21
Vehicle::location
D3DXVECTOR3 location
Definition:
Vehicle.h:16
Waypoint::TouchdownZone
Definition:
Waypoint.h:17
Vehicle::mBaseOrient
D3DXMATRIX mBaseOrient
Definition:
Vehicle.h:18
Waypoint::relativeLocation
D3DXVECTOR3 relativeLocation
Definition:
Waypoint.h:22
Waypoint
Definition:
Waypoint.h:7
Waypoint::referenceVehicle
Vehicle * referenceVehicle
Definition:
Waypoint.h:10
Waypoint::FixId
std::string FixId
Definition:
Waypoint.h:20
Waypoint::FlyoverFix
Definition:
Waypoint.h:15
Waypoint::FinalApproachFix
Definition:
Waypoint.h:16
Waypoint::Waypoint
Waypoint(Vehicle *prmReference)
Definition:
Waypoint.h:34
Vehicle::orientation
D3DXQUATERNION orientation
Definition:
Vehicle.h:17
Vehicle
Definition:
Vehicle.h:6
Waypoint.h
Generated on Sat Feb 13 2021 09:30:44 for Avionics by
1.8.14