载入中...
搜索中...
未找到
eve::scene::SceneComponent类 参考abstract

React-style scene component: implement build(), call setState / markDirty, then rebuild(). Mounts onto a named SceneHost via mountAs / attach. Isomorphic to eve::ui::Component. 更多...

#include <SceneComponent.h>

Public 成员函数

virtual ~SceneComponent ()=default
 Scene component.
 
virtual NodeDesc build ()=0
 Builds .
 
virtual void onMount (SceneHost *host)
 Called once when the component is attached to a host.
 
void attach (SceneHost *host)
 Attaches .
 
void mountAs (const std::string &hostName)
 Mounts as.
 
SceneHost * host () const
 Returns the currently attached host, or null before attach.
 
void rebuild (bool forceFull=false)
 Rebuild tree onto host (reconcile by key when possible).
 
void markDirty ()
 Mark dirty.
 
bool isDirty () const
 True when dirty.
 
bool updateIfDirty ()
 If dirty, rebuild and clear flag. Returns true if rebuilt.
 

Protected 成员函数

void setState ()
 Subclasses call after mutating local state that affects build().
 

详细描述

React-style scene component: implement build(), call setState / markDirty, then rebuild(). Mounts onto a named SceneHost via mountAs / attach. Isomorphic to eve::ui::Component.

在文件 SceneComponent.h 第 15 行定义.

构造及析构函数说明

◆ ~SceneComponent()

virtual eve::scene::SceneComponent::~SceneComponent ( )
virtualdefault

Scene component.

成员函数说明

◆ attach()

void eve::scene::SceneComponent::attach ( SceneHost *  host)

Attaches .

在文件 SceneComponent.cpp 第 10 行定义.

引用了 host() , 以及 onMount().

被这些函数引用 mountAs().

◆ build()

virtual NodeDesc eve::scene::SceneComponent::build ( )
pure virtual

Builds .

被这些函数引用 rebuild().

◆ host()

SceneHost * eve::scene::SceneComponent::host ( ) const
inline

Returns the currently attached host, or null before attach.

返回
Borrowed nullable SceneHost owned by the scene ECS/world registry. @ownership SceneComponent does not own the host and must not delete it. @lifetime Valid until detach/host destruction; do not retain across rebuild or module teardown. @thread Call on the scene thread that owns the host. @reentrancy This accessor invokes no callbacks and is not a synchronization primitive.

在文件 SceneComponent.h 第 38 行定义.

被这些函数引用 attach().

◆ isDirty()

bool eve::scene::SceneComponent::isDirty ( ) const
inline

True when dirty.

在文件 SceneComponent.h 第 46 行定义.

◆ markDirty()

void eve::scene::SceneComponent::markDirty ( )
inline

Mark dirty.

在文件 SceneComponent.h 第 44 行定义.

◆ mountAs()

void eve::scene::SceneComponent::mountAs ( const std::string &  hostName)

Mounts as.

在文件 SceneComponent.cpp 第 18 行定义.

引用了 attach(), created, eve::scene::SceneHost::createHost(), found, h , 以及 rebuild().

◆ onMount()

virtual void eve::scene::SceneComponent::onMount ( SceneHost *  host)
inlinevirtual

Called once when the component is attached to a host.

在文件 SceneComponent.h 第 24 行定义.

被这些函数引用 attach().

◆ rebuild()

void eve::scene::SceneComponent::rebuild ( bool  forceFull = false)

Rebuild tree onto host (reconcile by key when possible).

在文件 SceneComponent.cpp 第 32 行定义.

引用了 build(), eve::scene::SceneHost::setTree(), eve::scene::SceneHost::setTreeReconcile() , 以及 eve::scene::TransformSystem::updateHost().

被这些函数引用 mountAs() , 以及 updateIfDirty().

◆ setState()

void eve::scene::SceneComponent::setState ( )
inlineprotected

Subclasses call after mutating local state that affects build().

在文件 SceneComponent.h 第 53 行定义.

◆ updateIfDirty()

bool eve::scene::SceneComponent::updateIfDirty ( )

If dirty, rebuild and clear flag. Returns true if rebuilt.

在文件 SceneComponent.cpp 第 41 行定义.

引用了 rebuild().


该类的文档由以下文件生成: