|
| 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.
|
| |
| template<class S > |
| void | EBGeometry::Render::view (const S &a_shape, const Camera< ShapePrecision< S > > &a_camera, const Settings< ShapePrecision< S > > &a_settings, const RegionNames &a_names, int a_argc, char **a_argv) |
| | Look at a shape in a window, from a given camera with given settings, naming its regions, materials, surfaces and surface groups as a_names does.
|
| |
| 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, const RegionNames &a_names, 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, naming its regions, materials, surfaces and surface groups as a_names does.
|
| |
| 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, const RegionNames &a_names, const std::vector< DomainShape< S > > &a_domains, int a_argc, char **a_argv) |
| | Look at a shape that lives in a pool in a window, as view(const S&, Pool&, const Camera&, const Settings&,
const RegionNames&, int, char**) does, with each domain's own shape for the cost views.
|
| |
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 shows one menu of them at a time, with what they change (Tab steps through the menus, F1 to F6 show one, 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
Look at a shape in a window, from a given camera with given settings, naming its regions, materials, surfaces and surface groups as a_names does.
See view(const S&, int, char**). For a view of regions (RegionView), the status lines name the picked piece of surface, and a panel at the top left, shown with every menu, lists the domains, the regions and the active domain's groups by these names.
- Template Parameters
-
| S | Shape type (see isShape). |
- Parameters
-
| [in] | a_shape | Shape, valid on the host. |
| [in] | a_camera | Initial camera. |
| [in] | a_settings | Settings. |
| [in] | a_names | The names (RegionNames(index) of the expression's index). |
| [in] | a_argc | The program's argument count. |
| [in] | a_argv | The program's arguments. |
Look at a shape that lives in a pool in a window, as view(const S&, Pool&, const Camera&, const Settings&,
const RegionNames&, int, char**) does, with each domain's own shape for the cost views.
With the active domain shown alone (its regions shown, every other hidden, as its Only button leaves them), the cost views trace that domain's own shape, showing its regions and passing through the regions kept around them: each pixel's ray stops at the first surface of one of the domain's regions, on the domain's own tape, as a solver of the domain finds a subdomain's surface (Tape::firstSurface()), so the cost shown is what that solver pays for it. Otherwise they time the whole object's tape, as without the domains' shapes. The window shows and hides regions 1 to 63 only: a domain is shown alone when those match its regions, and a domain whose own shape has more than 64 regions (the background included) is timed as the whole object.
- Template Parameters
-
| S | Shape type: a view of regions (RegionView), with rebasedView(const Pool&). |
- Parameters
-
| [in] | a_shape | The shape, valid on the host. |
| [in,out] | a_pool | The pool a_shape and the domains' shapes live in. |
| [in] | a_camera | Initial camera. |
| [in] | a_settings | Settings. |
| [in] | a_names | The names (RegionNames(index) of the expression's index). |
| [in] | a_domains | Each domain's own shape, in the order of a_names' domains; fewer (or none) leave the rest without. |
| [in] | a_argc | The program's argument count. |
| [in] | a_argv | The program's arguments. |
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, naming its regions, materials, surfaces and surface groups as a_names does.
See view(const S&, Pool&, int, char**) and view(const S&, const Camera&, const Settings&, const
RegionNames&, int, char**).
- Template Parameters
-
| S | Shape type (see isShape), with rebasedView(const Pool&). |
- Parameters
-
| [in] | a_shape | The shape, valid on the host. |
| [in,out] | a_pool | The pool a_shape lives in. |
| [in] | a_camera | Initial camera. |
| [in] | a_settings | Settings. |
| [in] | a_names | The names (RegionNames(index) of the expression's index). |
| [in] | a_argc | The program's argument count. |
| [in] | a_argv | The program's arguments. |
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. |