Workspace 6.21.5
|
Encapsulates the settings required for rendering. More...
#include <Rendering/SceneComponents/rendersettings.h>
Public Types | |
enum | FaceCulling { CullNone , CullBackFaces , CullFrontFaces , CullFrontAndBackFaces } |
enum | SymbolSizeCoordinateSystem { Automatic , WorldSpace , ScreenSpace } |
Public Member Functions | |
RenderSettings () | |
RenderSettings (const RenderSettings &other) | |
~RenderSettings () override | |
RenderSettings * | clone () const override |
bool | getAntialiasingEnabled () const |
const QColor & | getBackgroundColor () const |
bool | getCameraFrustumsSelectable () const |
const QColor & | getCameraFrustumSymbolColor () const |
const QColor & | getCameraFrustumSymbolLineColor () const |
bool | getDepthPeelingEnabled () const |
FaceCulling | getFaceCulling () const |
int | getHudFontSize () const |
float | getLineWidth () const |
unsigned int | getMaxTextureSize () const |
int | getNumAntialiasingSamples () const |
unsigned | getNumDepthLayers () const |
float | getPointSize () const |
RenderFilter & | getRenderFilter () |
const RenderFilter & | getRenderFilter () const |
bool | getRenderWhileModelsQueuedForProcessing () const |
bool | getShowCameraFrustums () const |
bool | getShowHud () const |
bool | getShowOverlays () const |
bool | getShowSymbols () const |
float | getSsaoAttenuation () const |
bool | getSsaoEnabled () const |
int | getSsaoNumSamples () const |
float | getSsaoSampleLength () const |
float | getSsaoStrength () const |
bool | getSuppressCameraWarnings () const |
const QColor & | getSymbolColor () const |
double | getSymbolLineWidth () const |
double | getSymbolSize () const |
SymbolSizeCoordinateSystem | getSymbolSizeCoordinateSystem () const |
bool | operator!= (const RenderSettings &rhs) const |
RenderSettings & | operator= (const RenderSettings &rhs) |
bool | operator== (const RenderSettings &rhs) const |
void | setAntialiasingEnabled (bool b) |
void | setBackgroundColor (const QColor &color) |
void | setCameraFrustumsSelectable (bool b) |
void | setCameraFrustumSymbolColor (const QColor &color) |
void | setCameraFrustumSymbolLineColor (const QColor &color) |
void | setDepthPeelingEnabled (bool b) |
void | setFaceCulling (FaceCulling culling) |
void | setHudFontSize (int size) |
void | setLineWidth (float width) |
void | setMaxTextureSize (unsigned int val) |
void | setNumAntialiasingSamples (int n) |
void | setNumDepthLayers (unsigned n) |
void | setPointSize (float size) |
void | setRenderFilter (const RenderFilter &val) |
void | setRenderWhileModelsQueuedForProcessing (bool b) |
void | setShowCameraFrustums (bool b) |
void | setShowHud (bool b) |
void | setShowOverlays (bool b) |
void | setShowSymbols (bool b) |
void | setSsaoAttenuation (float a) |
void | setSsaoEnabled (bool b) |
void | setSsaoNumSamples (int n) |
void | setSsaoSampleLength (float l) |
void | setSsaoStrength (float s) |
void | setSuppressCameraWarnings (bool b) |
void | setSymbolColor (const QColor &color) |
void | setSymbolLineWidth (double width) |
void | setSymbolSize (double size) |
void | setSymbolSizeCoordinateSystem (SymbolSizeCoordinateSystem coordSys) |
Public Member Functions inherited from ObjectGroup | |
~ObjectGroup () override | |
bool | add (const QString &name, DataObject &obj) |
bool | canSerialize () const override |
ObjectGroup * | clone () const override=0 |
bool | empty () const |
void | ensureGroupHasData () |
void | erase (int index) |
DataObject * | getChild (const QString &name) |
const DataObject * | getChild (const QString &name) const |
DataObject & | getDataObject (int index) |
const DataObject & | getDataObject (int index) const |
int | getIndex (const QString &name) const |
const QString & | getName (int index) const |
virtual QString | getPreferedWidget (const QString &name) const |
bool | hasData () const |
bool | haveName (const QString &name) const |
bool | insert (const QString &name, DataObject &obj, int index=-1) |
bool | load (const QJsonDocument &doc) |
bool | load (const SerializedItem &item) override |
bool | save (QJsonDocument &doc) const |
bool | save (SerializedItem &item) const override |
unsigned | size () const |
Public Member Functions inherited from Clonable | |
virtual | ~Clonable ()=default |
virtual Clonable * | clone () const =0 |
Public Member Functions inherited from Serialize | |
virtual | ~Serialize ()=default |
virtual bool | canSerialize () const =0 |
virtual bool | load (const SerializedItem &item)=0 |
virtual bool | save (SerializedItem &item) const =0 |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectGroup | |
ObjectGroup () | |
void | clear () |
ObjectGroup & | operator= (const ObjectGroup &rhs) |
bool | operator== (const ObjectGroup &rhs) const |
void | swap (ObjectGroup &rhs) |
The RenderSettings class contains all of the settings that are required by the WSGLRenderer to produce a render EXCEPT picking settings, which are properties of the WSGLWidget a renderer may be attached to. There are a large number of parameters that must be set in order to configure a render, which without this class, would complicate the WSGLRenderer's public interface and therefore, the interface of any classes that use it within their implementation.
It also allows us to robustly manage any dependencies between settings.
enum FaceCulling |
RenderSettings | ( | ) |
RenderSettings | ( | const RenderSettings & | other | ) |
|
override |
|
overridevirtual |
We redeclare this function only so that the more derived return type is available without casting.
Implements ObjectGroup.
bool getAntialiasingEnabled | ( | ) | const |
const QColor & getBackgroundColor | ( | ) | const |
bool getCameraFrustumsSelectable | ( | ) | const |
const QColor & getCameraFrustumSymbolColor | ( | ) | const |
const QColor & getCameraFrustumSymbolLineColor | ( | ) | const |
bool getDepthPeelingEnabled | ( | ) | const |
RenderSettings::FaceCulling getFaceCulling | ( | ) | const |
int getHudFontSize | ( | ) | const |
float getLineWidth | ( | ) | const |
unsigned int getMaxTextureSize | ( | ) | const |
int getNumAntialiasingSamples | ( | ) | const |
unsigned getNumDepthLayers | ( | ) | const |
float getPointSize | ( | ) | const |
CSIRO::Rendering::RenderFilter & getRenderFilter | ( | ) |
const CSIRO::Rendering::RenderFilter & getRenderFilter | ( | ) | const |
bool getRenderWhileModelsQueuedForProcessing | ( | ) | const |
bool getShowCameraFrustums | ( | ) | const |
bool getShowHud | ( | ) | const |
The Heads-up-display is an overlay displayed in a render which reports basic render information, such as the camera's position, orientation and field of view, and the current frames-per-second.
bool getShowOverlays | ( | ) | const |
bool getShowSymbols | ( | ) | const |
float getSsaoAttenuation | ( | ) | const |
bool getSsaoEnabled | ( | ) | const |
int getSsaoNumSamples | ( | ) | const |
float getSsaoSampleLength | ( | ) | const |
float getSsaoStrength | ( | ) | const |
bool getSuppressCameraWarnings | ( | ) | const |
const QColor & getSymbolColor | ( | ) | const |
double getSymbolLineWidth | ( | ) | const |
double getSymbolSize | ( | ) | const |
RenderSettings::SymbolSizeCoordinateSystem getSymbolSizeCoordinateSystem | ( | ) | const |
|
inline |
RenderSettings & operator= | ( | const RenderSettings & | rhs | ) |
rhs |
bool operator== | ( | const RenderSettings & | rhs | ) | const |
void setAntialiasingEnabled | ( | bool | b | ) |
b | True if antialiasing is enabled in the renderer, false otherwise. |
void setBackgroundColor | ( | const QColor & | color | ) |
color | The background color to use for the render. |
void setCameraFrustumsSelectable | ( | bool | b | ) |
b | True if camera frustums should be interactively selectable using picking, false otherwise. |
void setCameraFrustumSymbolColor | ( | const QColor & | color | ) |
color |
void setCameraFrustumSymbolLineColor | ( | const QColor & | color | ) |
void setDepthPeelingEnabled | ( | bool | b | ) |
b | If set to true, depth peeling is enabled. |
Depth peeling is a method of rendering transparent objects in a realistic way using an order-independent technique. It can be costly to enable so it is recommended for use only in scenes with many overlapping transparent surfaces, or in final, high-quality renders.
void setFaceCulling | ( | FaceCulling | culling | ) |
culling | Whether to use back, front or no culling at all. |
void setHudFontSize | ( | int | size | ) |
size | The desired pt size of the HUD font. |
void setLineWidth | ( | float | width | ) |
width | The width of lines that will be rendered by the renderer. |
void setMaxTextureSize | ( | unsigned int | val | ) |
void setNumAntialiasingSamples | ( | int | n | ) |
n | The number of samples to use when antialiasing. |
void setNumDepthLayers | ( | unsigned | n | ) |
n | The number of layers to use in the depth peeling. The more layers, the more layers of overlapping transparent surfaces can be seen in the scene, with a performance cost per layer. |
void setPointSize | ( | float | size | ) |
size | The size (in pixels) to use for points rendered by the WSGLRenderer. |
void setRenderFilter | ( | const RenderFilter & | val | ) |
void setRenderWhileModelsQueuedForProcessing | ( | bool | b | ) |
b | If true, the scene will continue to be rendered while models are awaiting processing. If false, frames will only be rendered once all queued items have been processed. |
void setShowCameraFrustums | ( | bool | b | ) |
b |
void setShowHud | ( | bool | b | ) |
b | If set to true, the Heads-up-display will be shown. If false, it will be invisible. |
The Heads-up-display is an overlay displayed in a render which reports basic render information, such as the camera's position, orientation and field of view, and the current frames-per-second.
void setShowOverlays | ( | bool | b | ) |
b | Whether or not to show overlays when rendering. |
void setShowSymbols | ( | bool | b | ) |
b | If set to true, the renderer will display symbols for items in a scene which would be otherwise un-renderable, such as a camera, a light or a clipping plane. |
void setSsaoAttenuation | ( | float | a | ) |
a | The desired attenuation for the screen space ambient occlusion effect. |
void setSsaoEnabled | ( | bool | b | ) |
b | If true, enable Screen Space Ambient Occlusion |
void setSsaoNumSamples | ( | int | n | ) |
n | The desired number of samples for screen space ambient occlusion. |
void setSsaoSampleLength | ( | float | l | ) |
l | The desired sample length for the screen space ambient occlusion. |
void setSsaoStrength | ( | float | s | ) |
s | The desired strength of the screen space ambient occlusion effect. |
void setSuppressCameraWarnings | ( | bool | b | ) |
b | If true, camera warnings will be suppressed by the renderer. These camera warnings are shown whenever no camera exists in the scene, which can happen quite regularly when a scene is modified frequently (such as when the SceneInteractionWidget is editing the scene. |
void setSymbolColor | ( | const QColor & | color | ) |
color | The desired symbol color. |
void setSymbolLineWidth | ( | double | width | ) |
width | The desired symbol line width. |
void setSymbolSize | ( | double | size | ) |
size | The size of the symbols in either world space or screen space, depending on what the value of getSymbolSizeCoordinateSystem(). |
void setSymbolSizeCoordinateSystem | ( | SymbolSizeCoordinateSystem | coordSys | ) |
coordSys | The desired coordinate system that SymboSize os represented in. |