code format

This commit is contained in:
2022-12-14 14:14:44 +03:00
parent 1dfca0aeab
commit cb944b62e4
85 changed files with 4451 additions and 3744 deletions

View File

@@ -1,19 +1,19 @@
/*
QGL Scene
Ivan Pelipenko peri4ko@yandex.ru
QGL Scene
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
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 Lesser General Public License for more details.
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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GLSCENE_H
@@ -31,8 +31,9 @@ class Scene: public QObject {
friend class RendererSelection;
friend class ObjectBase;
friend class Light;
friend QDataStream & operator <<(QDataStream & s, const Scene * p);
friend QDataStream & operator >>(QDataStream & s, Scene *& p);
friend QDataStream & operator<<(QDataStream & s, const Scene * p);
friend QDataStream & operator>>(QDataStream & s, Scene *& p);
public:
explicit Scene();
virtual ~Scene();
@@ -45,8 +46,8 @@ public:
Q_ENUMS(SelectionMode)
QString name() const {return name_;}
void setName(const QString & name) {name_ = name;}
QString name() const { return name_; }
void setName(const QString & name) { name_ = name; }
bool prepare();
@@ -64,13 +65,13 @@ public:
int objectsCount(bool all = false);
ObjectBaseList objects(bool all = false);
ObjectBase * rootObject() {return root_;}
ObjectBase * rootObject() { return root_; }
void removeObject(ObjectBase * o, bool inChildren = true);
void removeObject(ObjectBase & o, bool inChildren = true);
void clearObjects(bool deleteAll = false);
SelectionMode selectionMode() const {return sel_mode_;}
void setSelectionMode(SelectionMode mode) {sel_mode_ = mode;}
SelectionMode selectionMode() const { return sel_mode_; }
void setSelectionMode(SelectionMode mode) { sel_mode_ = mode; }
void selectObject(ObjectBase * o, bool add_to_selection = false);
void selectObjects(ObjectBaseList ol, bool add_to_selection = false);
void selectObjectsByMesh();
@@ -82,7 +83,7 @@ public:
const Box3D & boundingBox() const;
QVector<Material*> getMaterials() const {return materials;}
QVector<Material *> getMaterials() const { return materials; }
Material * newMaterial(const QString & name = QString());
void removeMaterial(Material * m);
void makeMaterialsUniqueNames();
@@ -105,8 +106,8 @@ protected:
Mesh * attachMesh(Mesh * mesh);
void setTreeChanged();
void setTreeStructChanged();
void setMaterialsChanged() {mat_changed = true;}
void setLightsChanged() {lights_changed = tree_changed = true;}
void setMaterialsChanged() { mat_changed = true; }
void setLightsChanged() { lights_changed = tree_changed = true; }
void setObjectMeshChanged(ObjectBase * o);
@@ -116,13 +117,13 @@ protected:
bool need_reload_materials, tree_struct_changed;
QVector<bool> mat_map_changed;
QVector<Mesh*> geometries, td_geometries;
QVector<Material*> materials;
QVector<Mesh *> geometries, td_geometries;
QVector<Material *> materials;
QMap<int, QMap<Mesh*, ObjectBaseList>> geometries_used;
QMap<int, QList<Light*>> lights_used;
QList<Camera*> cameras_used;
QVector<Material*> changed_materials;
QMap<int, QMap<Mesh *, ObjectBaseList>> geometries_used;
QMap<int, QList<Light *>> lights_used;
QList<Camera *> cameras_used;
QVector<Material *> changed_materials;
SelectionMode sel_mode_;
ObjectBaseList selected_, selected_top;
@@ -137,7 +138,7 @@ signals:
};
QDataStream & operator <<(QDataStream & s, const Scene * p);
QDataStream & operator >>(QDataStream & s, Scene *& p);
QDataStream & operator<<(QDataStream & s, const Scene * p);
QDataStream & operator>>(QDataStream & s, Scene *& p);
#endif // GLSCENE_H