feat: Add Camera component / Add cooked model and texture loading
This commit is contained in:
@@ -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&) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user