Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project(examples)

add_executable(ExampleProjectionMatrixBuilder ExampleProjMatBuilder.cpp)
add_executable(ExampleProjectionMatrixBuilder example_proj_mat_builder.cpp)
target_link_libraries(ExampleProjectionMatrixBuilder PRIVATE omath::omath)
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// Created by Vlad on 3/19/2025.
//


#include <iostream>
#include <omath/engines/opengl_engine/Camera.hpp>
#include <omath/engines/opengl_engine/Formulas.hpp>
#include <omath/projection/Camera.hpp>
#include <print>
#include <omath/engines/opengl_engine/formulas.hpp>


int main()
Expand Down
2 changes: 1 addition & 1 deletion include/omath/Angle.hpp → include/omath/angle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#pragma once
#include "omath/Angles.hpp"
#include "omath/angles.hpp"
#include <algorithm>

namespace omath
Expand Down
2 changes: 1 addition & 1 deletion include/omath/Angles.hpp → include/omath/angles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//

#pragma once
#include <numbers>
#include <cmath>
#include <numbers>

namespace omath::angles
{
Expand Down
4 changes: 2 additions & 2 deletions include/omath/Color.hpp → include/omath/color.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#pragma once

#include "omath/Vector3.hpp"
#include <cstdint>
#include "omath/Vector4.hpp"
#include "omath/vector3.hpp"
#include "omath/vector4.hpp"

namespace omath
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//

#pragma once
#include "Constants.hpp"
#include "omath/projection/Camera.hpp"
#include "omath/engines/iw_engine/constants.hpp"
#include "omath/projection/camera.hpp"

namespace omath::iw_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//

#pragma once
#include <omath/Vector3.hpp>
#include <omath/Mat.hpp>
#include <omath/Angle.hpp>
#include <omath/ViewAngles.hpp>
#include <omath/vector3.hpp>
#include <omath/mat.hpp>
#include <omath/angle.hpp>
#include <omath/view_angles.hpp>

namespace omath::iw_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#pragma once
#include "Constants.hpp"
#include "omath/engines/iw_engine/constants.hpp"

namespace omath::iw_engine
{
Expand All @@ -21,4 +21,4 @@ namespace omath::iw_engine

[[nodiscard]]
Mat4x4 CalcPerspectiveProjectionMatrix(float fieldOfView, float aspectRatio, float near, float far);
} // namespace omath::source
} // namespace omath::iw_engine
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Orange on 12/23/2024.
//
#pragma once
#include "Constants.hpp"
#include "omath/projection/Camera.hpp"
#include "omath/engines/opengl_engine/constants.hpp"
#include "omath/projection/camera.hpp"

namespace omath::opengl_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//
#pragma once

#include <omath/Vector3.hpp>
#include <omath/Mat.hpp>
#include <omath/Angle.hpp>
#include <omath/ViewAngles.hpp>
#include <omath/angle.hpp>
#include <omath/mat.hpp>
#include <omath/vector3.hpp>
#include <omath/view_angles.hpp>

namespace omath::opengl_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by Orange on 12/23/2024.
//
#pragma once
#include "Constants.hpp"
#include "omath/engines/opengl_engine/constants.hpp"


namespace omath::opengl_engine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Created by Orange on 12/4/2024.
//
#pragma once
#include "Constants.hpp"
#include "omath/projection/Camera.hpp"
#include "omath/engines/source_engine/constants.hpp"
#include "omath/projection/camera.hpp"

namespace omath::source_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
//
#pragma once

#include <omath/Vector3.hpp>
#include <omath/Mat.hpp>
#include <omath/Angle.hpp>
#include <omath/ViewAngles.hpp>
#include <omath/vector3.hpp>
#include <omath/mat.hpp>
#include <omath/angle.hpp>
#include <omath/view_angles.hpp>

namespace omath::source_engine
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by Orange on 12/4/2024.
//
#pragma once
#include "Constants.hpp"
#include "omath/engines/source_engine/constants.hpp"

