16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 02:29:17 +02:00

build 180809. scenery node groups, AI shunt mode braking tweaks

This commit is contained in:
tmj-fstate
2018-08-09 22:24:42 +02:00
parent 249e01375b
commit cbaa5f7817
13 changed files with 398 additions and 75 deletions

View File

@@ -64,6 +64,8 @@ struct bounding_area {
deserialize( std::istream &Input );
};
using group_handle = std::size_t;
struct node_data {
double range_min { 0.0 };
@@ -330,9 +332,14 @@ public:
visible( bool const Visible );
bool
visible() const;
void
group( scene::group_handle Group );
scene::group_handle
group() const;
protected:
// members
scene::group_handle m_group { null_handle }; // group this node belongs to, if any
scene::bounding_area m_area;
double m_rangesquaredmin { 0.0 }; // visibility range, min
double m_rangesquaredmax { 0.0 }; // visibility range, max
@@ -381,6 +388,18 @@ basic_node::visible() const {
return m_visible;
}
inline
void
basic_node::group( scene::group_handle Group ) {
m_group = Group;
}
inline
scene::group_handle
basic_node::group() const {
return m_group;
}
} // scene
//---------------------------------------------------------------------------