api updates

This commit is contained in:
Nick Fisher
2023-03-03 20:54:01 +08:00
parent 051b6d1db1
commit e36ec57b17
7 changed files with 195 additions and 26 deletions

View File

@@ -23,6 +23,10 @@ extern "C" {
delete((FilamentViewer*)viewer);
}
void set_background_color(void* viewer, const float* color) {
((FilamentViewer*)viewer)->setBackgroundColor(color);
}
void set_background_image(void* viewer, const char* path) {
((FilamentViewer*)viewer)->setBackgroundImage(path);
}
@@ -71,6 +75,10 @@ extern "C" {
return ((FilamentViewer*)viewer)->setCamera((SceneAsset*)asset, nodeName);
}
void set_camera_exposure(void* viewer, float aperture, float shutterSpeed, float sensitivity) {
((FilamentViewer*)viewer)->setCameraExposure(aperture, shutterSpeed, sensitivity);
}
void set_camera_position(void* viewer, float x, float y, float z) {
((FilamentViewer*)viewer)->setCameraPosition(x, y, z);
}