Compare commits

...

5 Commits

Author SHA1 Message Date
69b9049fb0 fixed gimba lock for unity 2025-04-26 00:52:46 +03:00
2734b58bdd fixed gimba lock for opengl camera 2025-04-26 00:32:53 +03:00
d7f1f49165 resetting state 2025-04-25 23:52:10 +03:00
94b1453cae removed .idea folder 2025-04-23 02:48:45 +03:00
3e67d8a99c added credits 2025-04-23 02:46:08 +03:00
8 changed files with 23 additions and 23 deletions

8
.idea/modules.xml generated
View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/uml.iml" filepath="$PROJECT_DIR$/.idea/uml.iml" />
</modules>
</component>
</project>

2
.idea/uml.iml generated
View File

@@ -1,2 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

7
.idea/vcs.xml generated
View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$/extlibs/googletest" vcs="Git" />
</component>
</project>

11
CREDITS.md Normal file
View File

@@ -0,0 +1,11 @@
# OMATH CREDITS
Thanks to everyone who made this possible, including:
- Saikari aka luadebug for VCPKG port.
And a big hand to everyone else who has contributed over the past!
THANKS! <3
-- Orange++ <orange-cpp@yandex.ru>

View File

@@ -294,7 +294,7 @@ namespace omath
[[nodiscard]]
constexpr std::array<Type, Rows * Columns>& RawArray()
{
return const_cast<std::array<Type, Rows * Columns>>(std::as_const(*this).RawArray());
return m_data;
}
[[nodiscard]]

View File

@@ -62,31 +62,37 @@ namespace omath::projection
void SetFieldOfView(const FieldOfView& fov)
{
m_fieldOfView = fov;
m_viewProjectionMatrix = std::nullopt;
}
void SetNearPlane(const float near)
{
m_nearPlaneDistance = near;
m_viewProjectionMatrix = std::nullopt;
}
void SetFarPlane(const float far)
{
m_farPlaneDistance = far;
m_viewProjectionMatrix = std::nullopt;
}
void SetViewAngles(const ViewAnglesType& viewAngles)
{
m_viewAngles = viewAngles;
m_viewProjectionMatrix = std::nullopt;
}
void SetOrigin(const Vector3<float>& origin)
{
m_origin = origin;
m_viewProjectionMatrix = std::nullopt;
}
void SetViewPort(const ViewPort& viewPort)
{
m_viewPort = viewPort;
m_viewProjectionMatrix = std::nullopt;
}
[[nodiscard]] const FieldOfView& GetFieldOfView() const

View File

@@ -32,9 +32,9 @@ namespace omath::opengl_engine
}
Mat4x4 RotationMatrix(const ViewAngles& angles)
{
return MatRotationAxisZ<float, MatStoreType::COLUMN_MAJOR>(angles.roll) *
return MatRotationAxisX<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch) *
MatRotationAxisY<float, MatStoreType::COLUMN_MAJOR>(-angles.yaw) *
MatRotationAxisX<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch);
MatRotationAxisZ<float, MatStoreType::COLUMN_MAJOR>(angles.roll);
}
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
const float far)

View File

@@ -32,9 +32,9 @@ namespace omath::unity_engine
}
Mat4x4 RotationMatrix(const ViewAngles& angles)
{
return MatRotationAxisZ(angles.roll) *
MatRotationAxisY(angles.yaw) *
MatRotationAxisX(angles.pitch);
return MatRotationAxisX<float, MatStoreType::ROW_MAJOR>(angles.pitch) *
MatRotationAxisY<float, MatStoreType::ROW_MAJOR>(angles.yaw) *
MatRotationAxisZ<float, MatStoreType::ROW_MAJOR>(angles.roll);
}
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
const float far)