fix camera manipulator/gesture detector, add explicit functions to set camera pos/rot, add unlitshader material provider

This commit is contained in:
Nick Fisher
2022-09-01 13:03:15 +10:00
parent 6280ea5f57
commit b0ff3457f0
13 changed files with 2085 additions and 118 deletions

View File

@@ -62,8 +62,6 @@ namespace polyvox {
void updateViewportAndCameraProjection(int height, int width, float scaleFactor);
void render();
Manipulator<float>* manipulator;
bool setFirstCamera(SceneAsset* asset);
bool setCamera(SceneAsset* asset, const char* nodeName);
@@ -79,6 +77,11 @@ namespace polyvox {
void setCameraFocalLength(float fl);
void setCameraFocusDistance(float focusDistance);
void grabBegin(float x, float y, bool pan);
void grabUpdate(float x, float y);
void grabEnd();
void scroll(float x, float y, float delta);
private:
void createImageRenderable();
void loadResources(std::string relativeResourcePath);
@@ -87,6 +90,10 @@ namespace polyvox {
void* _layer;
Manipulator<float>* _manipulator;
math::mat4f _cameraPosition;
math::mat4f _cameraRotation;
LoadResource _loadResource;
FreeResource _freeResource;