mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 21:49:19 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
21
scenenode.h
21
scenenode.h
@@ -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 };
|
||||
@@ -299,7 +301,7 @@ private:
|
||||
|
||||
|
||||
// base interface for nodes which can be actvated in scenario editor
|
||||
struct basic_node {
|
||||
class basic_node {
|
||||
|
||||
public:
|
||||
// constructor
|
||||
@@ -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
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user