Class FogSpaceComponent

Inheritance Relationships

Base Types

Class Documentation

class FogSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IThirdPartyComponentRef, public csp::multiplayer::ITransformComponent, public csp::multiplayer::IVisibleComponent

Add a depth-based fog volume to your space.

Public Functions

FogSpaceComponent(SpaceEntity *Parent)

Constructs the fog space component, and associates it with the specified Parent space entity.

Parameters

Parent – The Space entity that owns this component.

FogMode GetFogMode() const

Retrieves the type of fog currently used by this fog component.

Returns

The modality of fog currently used by this component.

void SetFogMode(FogMode Value)

Sets the type of fog currently to be used by this fog component.

Parameters

Value – The modality of fog to be used by this component.

float GetStartDistance() const

Get start sistance Note: Distance from camera that the fog will start.

Note: 0 = this property has no effect.

Returns

Current start distance

void SetStartDistance(float Value)

Set Current start distance Note: Distance from camera that the fog will start.

Note: 0 = this property has no effect.

Parameters

Value – float : Current start distance

float GetEndDistance() const

Get Current end distance Note: objects passed this distance will not be affected by fog.

Note: 0 = this property has no effect.

Returns

Current end distance

void SetEndDistance(float Value)

Set Current end distance Note: objects passed this distance will not be affected by fog.

Note: 0 = this property has no effect.

Parameters

Value – float : Current end distance

const csp::common::Vector3 &GetColor() const

Get fog color.

Returns

Current fog color

void SetColor(const csp::common::Vector3 &Value)

Set Current fog color.

Parameters

Value – float : Current fog color

float GetDensity() const

Get Global density factor Note: Global density factor.

Returns

Current Global density factor

void SetDensity(float Value)

Set Global density factor Note: Global density factor.

Parameters

Value – float : Global density factor

float GetHeightFalloff() const

Get Height density factor Note: Height density factor, controls how the density increases and height decreases.

Smaller values make the visible transition larger.

Returns

Current Height density factor

void SetHeightFalloff(float Value)

Set Height density factor Note: Height density factor, controls how the density increases and height decreases.

Smaller values make the visible transition larger.

Parameters

Value – float : Height density factor

float GetMaxOpacity() const

Get Maximum opacity of the Fog.

Maximum opacity of the Fog. Note: 1 = fog becomes fully opaque at a distance and replaces the scene colour completely. Note: 0 = fog colour will have no impact.

Returns

Current Maximum opacity of the Fog

void SetMaxOpacity(float Value)

Set Maximum opacity of the Fog.

Parameters

Value – float : Maximum opacity of the Fog.

bool GetIsVolumetric() const

Get Is Fog Volumetric.

Parameters

Value – float : Fog Volumetric Flag

void SetIsVolumetric(bool Value)

Set Is Fog Volumetric.

Parameters

Value – float : Is Fog Volumetric Flag