namespace omath::source_engine
{
Expand Down
4 changes: 2 additions & 2 deletions include/omath/Mat.hpp → include/omath/mat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
#pragma once
#include <algorithm>
#include <array>
#include <iomanip>
#include <sstream>
#include <stdexcept>
#include <utility>
#include "Vector3.hpp"
#include <iomanip>
#include "omath/vector3.hpp"

namespace omath
{
Expand Down
2 changes: 1 addition & 1 deletion include/omath/Matrix.hpp → include/omath/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <initializer_list>
#include <memory>
#include <string>
#include "Vector3.hpp"
#include "omath/vector3.hpp"

namespace omath
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#pragma once
#include <vector>
#include "NavigationMesh.hpp"
#include "omath/Vector3.hpp"
#include "omath/pathfinding/navigation_mesh.hpp"
#include "omath/vector3.hpp"

namespace omath::pathfinding
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@

#pragma once

#include "omath/Vector3.hpp"
#include <expected>
#include <vector>
#include <string>
#include <vector>
#include "omath/vector3.hpp"

namespace omath::pathfinding
{

enum Error
{

Check notice on line 17 in include/omath/pathfinding/navigation_mesh.hpp

View check run for this annotation

codefactor.io / CodeFactor

include/omath/pathfinding/navigation_mesh.hpp#L17

Redundant blank line at the start of a code block should be deleted. (whitespace/blank_line)

Check notice on line 17 in include/omath/pathfinding/navigation_mesh.hpp

View check run for this annotation

codefactor.io / CodeFactor

include/omath/pathfinding/navigation_mesh.hpp#L17

Redundant blank line at the end of a code block should be deleted. (whitespace/blank_line)
};

class NavigationMesh final
{
public:

[[nodiscard]]
std::expected<Vector3<float>, std::string> GetClosestVertex(const Vector3<float>& point) const;


[[nodiscard]]
const std::vector<Vector3<float>>& GetNeighbors(const Vector3<float>& vertex) const;

[[nodiscard]]
bool Empty() const;

[[nodiscard]] std::vector<uint8_t> Serialize() const;

void Deserialize(const std::vector<uint8_t>& raw);

std::unordered_map<Vector3<float>, std::vector<Vector3<float>>> m_verTextMap;
};
}
} // namespace omath::pathfinding
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// Created by Vlad on 2/23/2025.
//
#pragma once
#include "Projectile.hpp"
#include "Target.hpp"
#include "omath/Vector3.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include "omath/vector3.hpp"


namespace omath::projectile_prediction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by Vlad on 2/23/2025.
//
#pragma once
#include "ProjPredEngine.hpp"
#include "omath/projectile_prediction/proj_pred_engine.hpp"

namespace omath::projectile_prediction
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#pragma once

#include <optional>
#include "omath/Vector3.hpp"
#include "omath/projectile_prediction/ProjPredEngine.hpp"
#include "omath/projectile_prediction/Projectile.hpp"
#include "omath/projectile_prediction/Target.hpp"
#include "omath/projectile_prediction/proj_pred_engine.hpp"
#include "omath/projectile_prediction/projectile.hpp"
#include "omath/projectile_prediction/target.hpp"
#include "omath/vector3.hpp"


namespace omath::projectile_prediction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#pragma once
#include "omath/Vector3.hpp"
#include "omath/vector3.hpp"

namespace omath::projectile_prediction
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//

#pragma once
#include "omath/Vector3.hpp"
#include "omath/vector3.hpp"

namespace omath::projectile_prediction
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#pragma once

#include <expected>
#include <omath/Mat.hpp>
#include <omath/Vector3.hpp>
#include "ErrorCodes.hpp"
#include <omath/Angle.hpp>
#include <omath/Mat.hpp>
#include <omath/vector3.hpp>
#include <type_traits>
#include "omath/projection/error_codes.hpp"

namespace omath::projection
{
Expand Down
2 changes: 1 addition & 1 deletion include/omath/Triangle.hpp → include/omath/triangle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Created by Orange on 11/13/2024.
//
#pragma once
#include "omath/Vector3.hpp"
#include "omath/vector3.hpp"

namespace omath
{
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions include/omath/Vector3.hpp → include/omath/vector3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

#pragma once

#include "Vector2.hpp"
#include <cstdint>
#include <expected>
#include <functional>
#include "omath/Angle.hpp"
#include "omath/Vector2.hpp"
#include "omath/angle.hpp"
#include "omath/vector2.hpp"

namespace omath
{
Expand Down
2 changes: 1 addition & 1 deletion include/omath/Vector4.hpp → include/omath/vector4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
//
#pragma once

#include <omath/Vector3.hpp>
#include <algorithm>
#include <omath/vector3.hpp>


namespace omath
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
target_sources(omath PRIVATE
Matrix.cpp
matrix.cpp
color.cpp
)

Expand Down
2 changes: 1 addition & 1 deletion source/collision/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
target_sources(omath PRIVATE
LineTracer.cpp
line_tracer.cpp
)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Created by Orange on 11/13/2024.
//
#include "omath/collision/LineTracer.hpp"
#include "omath/collision/line_tracer.hpp"

namespace omath::collision
{
Expand Down
2 changes: 1 addition & 1 deletion source/engines/iw_engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
target_sources(omath PRIVATE Camera.cpp Formulas.cpp)
target_sources(omath PRIVATE camera.cpp formulas.cpp)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// Created by Vlad on 3/17/2025.
//
#include "omath/engines/iw_engine/Camera.hpp"
#include "omath/engines/iw_engine/Formulas.hpp"
#include "omath/engines/iw_engine/camera.hpp"
#include "omath/engines/iw_engine/formulas.hpp"

namespace omath::iw_engine
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// Created by Vlad on 3/19/2025.
//
#include "omath/engines/iw_engine/Formulas.hpp"
#include "omath/engines/iw_engine/formulas.hpp"


namespace omath::iw_engine
Expand Down
2 changes: 1 addition & 1 deletion source/engines/opengl_engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
target_sources(omath PRIVATE Camera.cpp Formulas.cpp)
target_sources(omath PRIVATE camera.cpp formulas.cpp)
Loading