Skip to content

Kuesa::Qt3D::SpotLight

Module: Kuesa Qt 3D API

Encapsulate a Spot Light object in a Qt 3D scene. More...

#include <spotlight.h>

Inherits from Kuesa::Qt3D::ShadowCastingLight, Qt3DRender::QAbstractLight

Public Slots

Name
void setLocalDirection(const QVector3D & localDirection)
void setInnerConeAngle(float innerConeAngle)
void setOuterConeAngle(float outerConeAngle)
void setRange(float range)

Public Signals

Name
void localDirectionChanged(const QVector3D & localDirection)
void innerConeAngleChanged(float innerConeAngle)
void outerConeAngleChanged(float outerConeAngle)
void rangeChanged(float range)

Public Functions

Name
SpotLight(Qt3DCore::QNode * parent =nullptr)
~SpotLight()
QVector3D localDirection() const
float innerConeAngle() const
float outerConeAngle() const
float range() const

Protected Functions

Name
SpotLight(SpotLightPrivate & dd, Qt3DCore::QNode * parent =nullptr)

Public Properties

Name
QVector3D localDirection
Encapsulate a Spot Light object in a Qt 3D scene.
float innerConeAngle
float outerConeAngle
float range

Additional inherited members

Public Slots inherited from Kuesa::Qt3D::ShadowCastingLight

Name
void setCastsShadows(bool castsShadows)
void setLightViewProjectionMatrix(const QMatrix4x4 & matrix)
void setTextureSize(const QSize & textureSize)
void setShadowMapBias(float bias)
void setNearPlane(float nearPlane)
void setSoftShadows(bool softShadows)
void setLightIndex(int index)
void setNearFarPlanes(float near, float far)

Public Signals inherited from Kuesa::Qt3D::ShadowCastingLight

Name
void castsShadowsChanged(bool castsShadows)
void textureSizeChanged(const QSize & textureSize)
void depthTextureChanged(Qt3DRender::QAbstractTexture * depthTexture)
void biasChanged(float bias)
void nearPlaneChanged(float nearPlane)
void softShadowsChanged(bool softShadows)

Public Functions inherited from Kuesa::Qt3D::ShadowCastingLight

Name
~ShadowCastingLight()
bool castsShadows() const
QSize textureSize() const
float shadowMapBias() const
float nearPlane() const
bool softShadows() const

Protected Functions inherited from Kuesa::Qt3D::ShadowCastingLight

Name
ShadowCastingLight(ShadowCastingLightPrivate & dd, Qt3DCore::QNode * parent =nullptr)

Public Properties inherited from Kuesa::Qt3D::ShadowCastingLight

Name
bool castsShadows
Encapsulate a light object that is able to cast shadows in a Qt 3D scene.
bool softShadows
QSize textureSize
float shadowMapBias
float nearPlane

Detailed Description

1
class Kuesa::Qt3D::SpotLight;

Encapsulate a Spot Light object in a Qt 3D scene.

Since: Kuesa 2.0

Public Slots Documentation

slot setLocalDirection

1
2
3
void setLocalDirection(
    const QVector3D & localDirection
)

slot setInnerConeAngle

1
2
3
void setInnerConeAngle(
    float innerConeAngle
)

slot setOuterConeAngle

1
2
3
void setOuterConeAngle(
    float outerConeAngle
)

slot setRange

1
2
3
void setRange(
    float range
)

Public Signals Documentation

signal localDirectionChanged

1
2
3
void localDirectionChanged(
    const QVector3D & localDirection
)

signal innerConeAngleChanged

1
2
3
void innerConeAngleChanged(
    float innerConeAngle
)

signal outerConeAngleChanged

1
2
3
void outerConeAngleChanged(
    float outerConeAngle
)

signal rangeChanged

1
2
3
void rangeChanged(
    float range
)

Public Functions Documentation

function SpotLight

1
2
3
explicit SpotLight(
    Qt3DCore::QNode * parent =nullptr
)

function ~SpotLight

1
~SpotLight()

function localDirection

1
QVector3D localDirection() const

function innerConeAngle

1
float innerConeAngle() const

function outerConeAngle

1
float outerConeAngle() const

function range

1
float range() const

Protected Functions Documentation

function SpotLight

1
2
3
4
explicit SpotLight(
    SpotLightPrivate & dd,
    Qt3DCore::QNode * parent =nullptr
)

Public Property Documentation

property localDirection

1
QVector3D localDirection;

Encapsulate a Spot Light object in a Qt 3D scene.

Since: Kuesa 2.0

Specifies the local direction of the spot light. Local direction is affected by parent transform rotations.

property innerConeAngle

1
float innerConeAngle;

Specifies the angle from center of the spot light where light begins to fall off. The value must be greater than or equal to 0 and less than outerConeAngle.

property outerConeAngle

1
float outerConeAngle;

Specifies the cut off angle of the spot light. Objects outside this angle receives no light from the SpotLight. The value must be greater than innerConeAngle and less than or equal to 180.

property range

1
float range;

Specifies the destance at which the light intensity may be considered to have reached zero and has no effect. A range of 0 (default) indicates infinite range


Updated on 2023-07-03 at 11:02:12 +0000