Skip to content

Kuesa::Qt3D::SceneEntity

Module: Kuesa Qt 3D API

Root entity for Kuesa runtime. More...

#include <Kuesa/Qt3D/api/sceneentity.h>

Inherits from Qt3DCore::QEntity

Inherited by KuesaUtils::View3DScene

Public Signals

Name
void loadingDone()

Public Functions

Name
SceneEntity(Qt3DCore::QNode * parent =nullptr)
~SceneEntity()
AnimationClipCollection * animationClips() const
Q_INVOKABLE Qt3DAnimation::QAbstractAnimationClip * animationClip(const QString & name) const
ArmatureCollection * armatures() const
Q_INVOKABLE Qt3DCore::QArmature * armature(const QString & name) const
EffectCollection * effects() const
Q_INVOKABLE Qt3DRender::QEffect * effect(const QString & name) const
Q_INVOKABLE Qt3DRender::QEffect * effect(int effectPropertyFlags) const
LayerCollection * layers() const
Q_INVOKABLE Qt3DRender::QLayer * layer(const QString & name) const
MaterialCollection * materials() const
Q_INVOKABLE Kuesa::Qt3D::GLTF2MaterialProperties * material(const QString & name) const
MeshCollection * meshes() const
Q_INVOKABLE Qt3DRender::QGeometryRenderer * mesh(const QString & name) const
SkeletonCollection * skeletons() const
Q_INVOKABLE Qt3DCore::QAbstractSkeleton * skeleton(const QString & name) const
TextureCollection * textures() const
Q_INVOKABLE Qt3DRender::QAbstractTexture * texture(const QString & name) const
CameraCollection * cameras() const
Q_INVOKABLE Qt3DRender::QCamera * camera(const QString & name) const
EntityCollection * entities() const
Q_INVOKABLE Qt3DCore::QEntity * entity(const QString & name) const
TransformCollection * transforms() const
Q_INVOKABLE Qt3DCore::QTransform * transform(const QString & name) const
PlaceholderCollection * placeholders() const
Q_INVOKABLE Kuesa::Qt3D::Placeholder * placeholder(const QString & name) const
TextureImageCollection * textureImages() const
Q_INVOKABLE Qt3DRender::QAbstractTextureImage * textureImage(const QString & name)
AnimationMappingCollection * animationMappings() const
Q_INVOKABLE Qt3DAnimation::QChannelMapper * animationMapping(const QString & name)
Q_INVOKABLE void clearCollections()
Removes all assets from all the collections.
Q_INVOKABLE Qt3DCore::QNode * transformForEntity(const QString & name)
Q_INVOKABLE Qt3DRender::QAbstractTexture * brdfLut() const
SceneEntity::brdfLut Returns the brdfLut texture stored in the SceneEntity.
Kuesa::Qt3D::LightCollection * lights() const
Q_INVOKABLE Qt3DRender::QAbstractLight * light(const QString & name) const
Kuesa::Qt3D::ReflectionPlaneCollection * reflectionPlanes() const
Q_INVOKABLE Kuesa::Qt3D::ReflectionPlane * reflectionPlane(const QString & name) const
Q_INVOKABLE Kuesa::Qt3D::SceneEntity * findParentSceneEntity(Qt3DCore::QEntity * entity)

Public Properties

Name
Kuesa::Qt3D::AnimationClipCollection * animationClips
Kuesa::Qt3D::ArmatureCollection * armatures
Kuesa::Qt3D::LayerCollection * layers
Kuesa::Qt3D::MaterialCollection * materials
Kuesa::Qt3D::MeshCollection * meshes
Kuesa::Qt3D::SkeletonCollection * skeletons
Kuesa::Qt3D::TextureCollection * textures
Kuesa::Qt3D::CameraCollection * cameras
Kuesa::Qt3D::EntityCollection * entities
Kuesa::Qt3D::TextureImageCollection * textureImages
Kuesa::Qt3D::AnimationMappingCollection * animationMappings
Qt3DRender::QAbstractTexture * brdfLut
Kuesa::Qt3D::LightCollection * lights
Kuesa::Qt3D::TransformCollection * transforms
Kuesa::Qt3D::ReflectionPlaneCollection * reflectionPlanes
Kuesa::Qt3D::PlaceholderCollection * placeholders

Detailed Description

1
class Kuesa::Qt3D::SceneEntity;

Root entity for Kuesa runtime.

