Class LightSpaceComponent

Inheritance Relationships

Base Types

Class Documentation

class LightSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IPositionComponent, public csp::multiplayer::IRotationComponent, public csp::multiplayer::IThirdPartyComponentRef, public csp::multiplayer::IVisibleComponent

Adds various types of lighting to a SpaceEntity, such as directional, point, or spotlights.

This component is essential for creating realistic lighting effects and controlling how objects are illuminated within the space.

Public Functions

LightSpaceComponent(SpaceEntity *Parent)

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

Parameters

Parent – The Space entity that owns this component.

LightType GetLightType() const

Gets the type of light of this light component.

Returns

The type of light of this light component.

void SetLightType(LightType Value)

Sets the type of light of this light component.

Parameters

Value – The type of light of this light component.

LightShadowType GetLightShadowType() const

Gets the type of light shadow of this light component.

Returns

The type of light shadow of this light component.

void SetLightShadowType(LightShadowType Value)

Sets the type of light shadow of this light component.

Parameters

Value – The type of light shadow of this light component.

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

Gets the color of the light of this component.

Returns

The color of the light of this component.

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

Sets the color of the light of this component.

Parameters

Value – The color of the light of this component.

float GetIntensity() const

Gets the intensity of the light of this component.

Returns

The intensity of the light of this component.

void SetIntensity(float Value)

Sets the intensity of the light of this component.

Parameters

Value – The intensity of the light of this component.

float GetRange() const

Gets the range within which the light of this component affects the surrounding 3D scene.

Returns

The range within which the light of this component affects the surrounding 3D scene.

void SetRange(float Value)

Sets the range within which the light of this component affects the surrounding 3D scene.

Parameters

Value – The range within which the light of this component affects the surrounding 3D scene.

float GetInnerConeAngle() const

Gets the angle of the inner cone in a spotlight.

Returns

The angle of the inner cone in a spotlight.

void SetInnerConeAngle(float Value)

Sets the angle of the inner cone in a spotlight.

Parameters

Value – The angle of the inner cone in a spotlight.

float GetOuterConeAngle() const

Gets the angle of the outer cone in a spotlight.

Returns

The angle of the outer cone in a spotlight.

void SetOuterConeAngle(float Value)

Sets the angle of the outer cone in a spotlight.

Parameters

Value – The angle of the outer cone in a spotlight.

const csp::common::String &GetLightCookieAssetId() const

Gets the ID of the asset used for the light cookie of this light component.

Returns

The ID of the asset used for the light cookie of this light component.

void SetLightCookieAssetId(const csp::common::String &Value)

Sets the ID of the asset used for the light cookie of this light component.

Parameters

Value – The ID of the asset used for the light cookie of this light component.

const csp::common::String &GetLightCookieAssetCollectionId() const

Gets the ID of the asset collection used for the light cookie of this light component.

Returns

The ID of the asset collection used for the light cookie of this light component.

void SetLightCookieAssetCollectionId(const csp::common::String &Value)

Sets the ID of the asset collection used for the light cookie of this light component.

Parameters

Value – The ID of the asset collection used for the light cookie of this light component.

LightCookieType GetLightCookieType() const

Gets the type of the light cookie used by this light component.

Returns

The type of the light cookie used by this light component.

void SetLightCookieType(LightCookieType Value)

Sets the type of the light cookie used by this light component.

Parameters

Value – The type of the light cookie used by this light component.