Skip to content

Kuesa::Qt3D::DirectionalLight

Module: Kuesa Qt 3D API

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

#include <Kuesa/Qt3D/api/lights/directionallight.h>

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

Public Types

Name
enum DirectionMode { World = 0, Local}

Public Slots

Name
void setDirection(const QVector3D & direction)
void setDirectionMode(Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode)

Public Signals

Name
void directionChanged(const QVector3D & direction)
void directionModeChanged(Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode)

Public Functions

Name
DirectionalLight(Qt3DCore::QNode * parent =nullptr)
~DirectionalLight()
QVector3D direction() const
Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode() const

Protected Functions

Name
DirectionalLight(DirectionalLightPrivate & dd, Qt3DCore::QNode * parent =nullptr)

Public Properties

Name
QVector3D direction
Encapsulate a Directional Light object in a Qt 3D scene.
Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode

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::DirectionalLight;

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

Since: Kuesa 2.0

Public Types Documentation

enum DirectionMode

Enumerator Value Description
World 0
Local

Public Slots Documentation

slot setDirection

1
2
3
void setDirection(
    const QVector3D & direction
)

slot setDirectionMode

1
2
3
void setDirectionMode(
    Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode
)

Public Signals Documentation

signal directionChanged

1
2
3
void directionChanged(
    const QVector3D & direction
)

signal directionModeChanged

1
2
3
void directionModeChanged(
    Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode
)

Public Functions Documentation

function DirectionalLight

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

function ~DirectionalLight

1
~DirectionalLight()

function direction

1
QVector3D direction() const

function directionMode

1
Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode() const

Protected Functions Documentation

function DirectionalLight

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

Public Property Documentation

property direction

1
QVector3D direction;

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

Since: Kuesa 2.0

Specifies the direction of the light. If the directionType is Local, the light direction wil lbe transformed by any rotations in parent nodes. If the directionType is World, the direction is unaffected by any transformations in parent nodes.

property directionMode

1
Kuesa::Qt3D::DirectionalLight::DirectionMode directionMode;

Specifies the direction of the light. If the directionType is Specifies whether the direction property should be interpreted as a world or local direction. Local directions inherit parent node rotation transformations and World directions do not. The default is World.


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