EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EBGeometry::Render::Settings< T > Struct Template Reference

What to render and how. A plain value; every field has a default. More...

#include <EBGeometry_Render.hpp>

Collaboration diagram for EBGeometry::Render::Settings< T >:
Collaboration graph
[legend]

Static Public Member Functions

static Array< Vec3T< T >, PrimitiveColors > unsetColors () noexcept
 Every entry of m_primitiveColors unset.
 

Public Attributes

uint32_t m_width = 960
 Image width in pixels.
 
uint32_t m_height = 960
 Image height in pixels.
 
uint32_t m_supersampling = 2
 Rays per pixel along each axis (n x n per pixel), from 1 to 15.
 
uint32_t m_threads = 0
 Host threads for render(); 0 uses one per hardware thread.
 
bool m_shadows = true
 Soft shadows cast by the shape.
 
bool m_occlusion = true
 Ambient occlusion: darker creases and corners.
 
bool m_floor = true
 A floor just under the shape, perpendicular to the camera's up axis (only under a shape that is bounded below).
 
bool m_sky = true
 A sky gradient behind the shape; a plain background without it.
 
ColorBy m_colorBy = ColorBy::Normal
 How surfaces are colored.
 
Vec3T< T > m_color = Vec3T<T>(T(0.80), T(0.42), T(0.18))
 The surface color for ColorBy::Uniform (linear RGB in [0, 1]).
 
Array< Vec3T< T >, PrimitiveColors > m_primitiveColors = unsetColors()
 Colors for ColorBy::Primitive by primitive id (linear RGB in [0, 1]): entry i colors primitive i. An entry left unset (a negative component, as all are by default), and every id from PrimitiveColors on, takes the built-in palette's color.
 
bool m_recordPrimitives = false
 Whether a render records each pixel's object in Image::m_primitives (for a viewer's pick outline); off, the image's m_primitives stays empty and a render stores and copies less per pixel.
 
uint32_t m_highlightPrimitive = NoPrimitive
 A primitive to highlight (see HitT::m_primitive): its surface is tinted with m_highlightColor, whatever the coloring. NoPrimitive highlights none, AllPrimitives the whole shape.
 
Vec3T< T > m_highlightColor = Vec3T<T>(T(1.0), T(0.72), T(0.10))
 The highlight's color.
 
Vec3T< T > m_insideColor = Vec3T<T>(T(0.90), T(0.08), T(0.08))
 The color a surface seen from inside the solid is tinted towards.
 
Vec3T< T > m_cutColor = Vec3T<T>(T(0.95), T(0.86), T(0.50))
 The color of faces cut by the section plane when coloring by primitive; otherwise a cut face is colored as a surface facing along the plane's normal would be (or uniformly).
 
T m_cutOpacity = T(0.6)
 Opacity of the cut face (1: opaque): below 1, the shape's next surface behind it along the ray shows through, seen from inside the solid without the inside tint (cavities, bores, the far wall).
 
Vec3T< T > m_floorColor = Vec3T<T>(T(0.58), T(0.59), T(0.61))
 The floor's color.
 
bool m_lightFromCamera = true
 Whether m_light is given in the camera's frame (x to the image's right, y to its top, z towards the viewer), so that the light turns with the camera and the side in view stays lit; otherwise it is a direction in the scene.
 
Vec3T< T > m_light = Vec3T<T>(T(-0.45), T(0.75), T(0.55))
 Direction towards the light (need not be of unit length): in the camera's frame with m_lightFromCamera (by default from above, to the left and in front), in the scene's otherwise.
 
T m_lightIntensity = T(1.05)
 How strongly the light lights a surface facing it (the diffuse term's factor).
 
T m_ambient = T(0.35)
 How much light comes from the sky, on a surface facing up (the ambient term's factor).
 
T m_specular = T(0.45)
 How bright the light's highlights are (0: a matte surface).
 
T m_shininess = T(32)
 How small the light's highlights are: the specular exponent, at least 1 (larger: a shinier surface).
 
Vec3T< T > m_skyHorizon = Vec3T<T>(T(0.82), T(0.84), T(0.88))
 The sky's color at the horizon.
 
Vec3T< T > m_skyZenith = Vec3T<T>(T(0.32), T(0.45), T(0.66))
 The sky's color straight up.
 
Vec3T< T > m_background = Vec3T<T>(T(0.16), T(0.17), T(0.19))
 The background without the sky (m_sky false).
 
bool m_floorChecker = true
 A checkerboard on the floor; a plain floor without it.
 
T m_floorCheckerSize = T(0)
 The side of the floor's checker squares; 0 takes a sixth of the scene's length scale.
 
bool m_section = false
 Whether the section plane cuts the shape.
 
Vec3T< T > m_sectionPoint = Vec3T<T>::zeros()
 A point on the section plane.
 
Vec3T< T > m_sectionNormal = Vec3T<T>(T(0), T(0), T(1))
 The section plane's normal: the part of the shape on the side it points to is removed.
 
T m_contourWidth = T(2)
 Width in pixels of the line drawn on the section plane where it meets the shape's surface (the shape's contour in the plane); 0 draws none.
 
Vec3T< T > m_contourColor = Vec3T<T>(T(0.04), T(0.04), T(0.05))
 The contour's color.
 
T m_isoSpacing = T(0)
 Spacing of lines of equal signed distance drawn on the section plane, inside and outside the shape (0: none). Spaced like a simulation grid, they show what the grid resolves.
 
Vec3T< T > m_isoColor = Vec3T<T>(T(0.30), T(0.32), T(0.36))
 The color of those lines.
 
T m_sheetOpacity = T(0.35)
 Opacity of the section plane where it lies outside the shape, within the shape's box: a frosted sheet that shows where the plane is, edged by a line where it meets the box (0: none, 1: opaque).
 
Vec3T< T > m_sheetColor = Vec3T<T>(T(0.95), T(0.96), T(0.97))
 The sheet's color.
 
Vec3T< T > m_sheetEdgeColor = Vec3T<T>(T(0.45), T(0.47), T(0.50))
 The color of the sheet's edge.
 
RayOptions< T > m_rays
 How rays march (see firstHit()). A scale of 0 takes the shape's box diagonal, or the camera distance for an unbounded shape.
 

Static Public Attributes

static constexpr uint32_t PrimitiveColors = 16
 How many primitive colors m_primitiveColors holds.
 
static constexpr uint32_t NoPrimitive = 0xFFFFFFFFU
 The value of m_highlightPrimitive that highlights nothing.
 
static constexpr uint32_t AllPrimitives = 0xFFFFFFFEU
 The value of m_highlightPrimitive that highlights the whole shape.
 

Detailed Description

template<class T>
struct EBGeometry::Render::Settings< T >

What to render and how. A plain value; every field has a default.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ unsetColors()

template<class T >
static Array< Vec3T< T >, PrimitiveColors > EBGeometry::Render::Settings< T >::unsetColors ( )
inlinestaticnoexcept

Every entry of m_primitiveColors unset.

Returns
The table.

The documentation for this struct was generated from the following file: