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 Camera
Ivan Pelipenko peri4ko@yandex.ru
QGL Camera
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 GLCAMERA_H
@@ -22,29 +22,29 @@
#include "globject.h"
class Camera: public AimedObject
{
friend QDataStream & operator <<(QDataStream & s, const ObjectBase * p);
friend QDataStream & operator >>(QDataStream & s, ObjectBase *& p);
class Camera: public AimedObject {
friend QDataStream & operator<<(QDataStream & s, const ObjectBase * p);
friend QDataStream & operator>>(QDataStream & s, ObjectBase *& p);
public:
Camera();
void setFOV(const float & f) {fov_ = f;}
void setAngles(const QVector3D & a) {setRotation(a);}
void setAngleZ(const float & a) {setRotationZ(a);}
void setAngleXY(const float & a) {setRotationX(a);}
void setAngleRoll(const float & a) {roll_ = a;}
void setDepthStart(const float & d) {depth_start = d;}
void setMirrorX(bool yes) {mirror_x = yes;}
void setMirrorY(bool yes) {mirror_y = yes;}
void setFOV(const float & f) { fov_ = f; }
void setAngles(const QVector3D & a) { setRotation(a); }
void setAngleZ(const float & a) { setRotationZ(a); }
void setAngleXY(const float & a) { setRotationX(a); }
void setAngleRoll(const float & a) { roll_ = a; }
void setDepthStart(const float & d) { depth_start = d; }
void setMirrorX(bool yes) { mirror_x = yes; }
void setMirrorY(bool yes) { mirror_y = yes; }
float FOV() const {return fov_;}
float angleZ() const {return rotationZ();}
float angleXY() const {return rotationX();}
float angleRoll() const {return roll_;}
float depthStart() const {return depth_start;}
bool isMirrorX() const {return mirror_x;}
bool isMirrorY() const {return mirror_y;}
float FOV() const { return fov_; }
float angleZ() const { return rotationZ(); }
float angleXY() const { return rotationX(); }
float angleRoll() const { return roll_; }
float depthStart() const { return depth_start; }
bool isMirrorX() const { return mirror_x; }
bool isMirrorY() const { return mirror_y; }
void assign(const Camera & c);
virtual ObjectBase * clone(bool withChildren = true);
@@ -52,7 +52,7 @@ public:
QMatrix4x4 projectionMatrix(double aspect) const;
QMatrix4x4 offsetMatrix() const;
QMatrix4x4 fullViewMatrix() const {return viewMatrix() * offsetMatrix();}
QMatrix4x4 fullViewMatrix() const { return viewMatrix() * offsetMatrix(); }
private:
mutable QVector3D offset_;