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

reformat: remove redundant qualifiers

This commit is contained in:
jerrrrycho
2026-07-04 05:34:23 +02:00
parent 20e7a99516
commit cf9fb07800
98 changed files with 2290 additions and 2290 deletions

View File

@@ -692,7 +692,7 @@ basic_cell::launch_event( TEventLauncher *Launcher, bool local_only ) {
// adjusts cell bounding area to enclose specified node
void
basic_cell::enclose_area( scene::basic_node *Node ) {
basic_cell::enclose_area( basic_node *Node ) {
m_area.radius = std::max(
m_area.radius,

View File

@@ -216,9 +216,9 @@ public:
void
launch_event(TEventLauncher *Launcher, bool local_only);
void
enclose_area( scene::basic_node *Node );
enclose_area( basic_node *Node );
// members
scene::bounding_area m_area { glm::dvec3(), static_cast<float>( 0.5 * M_SQRT2 * EU07_CELLSIZE ) };
bounding_area m_area { glm::dvec3(), static_cast<float>( 0.5 * M_SQRT2 * EU07_CELLSIZE ) };
bool m_active { false }; // whether the cell holds any actual data content
shapenode_sequence m_shapesopaque; // opaque pieces of geometry
shapenode_sequence m_shapestranslucent; // translucent pieces of geometry
@@ -350,7 +350,7 @@ public:
// members
// placement and visibility
scene::bounding_area m_area { glm::dvec3(), static_cast<float>( 0.5 * M_SQRT2 * EU07_SECTIONSIZE ) };
bounding_area m_area { glm::dvec3(), static_cast<float>( 0.5 * M_SQRT2 * EU07_SECTIONSIZE ) };
// content
cell_array m_cells; // partitioning scheme
shapenode_sequence m_shapes; // large pieces of opaque geometry and (legacy) terrain

View File

@@ -22,7 +22,7 @@ http://mozilla.org/MPL/2.0/.
namespace scene {
void
basic_editor::translate( scene::basic_node *Node, glm::dvec3 const &Location, bool const Snaptoground ) {
basic_editor::translate( basic_node *Node, glm::dvec3 const &Location, bool const Snaptoground ) {
auto &initiallocation { Node->location() };
@@ -49,7 +49,7 @@ basic_editor::translate( scene::basic_node *Node, glm::dvec3 const &Location, bo
// translate entire group
// TODO: contextual switch between group and item translation
// TODO: translation of affected/relevant events
auto &nodegroup { scene::Groups.group( Node->group() ).nodes };
auto &nodegroup { Groups.group( Node->group() ).nodes };
std::for_each(
std::begin( nodegroup ), std::end( nodegroup ),
[&]( auto *node ) {
@@ -58,7 +58,7 @@ basic_editor::translate( scene::basic_node *Node, glm::dvec3 const &Location, bo
}
void
basic_editor::translate( scene::basic_node *Node, float const Offset ) {
basic_editor::translate( basic_node *Node, float const Offset ) {
// NOTE: offset scaling is calculated early so the same multiplier can be applied to potential whole group
auto const distance { glm::length( Node->location() - Global.pCamera.Pos ) };
@@ -71,7 +71,7 @@ basic_editor::translate( scene::basic_node *Node, float const Offset ) {
// translate entire group
// TODO: contextual switch between group and item translation
// TODO: translation of affected/relevant events
auto &nodegroup { scene::Groups.group( Node->group() ).nodes };
auto &nodegroup { Groups.group( Node->group() ).nodes };
std::for_each(
std::begin( nodegroup ), std::end( nodegroup ),
[&]( auto *node ) {
@@ -80,7 +80,7 @@ basic_editor::translate( scene::basic_node *Node, float const Offset ) {
}
void
basic_editor::translate_node( scene::basic_node *Node, glm::dvec3 const &Location ) {
basic_editor::translate_node( basic_node *Node, glm::dvec3 const &Location ) {
if( typeid( *Node ) == typeid( TAnimModel ) ) {
translate_instance( static_cast<TAnimModel *>( Node ), Location );
@@ -91,7 +91,7 @@ basic_editor::translate_node( scene::basic_node *Node, glm::dvec3 const &Locatio
}
void
basic_editor::translate_node( scene::basic_node *Node, float const Offset ) {
basic_editor::translate_node( basic_node *Node, float const Offset ) {
if( typeid( *Node ) == typeid( TAnimModel ) ) {
translate_instance( static_cast<TAnimModel *>( Node ), Offset );
@@ -134,7 +134,7 @@ basic_editor::translate_memorycell( TMemCell *Memorycell, float const Offset ) {
}
void
basic_editor::rotate( scene::basic_node *Node, glm::vec3 const &Angle, float const Quantization ) {
basic_editor::rotate( basic_node *Node, glm::vec3 const &Angle, float const Quantization ) {
glm::vec3 rotation{Angle.x, Angle.y, Angle.z};
@@ -160,7 +160,7 @@ basic_editor::rotate( scene::basic_node *Node, glm::vec3 const &Angle, float con
// TODO: contextual switch between group and item rotation
// TODO: translation of affected/relevant events
auto const &rotationcenter { Node->location() };
auto const &nodegroup { scene::Groups.group( Node->group() ).nodes };
auto const &nodegroup { Groups.group( Node->group() ).nodes };
std::for_each(
std::begin( nodegroup ), std::end( nodegroup ),
[&]( auto *node ) {
@@ -176,7 +176,7 @@ basic_editor::rotate( scene::basic_node *Node, glm::vec3 const &Angle, float con
}
void
basic_editor::rotate_node( scene::basic_node *Node, glm::vec3 const &Angle ) {
basic_editor::rotate_node( basic_node *Node, glm::vec3 const &Angle ) {
if( typeid( *Node ) == typeid( TAnimModel ) ) {
rotate_instance( static_cast<TAnimModel *>( Node ), Angle );

View File

@@ -16,10 +16,10 @@ namespace scene {
// TODO: move the snapshot to history stack
struct node_snapshot {
scene::basic_node *node;
basic_node *node;
std::string data;
node_snapshot( scene::basic_node *Node ) :
node_snapshot( basic_node *Node ) :
node( Node ) {
if( Node != nullptr ) {
Node->export_as_text( data ); } };
@@ -33,18 +33,18 @@ class basic_editor {
public:
// methods
void
translate( scene::basic_node *Node, glm::dvec3 const &Location, bool const Snaptoground );
translate( basic_node *Node, glm::dvec3 const &Location, bool const Snaptoground );
void
translate( scene::basic_node *Node, float const Offset );
translate( basic_node *Node, float const Offset );
void
rotate( scene::basic_node *Node, glm::vec3 const &Angle, float const Quantization );
rotate( basic_node *Node, glm::vec3 const &Angle, float const Quantization );
private:
// methods
void
translate_node( scene::basic_node *Node, glm::dvec3 const &Location );
translate_node( basic_node *Node, glm::dvec3 const &Location );
void
translate_node( scene::basic_node *Node, float const Offset );
translate_node( basic_node *Node, float const Offset );
void
translate_instance( TAnimModel *Instance, glm::dvec3 const &Location );
void
@@ -54,7 +54,7 @@ private:
void
translate_memorycell( TMemCell *Memorycell, float const Offset );
void
rotate_node( scene::basic_node *Node, glm::vec3 const &Angle );
rotate_node( basic_node *Node, glm::vec3 const &Angle );
void
rotate_instance( TAnimModel *Instance, glm::vec3 const &Angle );
};

View File

@@ -143,7 +143,7 @@ shape_node::deserialize( std::istream &Input ) {
// restores content of the node from provided input stream
shape_node &
shape_node::import( cParser &Input, scene::node_data const &Nodedata ) {
shape_node::import( cParser &Input, node_data const &Nodedata ) {
// import common data
m_name = Nodedata.name;
@@ -558,7 +558,7 @@ lines_node::deserialize( std::istream &Input ) {
// restores content of the node from provded input stream
lines_node &
lines_node::import( cParser &Input, scene::node_data const &Nodedata ) {
lines_node::import( cParser &Input, node_data const &Nodedata ) {
// import common data
m_name = Nodedata.name;
@@ -716,7 +716,7 @@ memory_node::deserialize( cParser &Input, node_data const &Nodedata ) {
basic_node::basic_node( scene::node_data const &Nodedata ) :
basic_node::basic_node( node_data const &Nodedata ) :
m_name( Nodedata.name )
{
uuid = UID::random();

View File

@@ -83,7 +83,7 @@ public:
struct shapenode_data {
// members:
// placement and visibility
scene::bounding_area area; // bounding area, in world coordinates
bounding_area area; // bounding area, in world coordinates
double rangesquared_min { 0.0 }; // visibility range, min
double rangesquared_max { 0.0 }; // visibility range, max
bool visible { true }; // visibility flag
@@ -114,7 +114,7 @@ public:
deserialize( std::istream &Input );
// restores content of the node from provided input stream
shape_node &
import( cParser &Input, scene::node_data const &Nodedata );
import( cParser &Input, node_data const &Nodedata );
// imports data from provided submodel
shape_node &
convert( TSubModel const *Submodel );
@@ -193,7 +193,7 @@ public:
struct linesnode_data {
// members:
// placement and visibility
scene::bounding_area area; // bounding area, in world coordinates
bounding_area area; // bounding area, in world coordinates
double rangesquared_min { 0.0 }; // visibility range, min
double rangesquared_max { 0.0 }; // visibility range, max
bool visible { true }; // visibility flag
@@ -223,7 +223,7 @@ public:
deserialize( std::istream &Input );
// restores content of the node from provided input stream
lines_node &
import( cParser &Input, scene::node_data const &Nodedata );
import( cParser &Input, node_data const &Nodedata );
// adds content of provided node to already enclosed geometry. returns: true if merge could be performed
bool
merge( lines_node &Lines );
@@ -325,7 +325,7 @@ class basic_node {
public:
// constructor
explicit basic_node( scene::node_data const &Nodedata );
explicit basic_node( node_data const &Nodedata );
// destructor
virtual ~basic_node() = default;
// methods
@@ -356,8 +356,8 @@ public:
bool
visible() const;
void
group( scene::group_handle Group );
scene::group_handle
group( group_handle Group );
group_handle
group() const;
void
mark_dirty() { m_dirty = true; }
@@ -368,8 +368,8 @@ public:
public:
// members
scene::group_handle m_group { null_handle }; // group this node belongs to, if any
scene::bounding_area m_area;
group_handle m_group { null_handle }; // group this node belongs to, if any
bounding_area m_area;
double m_rangesquaredmin { 0.0 }; // visibility range, min
double m_rangesquaredmax { 0.0 }; // visibility range, max
bool m_visible { true }; // visibility flag
@@ -433,12 +433,12 @@ basic_node::visible() const {
inline
void
basic_node::group( scene::group_handle Group ) {
basic_node::group( group_handle Group ) {
m_group = Group;
}
inline
scene::group_handle
group_handle
basic_node::group() const {
return m_group;
}

View File

@@ -21,7 +21,7 @@ namespace scene {
node_groups Groups;
// requests creation of a new node group. returns: handle to the group
scene::group_handle
group_handle
node_groups::create() {
m_activegroup.push( create_handle() );
@@ -30,7 +30,7 @@ node_groups::create() {
}
// indicates creation of current group ended. returns: handle to the parent group or null_handle if group stack is empty
scene::group_handle
group_handle
node_groups::close()
{
if( false == m_activegroup.empty() ) {
@@ -236,7 +236,7 @@ node_groups::handle() const {
// places provided node in specified group
void
node_groups::insert( scene::group_handle const Group, scene::basic_node *Node ) {
node_groups::insert( group_handle const Group, basic_node *Node ) {
// TBD, TODO: automatically unregister the node from its current group?
Node->group( Group );
@@ -252,7 +252,7 @@ node_groups::insert( scene::group_handle const Group, scene::basic_node *Node )
// places provided event in specified group
void
node_groups::insert( scene::group_handle const Group, basic_event *Event ) {
node_groups::insert( group_handle const Group, basic_event *Event ) {
// TBD, TODO: automatically unregister the event from its current group?
Event->group( Group );

View File

@@ -16,7 +16,7 @@ namespace scene {
struct basic_group {
// members
std::vector<scene::basic_node *> nodes;
std::vector<basic_node *> nodes;
std::vector<basic_event *> events;
};
@@ -42,13 +42,13 @@ public:
handle() const;
// places provided node in specified group
void
insert( scene::group_handle const Group, scene::basic_node *Node );
insert( group_handle const Group, basic_node *Node );
// places provided event in specified group
void
insert( scene::group_handle const Group, basic_event *Event );
insert( group_handle const Group, basic_event *Event );
// grants direct access to specified group
scene::basic_group &
group( scene::group_handle const Group ) {
basic_group &
group( group_handle const Group ) {
return m_groupmap[ Group ]; }
// sends basic content of the class in legacy (text) format to provided stream
void
@@ -56,7 +56,7 @@ public:
private:
// types
using group_map = std::unordered_map<scene::group_handle, scene::basic_group>;
using group_map = std::unordered_map<group_handle, basic_group>;
// methods
// removes specified group from the group list and group information from the group's nodes
void
@@ -68,7 +68,7 @@ private:
assign_cross_switch(map::track_switch&sw, std::string &sw_name, const std::string &id, size_t idx);
// members
group_map m_groupmap; // map of established node groups
std::stack<scene::group_handle> m_activegroup; // helper, group to be assigned to newly created nodes
std::stack<group_handle> m_activegroup; // helper, group to be assigned to newly created nodes
};
extern node_groups Groups;