LuciadCPillar 2023.1.03
luciad::AmbientOcclusionEffect Class Referencefinal

This class implements the Ambient occlusion effect, which shades areas of 3D geometry based on their proximity to other 3D geometry. More...

#include <luciad/maps/effects/AmbientOcclusionEffect.h>

Public Member Functions

 AmbientOcclusionEffect (const AmbientOcclusionEffect &)=delete
 
double getPower () const
 Returns the power factor which determines how strongly the effect is applied to the view. More...
 
double getRadius () const
 Returns the radius in meters at which the effect is sampled. More...
 
bool isEnabled () const
 
AmbientOcclusionEffectoperator= (const AmbientOcclusionEffect &)=delete
 
void set (double radius, double power)
 Sets the radius and power values for the ambient occlusion effect. More...
 
void setEnabled (bool enabled)
 Enables or disables the Ambient Occlusion effect. More...
 
void setPower (double power)
 Sets the power factor which determines how strongly the effect is applied to the view. More...
 
void setRadius (double radius)
 Sets the radius in meters at which the effect is sampled. More...
 

Detailed Description

This class implements the Ambient occlusion effect, which shades areas of 3D geometry based on their proximity to other 3D geometry.

This mimics a behavior of the real world where light gets trapped in tight areas. Typical examples are the corners of a room, which are slightly darker than the rest of the room as the light is trapped in the corners.

Left: ambient occlusion disabled, Right: ambient occlusion enabled

Ambient Occlusion is recommended for cases in which 3D datasets with simple colors, such as 3D CAD & BIM models, are visualized. For these types of datasets, Ambient Occlusion can help give the dataset more depth and make it easier to understand how geometry relates to each other. On top of that, it also improves the visual quality of such datasets, and gives an overall better impression.

Note that Ambient Occlusion is only applied in 3D views.

You cannot create an AmbientOcclusionEffect. Instead, you can retrieve it from luciad::GraphicsEffects::getAmbientOcclusion.

Since
2022.1

Constructor & Destructor Documentation

◆ AmbientOcclusionEffect()

luciad::AmbientOcclusionEffect::AmbientOcclusionEffect ( const AmbientOcclusionEffect )
delete

Member Function Documentation

◆ getPower()

double luciad::AmbientOcclusionEffect::getPower ( ) const

Returns the power factor which determines how strongly the effect is applied to the view.

Returns
the power factor which determines how strongly the effect is applied to the view.

◆ getRadius()

double luciad::AmbientOcclusionEffect::getRadius ( ) const

Returns the radius in meters at which the effect is sampled.

Returns
the radius in meters at which the effect is sampled.

◆ isEnabled()

bool luciad::AmbientOcclusionEffect::isEnabled ( ) const
Returns
if the Ambient Occlusion effect is enabled.

◆ operator=()

AmbientOcclusionEffect & luciad::AmbientOcclusionEffect::operator= ( const AmbientOcclusionEffect )
delete

◆ set()

void luciad::AmbientOcclusionEffect::set ( double  radius,
double  power 
)

Sets the radius and power values for the ambient occlusion effect.

Parameters
radiusradius in meters at which the effect should be sampled.
powera factor to brighten or darken the effect.
See also
setRadius
setPower

◆ setEnabled()

void luciad::AmbientOcclusionEffect::setEnabled ( bool  enabled)

Enables or disables the Ambient Occlusion effect.

The default is false.

Parameters
enabledtrue to enable the Ambient Occlusion effect or false to disable it.

◆ setPower()

void luciad::AmbientOcclusionEffect::setPower ( double  power)

Sets the power factor which determines how strongly the effect is applied to the view.

The power factor determines how much to brighten or darken the effect.

Values should be a positive floating point number, generally between 0 and 5. Higher values are accepted, but not recommended.

The default power value is 1.

Parameters
powerfactor to brighten or darken the effect.

◆ setRadius()

void luciad::AmbientOcclusionEffect::setRadius ( double  radius)

Sets the radius in meters at which the effect is sampled.

A lower value produces sharper results, while higher values produce softer results.

The default radius is 30m.

Parameters
radiusradius in meters at which the effect should be sampled.