[Feature]: the transformer of camera 2 world
What feature or enhancement are you proposing?
When I set up one camera with code like this
cam_0 = scene.add_camera( res=(1280, 960), pos=(3.5, 0.0, 2.5), lookat=(0, 0, 0.5), fov=30, GUI=True, )
Can I get the transformer between camera pixel and world ?
Does there are any api I can use?
Thanks for any response!
Motivation
As a [e.g. civil engineering researcher working on flood simulation] I want to [e.g. be able to simulate city-scale fluid / terrain simulations] Because [e.g. this enables the efficient design and validation of flood protection structures].
Potential Benefit
a Convenient features
What is the expected outcome of the implementation work?
- [ ]
Additional information
No response
Can you elaborate your question again? Do you mean you want to access to transformation between camera and world frames?
Can you elaborate your question again? Do you mean you want to access to transformation between camera and world frames?
Yes, when I set up a camera, I want to get the transformer between camera pixel and world coordinate。
Perhaps, what you are looking for is Camera.transform which gives a 4x4 transformation matrix.
You can access from your camera instance like this:
cam_0 = scene.add_camera( res=(1280, 960), pos=(3.5, 0.0, 2.5), lookat=(0, 0, 0.5), fov=30, GUI=True, )
cam_0.transform
You can refer to these code: link1 and link2.
Also, I will soon update these functions to APIs of Genesis.
Maybe refer to pull request #897