Skip to content

Commit

Permalink
Apply lint changes etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Feb 27, 2024
1 parent 63c9658 commit 727054a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/oscar/Graphics/GraphicsImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4647,7 +4647,7 @@ namespace
}

auto copy = format();
copy.insert(std::move(desc));
copy.insert(desc);
setFormat(copy);
return true;
}
Expand Down
12 changes: 6 additions & 6 deletions src/oscar/Maths/EulerPerspectiveCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ namespace osc
Mat4 getViewMtx() const;
Mat4 getProjMtx(float aspectRatio) const;

Vec3 origin;
Radians pitch;
Radians yaw;
Radians verticalFOV;
float znear;
float zfar;
Vec3 origin = {};
Radians pitch = Degrees{0};
Radians yaw = Degrees{180};
Radians verticalFOV = Degrees{35};
float znear = 0.1f;
float zfar = 1000.0f;
};
}
12 changes: 2 additions & 10 deletions src/oscar/Maths/MathsImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,6 @@ std::ostream& osc::operator<<(std::ostream& o, Disc const& d)

// `EulerPerspectiveCamera` implementation

osc::EulerPerspectiveCamera::EulerPerspectiveCamera() :
origin{},
pitch{},
yaw{-180_deg},
verticalFOV{35_deg},
znear{0.1f},
zfar{1000.0f}
{
}

Vec3 osc::EulerPerspectiveCamera::getFront() const
{
return normalize(Vec3
Expand Down Expand Up @@ -691,13 +681,15 @@ void osc::FocusAlongAxis(PolarPerspectiveCamera& camera, size_t axis, bool negat
case 0: FocusAlongMinusX(camera); break;
case 1: FocusAlongMinusY(camera); break;
case 2: FocusAlongMinusZ(camera); break;
default: break;
}
}
else {
switch (axis) {
case 0: FocusAlongX(camera); break;
case 1: FocusAlongY(camera); break;
case 2: FocusAlongZ(camera); break;
default: break;
}
}
}
Expand Down

0 comments on commit 727054a

Please sign in to comment.