|
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, int a_argc, char **a_argv) |
| | Look at a shape in a window, from a camera fitted to its box, with default settings.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, const Camera< ShapePrecision< S > > &a_camera, const Settings< ShapePrecision< S > > &a_settings, int a_argc, char **a_argv) |
| | Look at a shape in a window, from a given camera with given settings.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, const S &a_deviceShape, int a_argc, char **a_argv) |
| | Look at a shape in a window, rendering on the GPU through a device view of the shape, from a camera fitted to its box, with default settings.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, const S &a_deviceShape, const Camera< ShapePrecision< S > > &a_camera, const Settings< ShapePrecision< S > > &a_settings, int a_argc, char **a_argv) |
| | Look at a shape in a window, rendering on the GPU through a device view of the shape.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, Pool &a_pool, int a_argc, char **a_argv) |
| | Look at a shape that lives in a pool in a window, rendering on the GPU in a GPU build, from a camera fitted to its box, with default settings.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, Pool &a_pool, const Camera< ShapePrecision< S > > &a_camera, const Settings< ShapePrecision< S > > &a_settings, int a_argc, char **a_argv) |
| | Look at a shape that lives in a pool in a window, rendering on the GPU in a GPU build, from a given camera with given settings.
|
| |
Render::view(): look at a shape in an interactive window.
The window needs SDL2 and is compiled only when EBGEOMETRY_VIEWER_SDL2 is defined (make VIEWER=SDL2, or CMake -DEBGEOMETRY_VIEWER=SDL2, which also link SDL2). Without it, and whenever no window can or should open (a –no-view argument, no display, SDL failing to start), view() prints one line saying why and returns at once, so a program that calls it still runs unattended.
In the window, drag to orbit, drag with Ctrl held to pan, drag with the right button to move the light, scroll to zoom, and click to pick the object under the cursor; keys change the camera, the shading and a section plane. An overlay lists them with what they change (H hides it), they are printed when the window opens, and the user guide's table of the viewer's keys (Sec:ViewerKeys) describes them. While the camera moves the view is drawn as a quick preview, at a resolution adapted to keep it at a few tens of milliseconds; once the camera rests it is refined on a background thread, canceled as soon as the camera moves again. The window can be resized, and renders at its size in pixels (on a high-DPI display, more pixels than its size in screen units).
- Author
- Robert Marskar
template<class S >
| void EBGeometry::Render::view |
( |
const S & |
a_shape, |
|
|
Pool & |
a_pool, |
|
|
int |
a_argc, |
|
|
char ** |
a_argv |
|
) |
| |
|
inline |
Look at a shape that lives in a pool in a window, rendering on the GPU in a GPU build, from a camera fitted to its box, with default settings.
See view(const S&, int, char**). In a CUDA or HIP build with a visible device, unless the window is not to open (built without EBGEOMETRY_VIEWER_SDL2, –no-view, no display), the pool is frozen (if it is not already) and mirrored into GPU::memoryResource() before the window opens, the mirror kept until it closes, and the window renders through a_shape.rebasedView() onto the mirror (G switches to the host and back); should SDL then fail to open the window, the pool stays frozen. Otherwise the window renders on the host, and the pool is left as it is.
- Template Parameters
-
| S | Shape type (see isShape), with rebasedView(const Pool&) (a Tape, a BVH union, a mesh SDF). |
- Parameters
-
| [in] | a_shape | The shape, valid on the host. |
| [in,out] | a_pool | The pool a_shape lives in. |
| [in] | a_argc | The program's argument count. |
| [in] | a_argv | The program's arguments. |