forked from bridgecommand/bc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOtherShips.hpp
More file actions
60 lines (49 loc) · 2.52 KB
/
OtherShips.hpp
File metadata and controls
60 lines (49 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/* Bridge Command 5.0 Ship Simulator
Copyright (C) 2014 James Packer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY Or FITNESS For A PARTICULAR PURPOSE. See the
GNU General Public License For more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef __OTHERSHIPS_HPP_INCLUDED__
#define __OTHERSHIPS_HPP_INCLUDED__
#include "irrlicht.h"
#include <vector>
#include <string>
#include "Leg.hpp"
//Forward declarations
class SimulationModel;
class OtherShip;
class RadarData;
class OtherShips
{
public:
OtherShips();
virtual ~OtherShips();
void load(const std::string& scenarioName, irr::f32 scenarioStartTime, bool secondary, irr::scene::ISceneManager* smgr, SimulationModel* model);
void update(irr::f32 deltaTime, irr::f32 scenarioTime, irr::f32 tideHeight, irr::core::vector3df viewPosition, irr::u32 lightLevel);
RadarData getRadarData(irr::u32 number, irr::core::vector3df scannerPosition) const;
irr::u32 getNumber() const;
irr::core::vector3df getPosition(int number) const;
irr::f32 getLength(int number) const;
irr::f32 getWidth(int number) const;
irr::f32 getHeading(int number) const;
irr::f32 getSpeed(int number) const; //Speed in m/s
void setSpeed(int number, irr::f32 speed); //Speed in m/s
void setPos(int number, irr::f32 positionX, irr::f32 positionZ);
void setHeading(int number, irr::f32 hdg);
std::vector<Leg> getLegs(int number) const;
void changeLeg(int shipNumber, int legNumber, irr::f32 bearing, irr::f32 speed, irr::f32 distance, irr::f32 scenarioTime);
void addLeg(int shipNumber, int afterLegNumber, irr::f32 bearing, irr::f32 speed, irr::f32 distance, irr::f32 scenarioTime);
void deleteLeg(int shipNumber, int legNumber, irr::f32 scenarioTime);
std::string getName(int number) const;
void moveNode(irr::f32 deltaX, irr::f32 deltaY, irr::f32 deltaZ);
private:
std::vector<OtherShip> otherShips;
};
#endif