FlightGear next
AIWakeGroup.hxx
Go to the documentation of this file.
1// AIWakeGroup.hxx -- Group of AI wake meshes for the computation of the induced
2// wake.
3//
4// Written by Bertrand Coconnier, started April 2017.
5//
6// Copyright (C) 2017 Bertrand Coconnier - bcoconni@users.sf.net
7//
8// This program is free software; you can redistribute it and/or modify it under
9// the terms of the GNU General Public License as published by the Free Software
10// Foundation; either version 2 of the License, or (at your option) any later
11// version.
12//
13// This program is distributed in the hope that it will be useful, but WITHOUT
14// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
16// details.
17//
18// You should have received a copy of the GNU General Public License along with
19// this program; if not, write to the Free Software Foundation, Inc., 51
20// Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21//
22// $Id$
23
24#ifndef _FG_AIWAKEGROUP_HXX
25#define _FG_AIWAKEGROUP_HXX
26
27#include <simgear/props/propsfwd.hxx>
28
30
31namespace FGTestApi { namespace PrivateAccessor { namespace FDM { class Accessor; } } }
32class FGAIAircraft;
33
36
37 struct AIWakeData {
38 explicit AIWakeData(WakeMesh* m = nullptr) : mesh(m) {}
39
40 SGVec3d position {SGVec3d::zeros()};
41 SGQuatd Te2b {SGQuatd::unit()};
42 bool visited {false};
43 WakeMesh_ptr mesh;
44 };
45
46 std::map<int, AIWakeData> _aiWakeData;
47 SGPropertyNode_ptr _density_slugft;
48
49public:
50 AIWakeGroup(void);
51 void AddAI(FGAIAircraft* ai);
52 SGVec3d getInducedVelocityAt(const SGVec3d& pt) const;
53 // Garbage collection
54 void gc(void);
55};
56
57#endif
SGSharedPtr< WakeMesh > WakeMesh_ptr
Definition WakeMesh.hxx:49
AIWakeGroup(void)
void gc(void)
void AddAI(FGAIAircraft *ai)
SGVec3d getInducedVelocityAt(const SGVec3d &pt) const
friend class FGTestApi::PrivateAccessor::FDM::Accessor