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

React-style scene component: implement build(); setState / markDirty schedules one update before transform traversal. Mounts onto a named SceneHost via mountAs / attach. Isomorphic to eve::ui::Component. 更多...

#include <SceneComponent.h>

Public 成员函数

 SceneComponent ()
 Create an unmounted component; attaching schedules its first update.
 
 SceneComponent (const SceneComponent &)=delete
 
SceneComponent & operator= (const SceneComponent &)=delete
 
 SceneComponent (SceneComponent &&)=delete
 
SceneComponent & operator= (SceneComponent &&)=delete
 
virtual ~SceneComponent ()
 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)
 Compatibility-only synchronous refresh; normal edits use markDirty / setState. @cost Builds the complete description tree and reconciles by key; call once per edit batch. @reentrancy May invoke build(); recursively rebuilding or destroying this component during build is invalid.
 
void markDirty ()
 Schedule one rebuild; repeated calls before the next preparation phase coalesce. @thread Owner thread; no callbacks. Edits during build schedule the following batch. @lifetime Destroying the component invalidates its weak scheduling registration.
 
bool isDirty () const
 True when dirty.
 
bool updateIfDirty ()
 Compatibility-only synchronous update; normal edits are flushed automatically.
 

Protected 成员函数

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

详细描述

React-style scene component: implement build(); setState / markDirty schedules one update before transform traversal. Mounts onto a named SceneHost via mountAs / attach. Isomorphic to eve::ui::Component.

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

构造及析构函数说明

◆ SceneComponent() [1/3]

eve::scene::SceneComponent::SceneComponent ( )

Create an unmounted component; attaching schedules its first update.

在文件 SceneCameraQueries.cpp 第 144 行定义.

引用了 detail.

◆ SceneComponent() [2/3]

eve::scene::SceneComponent::SceneComponent ( const SceneComponent &  )
delete

◆ SceneComponent() [3/3]

eve::scene::SceneComponent::SceneComponent ( SceneComponent &&  )
delete

◆ ~SceneComponent()

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

Scene component.

在文件 SceneCameraQueries.cpp 第 147 行定义.

成员函数说明

◆ attach()

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

Attaches .

在文件 SceneCameraQueries.cpp 第 158 行定义.

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

被这些函数引用 mountAs().

◆ build()

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

Builds .

被这些函数引用 rebuild().

◆ host()

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

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.

在文件 SceneCameraQueries.cpp 第 156 行定义.

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

◆ isDirty()

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

True when dirty.

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

◆ markDirty()

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

Schedule one rebuild; repeated calls before the next preparation phase coalesce. @thread Owner thread; no callbacks. Edits during build schedule the following batch. @lifetime Destroying the component invalidates its weak scheduling registration.

在文件 SceneCameraQueries.cpp 第 148 行定义.

被这些函数引用 attach() , 以及 rebuild().

◆ mountAs()

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

Mounts as.

在文件 SceneCameraQueries.cpp 第 166 行定义.

引用了 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 第 38 行定义.

被这些函数引用 attach().

◆ operator=() [1/2]

SceneComponent & eve::scene::SceneComponent::operator= ( const SceneComponent &  )
delete

◆ operator=() [2/2]

SceneComponent & eve::scene::SceneComponent::operator= ( SceneComponent &&  )
delete

◆ rebuild()

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

Compatibility-only synchronous refresh; normal edits use markDirty / setState. @cost Builds the complete description tree and reconciles by key; call once per edit batch. @reentrancy May invoke build(); recursively rebuilding or destroying this component during build is invalid.

在文件 SceneCameraQueries.cpp 第 180 行定义.

引用了 build(), host(), markDirty(), target , 以及 eve::scene::TransformSystem::updateHost().

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

◆ setState()

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

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

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

◆ updateIfDirty()

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

Compatibility-only synchronous update; normal edits are flushed automatically.

返回
True when a live dirty component was rebuilt. @cost Complete tree construction/reconciliation when dirty; amortize once per edit batch.

在文件 SceneCameraQueries.cpp 第 202 行定义.

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

被这些函数引用 eve::scene::detail::flushPendingComponents().


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