#include <hps.h>
Public Member Functions | |
VisualEffectsControl (SegmentKey &in_seg) | |
VisualEffectsControl (VisualEffectsControl const &in_that) | |
VisualEffectsControl (VisualEffectsControl &&in_that) | |
VisualEffectsControl & | operator= (VisualEffectsControl &&in_that) |
~VisualEffectsControl () | |
HPS::Type | ObjectType () const |
VisualEffectsControl & | operator= (VisualEffectsControl const &in_that) |
VisualEffectsControl & | SetPostProcessEffectsEnabled (bool in_state) |
VisualEffectsControl & | SetAntiAliasing (bool in_state) |
VisualEffectsControl & | SetShadowMaps (bool in_state, unsigned int in_samples=4, unsigned int in_resolution=1024, bool in_view_dependent=true, bool in_jitter=true) |
VisualEffectsControl & | SetShadowMaps (unsigned int in_samples, unsigned int in_resolution, bool in_view_dependent, bool in_jitter) |
VisualEffectsControl & | SetSimpleShadow (bool in_state, unsigned int in_resolution=256, unsigned int in_blurring=1, bool in_ignore_transparency=false) |
VisualEffectsControl & | SetSimpleShadow (unsigned int in_resolution, unsigned int in_blurring, bool in_ignore_transparency) |
VisualEffectsControl & | SetSimpleShadowPlane (Plane const &in_projected_onto=Plane(0.0f, 1.0f, 0.0f, 1.0f)) |
VisualEffectsControl & | SetSimpleShadowLightDirection (Vector const &in_direction=Vector(0.0f, 1.0f, 0.0f)) |
VisualEffectsControl & | SetSimpleShadowColor (RGBAColor const &in_color=RGBAColor(0.0f, 0.0f, 0.0f, 1.0f)) |
VisualEffectsControl & | SetSimpleReflection (bool in_state, float in_opacity=0.5f, unsigned int in_blurring=1, bool in_fading=false, float in_attenuation_near_distance=0.0f, float in_attenuation_far_distance=Float::Infinity) |
VisualEffectsControl & | SetSimpleReflection (float in_opacity, unsigned int in_blurring, bool in_fading, float in_attenuation_near_distance, float in_attenuation_far_distance) |
VisualEffectsControl & | SetSimpleReflectionPlane (Plane const &in_projected_onto=Plane(0.0f, 1.0f, 0.0f, 1.0f)) |
VisualEffectsControl & | SetSimpleReflectionVisibility (VisibilityKit const &in_reflected_types) |
VisualEffectsControl & | UnsetPostProcessEffectsEnabled () |
VisualEffectsControl & | UnsetAntiAliasing () |
VisualEffectsControl & | UnsetShadowMaps () |
VisualEffectsControl & | UnsetSimpleShadow () |
VisualEffectsControl & | UnsetSimpleShadowPlane () |
VisualEffectsControl & | UnsetSimpleShadowLightDirection () |
VisualEffectsControl & | UnsetSimpleShadowColor () |
VisualEffectsControl & | UnsetSimpleReflection () |
VisualEffectsControl & | UnsetSimpleReflectionPlane () |
VisualEffectsControl & | UnsetSimpleReflectionVisibility () |
VisualEffectsControl & | UnsetEverything () |
bool | ShowPostProcessEffectsEnabled (bool &out_state) const |
bool | ShowAntiAliasing (bool &out_state) const |
bool | ShowShadowMaps (bool &out_state, unsigned int &out_samples, unsigned int &out_resolution, bool &out_view_dependent, bool &out_jitter) const |
bool | ShowSimpleShadow (bool &out_state, unsigned int &out_resolution, unsigned int &out_blurring, bool &out_ignore_transparency) const |
bool | ShowSimpleShadowPlane (Plane &out_projected_onto) const |
bool | ShowSimpleShadowLightDirection (Vector &out_direction) const |
bool | ShowSimpleShadowColor (RGBAColor &out_color) const |
bool | ShowSimpleReflection (bool &out_state, float &out_opacity, unsigned int &out_blurring, bool &out_fading, float &out_attenuation_near_distance, float &out_attenuation_far_distance) const |
bool | ShowSimpleReflectionPlane (Plane &out_projected_onto) const |
bool | ShowSimpleReflectionVisibility (VisibilityKit &out_reflected_types) const |
![]() | |
Object & | operator= (Object const &other_object) |
Object (Object &&in_that) | |
Object & | operator= (Object &&in_that) |
HPS::Type | Type () const |
virtual bool | Empty () const |
virtual void | Reset () |
bool | HasType (HPS::Type in_mask) const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
![]() | |
Control (Control &&in_that) | |
Control & | operator= (Control &&in_that) |
The HPS::VisualEffectsControl class is a smart pointer that is tied to a database object. This object enables you to set and unset various visual effects, such as shadows (including shadow color), reflection planes, and anti-aliasing.
Default values for the various fields of HPS::VisualEffectsControl can be found here.
|
explicit |
Initializes a control tied to the segment in_seg.
HPS::VisualEffectsControl::VisualEffectsControl | ( | VisualEffectsControl const & | in_that | ) |
Initializes a control tied to the same object as in_that.
HPS::VisualEffectsControl::VisualEffectsControl | ( | VisualEffectsControl && | in_that | ) |
The move constructor creates a VisualEffectsControl by transferring the underlying impl of the rvalue reference to this VisualEffectsControl thereby avoiding a copy and allocation.
in_that | An rvalue reference to a VisualEffectsControl to take the impl from. |
HPS::VisualEffectsControl::~VisualEffectsControl | ( | ) |
Releases a reference to the database object this control is tied to.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Control.
VisualEffectsControl& HPS::VisualEffectsControl::operator= | ( | VisualEffectsControl && | in_that | ) |
The move assignment operator transfers the underlying impl of the rvalue reference to this VisualEffectsControl thereby avoiding a copy.
in_that | An rvalue reference to a VisualEffectsControl to take the impl from. |
VisualEffectsControl& HPS::VisualEffectsControl::operator= | ( | VisualEffectsControl const & | in_that | ) |
Share the smart-pointer.
VisualEffectsControl& HPS::VisualEffectsControl::SetAntiAliasing | ( | bool | in_state | ) |
Manipulates the state of anti-aliasing.
in_state | Whether anti-aliasing should be used. |
VisualEffectsControl& HPS::VisualEffectsControl::SetPostProcessEffectsEnabled | ( | bool | in_state | ) |
Allows all post-processing effects to be enabled or disabled en masse on a per segment basis.
in_state | Whether post-processing effects should be used. |
VisualEffectsControl& HPS::VisualEffectsControl::SetShadowMaps | ( | bool | in_state, |
unsigned int | in_samples = 4 , |
||
unsigned int | in_resolution = 1024 , |
||
bool | in_view_dependent = true , |
||
bool | in_jitter = true |
||
) |
Manipulates the state of shadow maps in the scene.
in_state | Whether shadow maps should be used. |
in_samples | The number of locations in the shadow map used to determine the percentage value of light received by a pixel in the rendered scene. |
in_resolution | The width and height of the shadow map. This value will be clamped up/down to 512, 1024 or 2048. |
in_view_dependent | When enabled, the view frustum is taken into account when generating shadow maps. This results in significantly better visual quality, but at the cost of not being able to reuse shadow maps from previous frames, even if the lighting is constant with respect to the scene. |
in_jitter | Turning this on causes stochastic sampling of shadow maps. This should reduce aliasing in the shadow map. |
VisualEffectsControl& HPS::VisualEffectsControl::SetShadowMaps | ( | unsigned int | in_samples, |
unsigned int | in_resolution, | ||
bool | in_view_dependent, | ||
bool | in_jitter | ||
) |
Manipulates the state of shadow maps in the scene. The state is implicitly on.
in_samples | The number of locations in the shadow map used to determine the percentage value of light received by a pixel in the rendered scene. |
in_resolution | The width and height of the shadow map. This value will be clamped up/down to 512, 1024 or 2048. |
in_view_dependent | When enabled, the view frustum is taken into account when generating shadow maps. This results in significantly better visual quality, but at the cost of not being able to reuse shadow maps from previous frames, even if the lighting is constant with respect to the scene. |
in_jitter | Turning this on causes stochastic sampling of shadow maps. This should reduce aliasing in the shadow map. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleReflection | ( | bool | in_state, |
float | in_opacity = 0.5f , |
||
unsigned int | in_blurring = 1 , |
||
bool | in_fading = false , |
||
float | in_attenuation_near_distance = 0.0f , |
||
float | in_attenuation_far_distance = Float::Infinity |
||
) |
Manipulates the state of simple reflections, projected onto a plane.
in_state | Whether simple shadows should be used. |
in_opacity | An alpha value that sets the transparency level of the reflection plane. Valid range is [0,1] with a value of zero making the plane completely transparent. |
in_blurring | The level of blurring (softening) that is applied to the shadow. Valid range is [1,31]. |
in_fading | Whether the reflection plane should fade as it moves away from the camera. |
in_attenuation_near_distance | The orthogonal distances (in world space) from the reflection plane that the model begins to fade. Attenuation begins at in_attenuation_near_distance and increases linearly such that the model is not visible in the reflection beyond in_attenuation_far_distance. |
in_attenuation_far_distance | The orthogonal distances (in world space) from the reflection plane that the model is completely faded. Attenuation begins at in_attenuation_near_distance and increases linearly such that the model is not visible in the reflection beyond in_attenuation_far_distance. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleReflection | ( | float | in_opacity, |
unsigned int | in_blurring, | ||
bool | in_fading, | ||
float | in_attenuation_near_distance, | ||
float | in_attenuation_far_distance | ||
) |
Manipulates the state of simple reflections, projected onto a plane. The state is implicitly on.
in_opacity | An alpha value that sets the transparency level of the reflection plane. Valid range is [0,1] with a value of zero making the plane completely transparent. |
in_blurring | The level of blurring (softening) that is applied to the shadow. Valid range is [1,31]. |
in_fading | Whether the reflection plane should fade as it moves away from the camera. |
in_attenuation_near_distance | The orthogonal distances (in world space) from the reflection plane that the model begins to fade. Attenuation begins at in_attenuation_near_distance and increases linearly such that the model is not visible in the reflection beyond in_attenuation_far_distance. |
in_attenuation_far_distance | The orthogonal distances (in world space) from the reflection plane that the model is completely faded. Attenuation begins at in_attenuation_near_distance and increases linearly such that the model is not visible in the reflection beyond in_attenuation_far_distance. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleReflectionPlane | ( | Plane const & | in_projected_onto = Plane(0.0f, 1.0f, 0.0f, 1.0f) | ) |
Manipulates the location and orientation of the plane that simple reflections are projected onto.
in_projected_onto | The plane that simple reflections should be projected onto. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleReflectionVisibility | ( | VisibilityKit const & | in_reflected_types | ) |
Defines the visibility settings for the model when rendered in the reflection plane.
in_reflected_types | A collection of visibility settings that will be applied to the reflected geometry. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleShadow | ( | bool | in_state, |
unsigned int | in_resolution = 256 , |
||
unsigned int | in_blurring = 1 , |
||
bool | in_ignore_transparency = false |
||
) |
Manipulates the state of simple shadows, projected onto a plane.
in_state | Whether simple shadows should be used. |
in_resolution | The width and height of the simple shadow. Valid range is [32, 1024]. |
in_blurring | The level of blurring (softening) that is applied to the shadow. Valid range is [1,31]. |
in_ignore_transparency | Whether any segment-level transparency setting should be ignored when rendering the simple shadow. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleShadow | ( | unsigned int | in_resolution, |
unsigned int | in_blurring, | ||
bool | in_ignore_transparency | ||
) |
Manipulates the state of simple shadows, projected onto a plane. The state is implicitly on.
in_resolution | The width and height of the simple shadow. Valid range is [32, 1024]. |
in_blurring | The level of blurring (softening) that is applied to the shadow. Valid range is [1,31]. |
in_ignore_transparency | Whether any segment-level transparency setting should be ignored when rendering the simple shadow. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleShadowColor | ( | RGBAColor const & | in_color = RGBAColor(0.0f, 0.0f, 0.0f, 1.0f) | ) |
Sets the color that simple shadows will be rendered in.
in_color | The color of simple shadows. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleShadowLightDirection | ( | Vector const & | in_direction = Vector(0.0f, 1.0f, 0.0f) | ) |
Sets the direction that the light source for a simple shadow is coming from.
in_direction | The direction that the light source for a simple shadow is coming from. |
VisualEffectsControl& HPS::VisualEffectsControl::SetSimpleShadowPlane | ( | Plane const & | in_projected_onto = Plane(0.0f, 1.0f, 0.0f, 1.0f) | ) |
Manipulates the location and orientation of the plane that simple shadows are projected onto.
in_projected_onto | The plane that simple shadows should be projected onto. |
bool HPS::VisualEffectsControl::ShowAntiAliasing | ( | bool & | out_state | ) | const |
Shows the anti-aliasing setting.
out_state | Whether anti-aliasing should be used. |
bool HPS::VisualEffectsControl::ShowPostProcessEffectsEnabled | ( | bool & | out_state | ) | const |
Shows the post-processing effects setting.
out_state | Whether post-processing effects are enabled. |
bool HPS::VisualEffectsControl::ShowShadowMaps | ( | bool & | out_state, |
unsigned int & | out_samples, | ||
unsigned int & | out_resolution, | ||
bool & | out_view_dependent, | ||
bool & | out_jitter | ||
) | const |
Shows the shadow maps setting.
out_state | Whether shadow maps should be used. |
out_samples | The number of locations in the shadow map used to determine the percentage value of light received by a pixel in the rendered scene. |
out_resolution | The width and height of the shadow map. |
out_view_dependent | When enabled, the view frustum is taken into account when generating shadow maps. |
out_jitter | Whether stochastic sampling of shadow maps should be use to reduce aliasing in the shadow map. |
bool HPS::VisualEffectsControl::ShowSimpleReflection | ( | bool & | out_state, |
float & | out_opacity, | ||
unsigned int & | out_blurring, | ||
bool & | out_fading, | ||
float & | out_attenuation_near_distance, | ||
float & | out_attenuation_far_distance | ||
) | const |
Shows the simple reflection setting.
out_state | Whether simple shadows should be used. |
out_opacity | An alpha value that sets the transparency level of the reflection plane. |
out_blurring | The level of blurring (softening) that is applied to the shadow. |
out_fading | Whether the reflection plane should fade as it moves away from the camera. |
out_attenuation_near_distance | The orthogonal distances (in world space) from the reflection plane that the model begins to fade. |
out_attenuation_far_distance | The orthogonal distances (in world space) from the reflection plane that the model is completely faded. |
bool HPS::VisualEffectsControl::ShowSimpleReflectionPlane | ( | Plane & | out_projected_onto | ) | const |
Shows the simple reflection plane setting.
out_projected_onto | The plane that simple reflections should be projected onto. |
bool HPS::VisualEffectsControl::ShowSimpleReflectionVisibility | ( | VisibilityKit & | out_reflected_types | ) | const |
Shows the simple shadow visibility setting.
out_reflected_types | A collection of visibility settings that will be applied to the reflected geometry. |
bool HPS::VisualEffectsControl::ShowSimpleShadow | ( | bool & | out_state, |
unsigned int & | out_resolution, | ||
unsigned int & | out_blurring, | ||
bool & | out_ignore_transparency | ||
) | const |
Shows the simple shadow setting.
out_state | Whether simple shadows should be used. |
out_resolution | The width and height of the simple shadow. |
out_blurring | The level of blurring (softening) that is applied to the shadow. |
out_ignore_transparency | Whether any segment-level transparency setting should be ignored when rendering the simple shadow. |
bool HPS::VisualEffectsControl::ShowSimpleShadowColor | ( | RGBAColor & | out_color | ) | const |
Shows the simple shadow color setting.
out_color | The color of simple shadows. |
bool HPS::VisualEffectsControl::ShowSimpleShadowLightDirection | ( | Vector & | out_direction | ) | const |
Shows the simple shadow light direction setting.
out_direction | The direction that the light source for a simple shadow is coming from. |
bool HPS::VisualEffectsControl::ShowSimpleShadowPlane | ( | Plane & | out_projected_onto | ) | const |
Shows the simple shadow plane setting.
out_projected_onto | The plane that simple shadows should be projected onto. |
VisualEffectsControl& HPS::VisualEffectsControl::UnsetAntiAliasing | ( | ) |
Removes any anti-alias setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetEverything | ( | ) |
Removes all settings from this object.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetPostProcessEffectsEnabled | ( | ) |
Removes any post-processing effects setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetShadowMaps | ( | ) |
Removes any shadow maps setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleReflection | ( | ) |
Removes any simple reflection setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleReflectionPlane | ( | ) |
Removes any simple reflection plane setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleReflectionVisibility | ( | ) |
Removes any simple reflection visibility setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleShadow | ( | ) |
Removes any simple shadow setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleShadowColor | ( | ) |
Removes any simple shadow color setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleShadowLightDirection | ( | ) |
Removes any simple shadow light direction setting.
VisualEffectsControl& HPS::VisualEffectsControl::UnsetSimpleShadowPlane | ( | ) |
Removes any simple shadow plane setting.