See: AnimationPlayer, GLTF2Importer

Since: Kuesa 2.0

SceneEntity provides support for the runtime behaviour of various classes in Kuesa. It's main purpose is to create instances of various asset collections which will be populated if the scene entity is registered with the glTF importer.

The AnimationPlayer classes will also use the SceneEntity to access the collections and find assets.

Public Signals Documentation

signal loadingDone

1
void loadingDone()

This signal is emitted when a glTF file is successfully loaded using a GLTFImporter instance which sceneEntity points to this entity.

Public Functions Documentation

function SceneEntity

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

function ~SceneEntity

1
~SceneEntity()

function animationClips

1
AnimationClipCollection * animationClips() const

Returns instance of collection of Qt3DAnimation::QAbstractAnimationClip assets

function animationClip

1
2
3
Q_INVOKABLE Qt3DAnimation::QAbstractAnimationClip * animationClip(
    const QString & name
) const

Utility method returning an instance of Qt3DAnimation::QAbstractAnimationClip matching name (or nullptr if not found)

function armatures

1
ArmatureCollection * armatures() const

Returns instance of collection of Qt3DCore::QArmature assets

function armature

1
2
3
Q_INVOKABLE Qt3DCore::QArmature * armature(
    const QString & name
) const

Utility method returning an instance of Qt3DCore::QArmature matching name (or nullptr if not found)

function effects

1
EffectCollection * effects() const

function effect

1
2
3
Q_INVOKABLE Qt3DRender::QEffect * effect(
    const QString & name
) const

Utility method returning an instance of Qt3DRender::QEffect matching the name (or nullptr if not found)

function effect

1
2
3
Q_INVOKABLE Qt3DRender::QEffect * effect(
    int effectPropertyFlags
) const

Utility method returning an instance of Qt3DRender::QEffect matching the flags in effectPropertyFlags (or nullptr if not found)

function layers

1
LayerCollection * layers() const

Returns instance of collection of Qt3DRender::QLayer assets

function layer

1
2
3
Q_INVOKABLE Qt3DRender::QLayer * layer(
    const QString & name
) const

Utility method returning an instance of Qt3DRender::QLayer matching name (or nullptr if not found)

function materials

1
MaterialCollection * materials() const

Returns instance of collection of Qt3DRender::QMaterial assets

function material

1
2
3
Q_INVOKABLE Kuesa::Qt3D::GLTF2MaterialProperties * material(
    const QString & name
) const

Utility method returning an instance of the Qt3DRender::GLTF2MaterialProperties subclass matching name (or nullptr if not found)

function meshes

1
MeshCollection * meshes() const

Returns instance of collection of QGeometryRenderer assets

function mesh

1
2
3
Q_INVOKABLE Qt3DRender::QGeometryRenderer * mesh(
    const QString & name
) const

Utility method returning an instance of QGeometryRenderer matching name (or nullptr if not found)

function skeletons

1
SkeletonCollection * skeletons() const

Returns instance of collection of Qt3DCore::QAbstractSkeleton assets

function skeleton

1
2
3
Q_INVOKABLE Qt3DCore::QAbstractSkeleton * skeleton(
    const QString & name
) const

Utility method returning an instance of Qt3DCore::QAbstractSkeleton matching name (or nullptr if not found)

function textures

1
TextureCollection * textures() const

Returns instance of collection of Qt3DRender::QAbstractTexture assets

function texture

1
2
3
Q_INVOKABLE Qt3DRender::QAbstractTexture * texture(
    const QString & name
) const

Utility method returning an instance of Qt3DRender::QAbstractTexture matching name (or nullptr if not found)

function cameras

1
CameraCollection * cameras() const

Returns instance of collection of Qt3DRender::QCamera assets

function camera

1
2
3
Q_INVOKABLE Qt3DRender::QCamera * camera(
    const QString & name
) const

Utility method returning an instance of Qt3DRender::QCamera matching name (or nullptr if not found)

function entities

1
EntityCollection * entities() const

Returns instance of collection of Qt3DCore::QEntity assets

function entity

1
2
3
Q_INVOKABLE Qt3DCore::QEntity * entity(
    const QString & name
) const

Utility method returning an instance of Qt3DCore::QEntity matching name (or nullptr if not found)

function transforms

1
TransformCollection * transforms() const

Since: Kuesa 2.0

Returns instance of collection of Qt3DCore::QTransform assets

