add camera utils to API

This commit is contained in:
Nick Fisher
2022-08-26 00:25:45 +10:00
parent d78f70ac50
commit d3faaac6c0
7 changed files with 84 additions and 11 deletions

View File

@@ -76,6 +76,8 @@ namespace polyvox {
void setCameraPosition(float x, float y, float z);
void setCameraRotation(float rads, float x, float y, float z);
void setCameraFocalLength(float fl);
void setCameraFocusDistance(float focusDistance);
private:
void createImageRenderable();
@@ -120,7 +122,8 @@ namespace polyvox {
bool _actualSize = false;
float _cameraFocalLength = 0.0f;
float _cameraFocalLength = 28.0f;
float _cameraFocusDistance = 0.0f;
// these flags relate to the textured quad we use for rendering unlit background images
Texture* _imageTexture = nullptr;