feat: Add Camera component / Add cooked model and texture loading

This commit is contained in:
2026-10-13 00:29:17 +02:00
parent fa98bf08e8
commit ce55f75ac3
26 changed files with 930 additions and 194 deletions
+9
View File
@@ -114,6 +114,15 @@ void Camera::SetRotation(const glm::vec2& yawPitchRadians) {
SetRotation(yawPitchRadians.x, yawPitchRadians.y);
}
void Camera::SetOrientation(const glm::vec3& forward, const glm::vec3& up) {
m_useTarget = false;
m_forward = glm::normalize(forward);
m_right = glm::normalize(glm::cross(m_forward, up));
m_up = glm::normalize(glm::cross(m_right, m_forward));
m_yaw = std::atan2(m_forward.z, m_forward.x);
m_pitch = std::asin(glm::clamp(m_forward.y, -1.0f, 1.0f));
}
void Camera::SetTarget(const glm::vec3&) {
}