google-ar / sceneform-android-sdk

Sceneform SDK for Android
https://developers.google.com/sceneform/develop/
Apache License 2.0
1.23k stars 604 forks source link

Feature request: Human friendly Camera API for SceneView #609

Open kstpr opened 5 years ago

kstpr commented 5 years ago

Hi,

Currently we are not allowed to modify various camera parameters while in the SceneView. What is possible is to set the near and far planes, and albeit a warning is raised, to set the projection matrix. However the Filament Camera class (https://github.com/google/filament/blob/master/filament/src/Camera.cpp) is quite rich and some of the functions may be exposed. For example the corresponding Camera class in iOS SceneKit has much friendlier API - https://developer.apple.com/documentation/scenekit/scncamera. I have implemented the functionality that we need (orthographic projection and scale) using the projection matrix but I don't like to do that manually. I think at least the Camera API should allow us to set the view volume (l,r,b,t,n,f), perspective / orthographic option, orthographic scale, and horizontal/vertical field of view for perspective.

Thanks.

kunal-wayfair commented 5 years ago

+1 on this.

kevinzhow commented 5 years ago

+1 and we need build-in camera control gesture for SceneView to orbit object.