Add GetFovX and GetFovY to CameraIntrinsic
This commit is contained in:
@@ -78,6 +78,16 @@ namespace openVulkanoCpp::Math
|
||||
return Fy() / Fx();
|
||||
}
|
||||
|
||||
[[nodiscard]] float GetFovX(float imageWidth) const
|
||||
{
|
||||
return 2 * atanf(imageWidth * 0.5f / Fx());
|
||||
}
|
||||
|
||||
[[nodiscard]] float GetFovY(float imageHeight) const
|
||||
{
|
||||
return 2 * atanf(imageHeight * 0.5f / Fy());
|
||||
}
|
||||
|
||||
[[nodiscard]] Math::Vector3f ProjectTo3D(Math::Vector2i pixelCoordinates, float depth) const
|
||||
{
|
||||
return ProjectTo3D(Math::Vector2f(pixelCoordinates), depth);
|
||||
|
||||
Reference in New Issue
Block a user