function transform

1
2
3
Q_INVOKABLE Qt3DCore::QTransform * transform(
    const QString & name
) const

Since: Kuesa 2.0

Utility method returning an instance of Qt3DCore::QTransform matching name (or nullptr if not found)

function placeholders

1
PlaceholderCollection * placeholders() const

function placeholder

1
2
3
Q_INVOKABLE Kuesa::Qt3D::Placeholder * placeholder(
    const QString & name
) const

function textureImages

1
TextureImageCollection * textureImages() const

Returns instance of collection of Qt3DRender::QAbstractTextureImage assets

function textureImage

1
2
3
Q_INVOKABLE Qt3DRender::QAbstractTextureImage * textureImage(
    const QString & name
)

Utility method returning an instance of Qt3DRender::QAbstractTextureImage matching name (or nullptr if not found)

function animationMappings

1
AnimationMappingCollection * animationMappings() const

Returns instance of collection of Qt3DAnimation::QChannelMapper assets

function animationMapping

1
2
3
Q_INVOKABLE Qt3DAnimation::QChannelMapper * animationMapping(
    const QString & name
)

Utility method returning an instance of Qt3DAnimation::QChannelMapper matching name (or nullptr if not found)

function clearCollections

1
Q_INVOKABLE void clearCollections()

Removes all assets from all the collections.

Note: Assets which are parented with the collection will be deleted.

function transformForEntity

1
2
3
Q_INVOKABLE Qt3DCore::QNode * transformForEntity(
    const QString & name
)

SceneEntity::transformForEntity returns the transform component of the specified entity identified by name.

This is a utility method which will look for an entity in the SceneEntity's EntityCollection and return the Qt3DCore::QTransform component if it exists.

function brdfLut

1
Q_INVOKABLE Qt3DRender::QAbstractTexture * brdfLut() const

SceneEntity::brdfLut Returns the brdfLut texture stored in the SceneEntity.

The brdfLut is used as a lookup texture and is needed for the metallic roughness effect instances. The metallic roughness effect will use the brdfLut texture stored in the SceneEntity if the user doesn't provide another one. This allows to share the same texture instance between all the instances of the metallic roughness effect.

function lights

1
Kuesa::Qt3D::LightCollection * lights() const

function light

1
2
3
Q_INVOKABLE Qt3DRender::QAbstractLight * light(
    const QString & name
) const

function reflectionPlanes

1
Kuesa::Qt3D::ReflectionPlaneCollection * reflectionPlanes() const

function reflectionPlane

1
2
3
Q_INVOKABLE Kuesa::Qt3D::ReflectionPlane * reflectionPlane(
    const QString & name
) const

Utility method returning an instance of Kuesa::Qt3D::ReflectionPlane matching name (or nullptr if not found)

function findParentSceneEntity

1
2
3
static Q_INVOKABLE Kuesa::Qt3D::SceneEntity * findParentSceneEntity(
    Qt3DCore::QEntity * entity
)

Public Property Documentation

property animationClips

1
Kuesa::Qt3D::AnimationClipCollection * animationClips;

property armatures

1
Kuesa::Qt3D::ArmatureCollection * armatures;

property layers

1
Kuesa::Qt3D::LayerCollection * layers;

property materials

1
Kuesa::Qt3D::MaterialCollection * materials;

property meshes

1
Kuesa::Qt3D::MeshCollection * meshes;

property skeletons

1
Kuesa::Qt3D::SkeletonCollection * skeletons;

property textures

1
Kuesa::Qt3D::TextureCollection * textures;

property cameras

1
Kuesa::Qt3D::CameraCollection * cameras;

property entities

1
Kuesa::Qt3D::EntityCollection * entities;

property textureImages

1
Kuesa::Qt3D::TextureImageCollection * textureImages;

property animationMappings

1
Kuesa::Qt3D::AnimationMappingCollection * animationMappings;

property brdfLut

1
Qt3DRender::QAbstractTexture * brdfLut;

property lights

1
Kuesa::Qt3D::LightCollection * lights;

property transforms

1
Kuesa::Qt3D::TransformCollection * transforms;

property reflectionPlanes

1
Kuesa::Qt3D::ReflectionPlaneCollection * reflectionPlanes;

property placeholders

1
Kuesa::Qt3D::PlaceholderCollection * placeholders;

Updated on 2022-10-18 at 11:12:52 +0200