载入中...
搜索中...
未找到
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
 
virtual NodeDesc build ()=0
 
virtual void onMount (SceneHost *host)
 Called once when the component is attached to a host.
 
void attach (SceneHost *host)
 
void mountAs (const std::string &hostName)
 
SceneHosthost () const
 
void rebuild (bool forceFull=false)
 Rebuild tree onto host (reconcile by key when possible).
 
void markDirty ()
 
bool isDirty () const
 
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.h15 行定义.

构造及析构函数说明

◆ ~SceneComponent()

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

成员函数说明

◆ attach()

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

在文件 SceneComponent.cpp8 行定义.

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

被这些函数引用 mountAs().

◆ build()

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

被这些函数引用 rebuild().

◆ host()

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

在文件 SceneComponent.h26 行定义.

被这些函数引用 attach().

◆ isDirty()

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

在文件 SceneComponent.h32 行定义.

◆ markDirty()

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

在文件 SceneComponent.h31 行定义.

◆ mountAs()

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

在文件 SceneComponent.cpp16 行定义.

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

◆ onMount()

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

Called once when the component is attached to a host.

在文件 SceneComponent.h22 行定义.

被这些函数引用 attach().

◆ rebuild()

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

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

在文件 SceneComponent.cpp23 行定义.

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

◆ updateIfDirty()

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

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

在文件 SceneComponent.cpp32 行定义.

引用了 rebuild().


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