载入中...
搜索中...
未找到

ECS mount point for one scene graph (full scene or nested subtree root). Isomorphic to eve::ui::UIHost. 更多...

#include <SceneHost.h>

类 eve::scene::SceneHost 继承关系图:

struct  Meta
 
struct  Tree
 

Public 类型

using SceneEventFn = std::function< void(SceneHost *host, const std::string &action, const std::string &nodeId, const std::string &parentId)>
 
using NodeVisitFn = std::function< void(SceneHost *host, int index, SceneNode &node)>
 
using NodePredFn = std::function< bool(SceneHost *host, int index, const SceneNode &node)>
 

Public 成员函数

void release () override
 
void setName (const std::string &name)
 
const std::string & getName ()
 
void setOwnerId (uint32_t id)
 
uint32_t getOwnerId ()
 
void setTree (NodeDesc root)
 Full replace.
 
bool setTreeReconcile (NodeDesc root)
 Key-aware patch when structure matches; else full replace.
 
SceneNodefindById (const std::string &id)
 
SceneNodefindByKey (const std::string &key)
 
SceneNodefindByName (const std::string &name)
 First node whose name equals name (DFS from root).
 
SceneNodefindByPath (const std::string &path)
 Path of ids joined by '/', e.g. "root/player/weapon". Relative to host root.
 
int findIndexById (const std::string &id)
 
int findIndexByKey (const std::string &key)
 
int findIndexByName (const std::string &name)
 
int findIndexByPath (const std::string &path)
 
bool hasNode (const std::string &id)
 
int getNodeCount ()
 
int getRootIndex ()
 
SceneNodegetRoot ()
 
SceneNodegetNode (int index)
 
int getParentIndex (int nodeIndex)
 
SceneNodegetParent (int nodeIndex)
 
SceneNodegetParentById (const std::string &id)
 
int getChildCount (int nodeIndex)
 
int getChildCountById (const std::string &id)
 
int getChildIndexAt (int parentIndex, int childOrdinal)
 Child ordinal 0..count-1; -1 if out of range.
 
SceneNodegetChildAt (int parentIndex, int childOrdinal)
 
SceneNodegetChildAtById (const std::string &parentId, int childOrdinal)
 
std::vector< int > getChildIndices (int nodeIndex)
 
std::vector< SceneNode * > getChildren (int nodeIndex)
 
std::vector< std::string > getChildIds (const std::string &parentId)
 
std::string getPath (int nodeIndex)
 Id path "a/b/c" from root to node; empty if invalid.
 
std::string getPathById (const std::string &id)
 
bool isAncestorOf (int ancestorIndex, int nodeIndex)
 
bool isAncestorOfById (const std::string &ancestorId, const std::string &nodeId)
 
bool isDescendantOf (int nodeIndex, int ancestorIndex)
 
bool isDescendantOfById (const std::string &nodeId, const std::string &ancestorId)
 
void markDirty ()
 
void markTransformDirty ()
 
void markSubtreeDirty (int nodeIndex)
 Mark a node's subtree for world recompute (recompute it + descendants).
 
void markSubtreeDirtyById (const std::string &id)
 
void invalidateIndex ()
 
void setEventHandler (SceneEventFn fn)
 
void fireEvent (const std::string &action, const std::string &nodeId, const std::string &parentId={})
 Fire "node_added" / "node_removed" / "node_moved" / "node_changed".
 
void setVisible (bool v)
 
void setLayer (int layer)
 
bool setParent (int childIndex, int parentIndex)
 Imperative parent link. Returns false on invalid indices or cycle. Prefer declarative NodeDesc + reconcile for normal use.
 
bool addChild (int parentIndex, int childIndex)
 
bool removeChild (int parentIndex, int childIndex)
 
void forEachDepthFirst (int nodeIndex, void(*fn)(SceneHost *, int, void *), void *user)
 Depth-first visit of arena indices under nodeIndex (inclusive). C callback.
 
void walkDepthFirst (NodeVisitFn fn)
 DFS from root (or from nodeIndex), inclusive.
 
void walkDepthFirstFrom (int nodeIndex, NodeVisitFn fn)
 
void walkBreadthFirst (NodeVisitFn fn)
 BFS from root (or from nodeIndex), inclusive.
 
void walkBreadthFirstFrom (int nodeIndex, NodeVisitFn fn)
 
void walkChildren (int parentIndex, NodeVisitFn fn)
 Direct children only.
 
void walkAncestors (int nodeIndex, NodeVisitFn fn)
 Parent chain upward, excluding self.
 
SceneNodefindIf (NodePredFn pred)
 First DFS match; nullptr if none.
 
SceneNodefindIfFrom (int nodeIndex, NodePredFn pred)
 
std::vector< SceneNode * > filter (NodePredFn pred)
 
std::vector< SceneNode * > filterFrom (int nodeIndex, NodePredFn pred)
 
std::vector< int > filterIndices (NodePredFn pred)
 
std::vector< int > filterIndicesFrom (int nodeIndex, NodePredFn pred)
 
std::vector< SceneNode * > findAllByName (const std::string &name)
 
std::vector< SceneNode * > findAllByKey (const std::string &key)
 
std::vector< SceneNode * > findAllVisible (bool visible=true)
 
std::vector< SceneNode * > findAllBySpace (const std::string &space)
 
std::vector< SceneNode * > findAllLinked ()
 
std::vector< std::string > collectIds ()
 
std::vector< std::string > collectIdsFrom (int nodeIndex)
 
std::vector< std::string > collectIdsWhere (NodePredFn pred)
 
std::vector< std::string > collectIdsByName (const std::string &name)
 
std::vector< std::string > collectIdsVisible (bool visible=true)
 
bool link (const std::string &nodeId, int kind, void *target, int syncMode=0)
 Attach an external object to a node id. Survives reconcile/rebuild by id. After TransformSystem the link is synced per kind (and syncMode).
 
bool linkRenderable2D (const std::string &nodeId, graphics::Renderable2D *r)
 
bool linkRenderable3D (const std::string &nodeId, graphics::Renderable3D *r)
 
bool linkPhysics2D (const std::string &nodeId, physics::Body *b, int syncMode=0)
 
bool linkPhysics3D (const std::string &nodeId, physics::Body3D *b, int syncMode=0)
 
bool linkCamera3D (const std::string &nodeId, graphics::Camera3D *c)
 
bool linkAudio3D (const std::string &nodeId, audio::Source *s)
 
bool unlink (const std::string &nodeId, int kind)
 Remove all links of a kind; returns true if a link was removed.
 
bool unlink (const std::string &nodeId)
 Remove every link on the node.
 
SceneLinkfindLink (SceneNode *node, int kind)
 
const SceneLinkfindLink (const SceneNode *node, int kind) const
 
int linkCount (const std::string &nodeId)
 
bool setParentById (const std::string &childId, const std::string &parentId)
 Reparent by id; empty parentId detaches (parent = -1). Cycle-safe.
 
bool removeChildById (const std::string &parentId, const std::string &childId)
 
bool addTag (SceneNode *node, const std::string &tag)
 
bool removeTag (SceneNode *node, const std::string &tag)
 
bool hasTag (const SceneNode *node, const std::string &tag) const
 
std::vector< SceneNode * > findAllByTag (const std::string &tag)
 

静态 Public 成员函数

static SceneHostcreateHost (const std::string &name="")
 

详细描述

ECS mount point for one scene graph (full scene or nested subtree root). Isomorphic to eve::ui::UIHost.

在文件 SceneHost.h80 行定义.

成员类型定义说明

◆ NodePredFn

using eve::scene::SceneHost::NodePredFn = std::function<bool(SceneHost *host, int index, const SceneNode &node)>

在文件 SceneHost.h190 行定义.

◆ NodeVisitFn

using eve::scene::SceneHost::NodeVisitFn = std::function<void(SceneHost *host, int index, SceneNode &node)>

在文件 SceneHost.h189 行定义.

◆ SceneEventFn

using eve::scene::SceneHost::SceneEventFn = std::function<void(SceneHost *host, const std::string &action, const std::string &nodeId, const std::string &parentId)>

在文件 SceneHost.h167 行定义.

成员函数说明

◆ addChild()

bool eve::scene::SceneHost::addChild ( int  parentIndex,
int  childIndex 
)

在文件 SceneHost.cpp379 行定义.

引用了 setParent().

◆ addTag()

bool eve::scene::SceneHost::addTag ( SceneNode node,
const std::string &  tag 
)

在文件 SceneHost.cpp609 行定义.

引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.

◆ collectIds()

std::vector< std::string > eve::scene::SceneHost::collectIds ( )

在文件 SceneHost.cpp498 行定义.

引用了 collectIdsFrom().

被这些函数引用 eve::scene::Scene::collectIds().

◆ collectIdsByName()

std::vector< std::string > eve::scene::SceneHost::collectIdsByName ( const std::string &  name)

在文件 SceneHost.cpp514 行定义.

引用了 collectIdsWhere(), n , 以及 name.

被这些函数引用 eve::scene::Scene::collectIdsByName().

◆ collectIdsFrom()

std::vector< std::string > eve::scene::SceneHost::collectIdsFrom ( int  nodeIndex)

在文件 SceneHost.cpp500 行定义.

引用了 n , 以及 walkDepthFirstFrom().

被这些函数引用 collectIds() , 以及 eve::scene::Scene::collectIdsFrom().

◆ collectIdsVisible()

std::vector< std::string > eve::scene::SceneHost::collectIdsVisible ( bool  visible = true)

在文件 SceneHost.cpp518 行定义.

引用了 collectIdsWhere() , 以及 n.

被这些函数引用 eve::scene::Scene::collectIdsVisible().

◆ collectIdsWhere()

std::vector< std::string > eve::scene::SceneHost::collectIdsWhere ( NodePredFn  pred)

在文件 SceneHost.cpp506 行定义.

引用了 filter , 以及 n.

被这些函数引用 collectIdsByName() , 以及 collectIdsVisible().

◆ createHost()

SceneHost * eve::scene::SceneHost::createHost ( const std::string &  name = "")
static

在文件 SceneHost.cpp122 行定义.

引用了 h , 以及 name.

被这些函数引用 eve::sceneloader::SceneLoader::load() , 以及 eve::scene::SceneComponent::mountAs().

◆ filter()

std::vector< SceneNode * > eve::scene::SceneHost::filter ( NodePredFn  pred)

在文件 SceneHost.cpp450 行定义.

引用了 filterFrom().

◆ filterFrom()

std::vector< SceneNode * > eve::scene::SceneHost::filterFrom ( int  nodeIndex,
NodePredFn  pred 
)

在文件 SceneHost.cpp454 行定义.

引用了 eve::scene::node() , 以及 walkDepthFirstFrom().

被这些函数引用 filter().

◆ filterIndices()

std::vector< int > eve::scene::SceneHost::filterIndices ( NodePredFn  pred)

在文件 SceneHost.cpp463 行定义.

引用了 filterIndicesFrom().

◆ filterIndicesFrom()

std::vector< int > eve::scene::SceneHost::filterIndicesFrom ( int  nodeIndex,
NodePredFn  pred 
)

在文件 SceneHost.cpp467 行定义.

引用了 eve::scene::node() , 以及 walkDepthFirstFrom().

被这些函数引用 filterIndices().

◆ findAllByKey()

std::vector< SceneNode * > eve::scene::SceneHost::findAllByKey ( const std::string &  key)

在文件 SceneHost.cpp480 行定义.

引用了 filter , 以及 n.

◆ findAllByName()

std::vector< SceneNode * > eve::scene::SceneHost::findAllByName ( const std::string &  name)

在文件 SceneHost.cpp476 行定义.

引用了 filter, n , 以及 name.

◆ findAllBySpace()

std::vector< SceneNode * > eve::scene::SceneHost::findAllBySpace ( const std::string &  space)

在文件 SceneHost.cpp488 行定义.

引用了 filter , 以及 n.

◆ findAllByTag()

std::vector< SceneNode * > eve::scene::SceneHost::findAllByTag ( const std::string &  tag)

在文件 SceneHost.cpp637 行定义.

引用了 filter , 以及 n.

◆ findAllLinked()

std::vector< SceneNode * > eve::scene::SceneHost::findAllLinked ( )

在文件 SceneHost.cpp492 行定义.

引用了 filter , 以及 n.

◆ findAllVisible()

std::vector< SceneNode * > eve::scene::SceneHost::findAllVisible ( bool  visible = true)

在文件 SceneHost.cpp484 行定义.

引用了 filter , 以及 n.

◆ findById()

SceneNode * eve::scene::SceneHost::findById ( const std::string &  id)

在文件 SceneHost.cpp141 行定义.

引用了 n.

被这些函数引用 link(), linkCount(), unlink() , 以及 unlink().

◆ findByKey()

SceneNode * eve::scene::SceneHost::findByKey ( const std::string &  key)

在文件 SceneHost.cpp150 行定义.

引用了 n.

◆ findByName()

SceneNode * eve::scene::SceneHost::findByName ( const std::string &  name)

First node whose name equals name (DFS from root).

在文件 SceneHost.cpp159 行定义.

引用了 findIndexByName(), idx , 以及 name.

◆ findByPath()

SceneNode * eve::scene::SceneHost::findByPath ( const std::string &  path)

Path of ids joined by '/', e.g. "root/player/weapon". Relative to host root.

在文件 SceneHost.cpp165 行定义.

引用了 findIndexByPath() , 以及 idx.

◆ findIf()

SceneNode * eve::scene::SceneHost::findIf ( NodePredFn  pred)

First DFS match; nullptr if none.

在文件 SceneHost.cpp438 行定义.

引用了 findIfFrom().

◆ findIfFrom()

SceneNode * eve::scene::SceneHost::findIfFrom ( int  nodeIndex,
NodePredFn  pred 
)

在文件 SceneHost.cpp440 行定义.

引用了 eve::scene::node() , 以及 walkDepthFirstFrom().

被这些函数引用 findIf().

◆ findIndexById()

int eve::scene::SceneHost::findIndexById ( const std::string &  id)

◆ findIndexByKey()

int eve::scene::SceneHost::findIndexByKey ( const std::string &  key)

在文件 SceneHost.cpp186 行定义.

◆ findIndexByName()

int eve::scene::SceneHost::findIndexByName ( const std::string &  name)

在文件 SceneHost.cpp195 行定义.

引用了 n, name , 以及 walkDepthFirst().

被这些函数引用 findByName().

◆ findIndexByPath()

int eve::scene::SceneHost::findIndexByPath ( const std::string &  path)

在文件 SceneHost.cpp205 行定义.

引用了 idx, n , 以及 p.

被这些函数引用 findByPath().

◆ findLink() [1/2]

const SceneLink * eve::scene::SceneHost::findLink ( const SceneNode node,
int  kind 
) const

在文件 SceneHost.cpp581 行定义.

引用了 kind , 以及 eve::scene::node().

◆ findLink() [2/2]

SceneLink * eve::scene::SceneHost::findLink ( SceneNode node,
int  kind 
)

在文件 SceneHost.cpp573 行定义.

引用了 kind , 以及 eve::scene::node().

被这些函数引用 eve::sceneloader::SceneLoader::applyTreeDiff().

◆ fireEvent()

void eve::scene::SceneHost::fireEvent ( const std::string &  action,
const std::string &  nodeId,
const std::string &  parentId = {} 
)

Fire "node_added" / "node_removed" / "node_moved" / "node_changed".

在文件 SceneHost.cpp399 行定义.

被这些函数引用 eve::scene::applyTree(), removeChild() , 以及 setParent().

◆ forEachDepthFirst()

void eve::scene::SceneHost::forEachDepthFirst ( int  nodeIndex,
void(*)(SceneHost *, int, void *)  fn,
void *  user 
)

Depth-first visit of arena indices under nodeIndex (inclusive). C callback.

在文件 SceneHost.cpp404 行定义.

引用了 fn.

◆ getChildAt()

SceneNode * eve::scene::SceneHost::getChildAt ( int  parentIndex,
int  childOrdinal 
)

在文件 SceneHost.cpp287 行定义.

引用了 getChildIndexAt() , 以及 getNode().

被这些函数引用 getChildAtById().

◆ getChildAtById()

SceneNode * eve::scene::SceneHost::getChildAtById ( const std::string &  parentId,
int  childOrdinal 
)

在文件 SceneHost.cpp291 行定义.

引用了 findIndexById() , 以及 getChildAt().

◆ getChildCount()

int eve::scene::SceneHost::getChildCount ( int  nodeIndex)

在文件 SceneHost.cpp261 行定义.

引用了 c.

被这些函数引用 getChildCountById().

◆ getChildCountById()

int eve::scene::SceneHost::getChildCountById ( const std::string &  id)

在文件 SceneHost.cpp272 行定义.

引用了 findIndexById() , 以及 getChildCount().

被这些函数引用 eve::scene::Scene::getChildCount().

◆ getChildIds()

std::vector< std::string > eve::scene::SceneHost::getChildIds ( const std::string &  parentId)

在文件 SceneHost.cpp312 行定义.

引用了 findIndexById(), getChildren() , 以及 n.

被这些函数引用 eve::scene::Scene::collectChildIds().

◆ getChildIndexAt()

int eve::scene::SceneHost::getChildIndexAt ( int  parentIndex,
int  childOrdinal 
)

Child ordinal 0..count-1; -1 if out of range.

在文件 SceneHost.cpp274 行定义.

引用了 c.

被这些函数引用 getChildAt().

◆ getChildIndices()

std::vector< int > eve::scene::SceneHost::getChildIndices ( int  nodeIndex)

在文件 SceneHost.cpp295 行定义.

引用了 c.

被这些函数引用 getChildren() , 以及 walkChildren().

◆ getChildren()

std::vector< SceneNode * > eve::scene::SceneHost::getChildren ( int  nodeIndex)

在文件 SceneHost.cpp306 行定义.

引用了 c , 以及 getChildIndices().

被这些函数引用 getChildIds().

◆ getName()

const std::string & eve::scene::SceneHost::getName ( )

在文件 SceneHost.cpp135 行定义.

◆ getNode()

SceneNode * eve::scene::SceneHost::getNode ( int  index)

在文件 SceneHost.cpp245 行定义.

被这些函数引用 getChildAt() , 以及 getParent().

◆ getNodeCount()

int eve::scene::SceneHost::getNodeCount ( )

在文件 SceneHost.cpp235 行定义.

被这些函数引用 eve::scene::Scene::getNodeCount().

◆ getOwnerId()

uint32_t eve::scene::SceneHost::getOwnerId ( )
inline

在文件 SceneHost.h111 行定义.

◆ getParent()

SceneNode * eve::scene::SceneHost::getParent ( int  nodeIndex)

在文件 SceneHost.cpp257 行定义.

引用了 getNode() , 以及 getParentIndex().

被这些函数引用 getParentById().

◆ getParentById()

SceneNode * eve::scene::SceneHost::getParentById ( const std::string &  id)

在文件 SceneHost.cpp259 行定义.

引用了 findIndexById() , 以及 getParent().

◆ getParentIndex()

int eve::scene::SceneHost::getParentIndex ( int  nodeIndex)

在文件 SceneHost.cpp251 行定义.

被这些函数引用 getParent().

◆ getPath()

std::string eve::scene::SceneHost::getPath ( int  nodeIndex)

Id path "a/b/c" from root to node; empty if invalid.

在文件 SceneHost.cpp320 行定义.

被这些函数引用 getPathById().

◆ getPathById()

std::string eve::scene::SceneHost::getPathById ( const std::string &  id)

在文件 SceneHost.cpp335 行定义.

引用了 findIndexById() , 以及 getPath().

被这些函数引用 eve::scene::Scene::getNodePath().

◆ getRoot()

SceneNode * eve::scene::SceneHost::getRoot ( )

在文件 SceneHost.cpp239 行定义.

◆ getRootIndex()

int eve::scene::SceneHost::getRootIndex ( )

在文件 SceneHost.cpp237 行定义.

◆ hasNode()

bool eve::scene::SceneHost::hasNode ( const std::string &  id)

在文件 SceneHost.cpp233 行定义.

引用了 findIndexById().

被这些函数引用 eve::scene::Scene::hasNode().

◆ hasTag()

bool eve::scene::SceneHost::hasTag ( const SceneNode node,
const std::string &  tag 
) const

在文件 SceneHost.cpp629 行定义.

引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.

◆ invalidateIndex()

void eve::scene::SceneHost::invalidateIndex ( )
inline

在文件 SceneHost.h164 行定义.

被这些函数引用 eve::scene::applyTree() , 以及 eve::sceneloader::SceneLoader::applyTreeDiff().

◆ isAncestorOf()

bool eve::scene::SceneHost::isAncestorOf ( int  ancestorIndex,
int  nodeIndex 
)

在文件 SceneHost.cpp337 行定义.

被这些函数引用 isAncestorOfById() , 以及 isDescendantOf().

◆ isAncestorOfById()

bool eve::scene::SceneHost::isAncestorOfById ( const std::string &  ancestorId,
const std::string &  nodeId 
)

在文件 SceneHost.cpp344 行定义.

引用了 findIndexById() , 以及 isAncestorOf().

被这些函数引用 eve::scene::Scene::isAncestor() , 以及 isDescendantOfById().

◆ isDescendantOf()

bool eve::scene::SceneHost::isDescendantOf ( int  nodeIndex,
int  ancestorIndex 
)

在文件 SceneHost.cpp348 行定义.

引用了 isAncestorOf().

◆ isDescendantOfById()

bool eve::scene::SceneHost::isDescendantOfById ( const std::string &  nodeId,
const std::string &  ancestorId 
)

在文件 SceneHost.cpp352 行定义.

引用了 isAncestorOfById().

被这些函数引用 eve::scene::Scene::isDescendant().

◆ link()

bool eve::scene::SceneHost::link ( const std::string &  nodeId,
int  kind,
void *  target,
int  syncMode = 0 
)

Attach an external object to a node id. Survives reconcile/rebuild by id. After TransformSystem the link is synced per kind (and syncMode).

kind is an id from scene::registerLinkKind, so any module can attach to the tree; the typed helpers below are conveniences for the kinds the engine ships. Returns false when the node or the kind is unknown.

在文件 SceneHost.cpp522 行定义.

引用了 findById(), kind, eve::scene::linkOps() , 以及 n.

被这些函数引用 linkAudio3D(), linkCamera3D(), linkPhysics2D(), linkPhysics3D(), linkRenderable2D() , 以及 linkRenderable3D().

◆ linkAudio3D()

bool eve::scene::SceneHost::linkAudio3D ( const std::string &  nodeId,
audio::Source s 
)

在文件 SceneHost.cpp550 行定义.

引用了 eve::scene::findLinkKind(), link() , 以及 s.

◆ linkCamera3D()

bool eve::scene::SceneHost::linkCamera3D ( const std::string &  nodeId,
graphics::Camera3D c 
)

在文件 SceneHost.cpp546 行定义.

引用了 c, eve::scene::findLinkKind() , 以及 link().

◆ linkCount()

int eve::scene::SceneHost::linkCount ( const std::string &  nodeId)

在文件 SceneHost.cpp589 行定义.

引用了 findById() , 以及 n.

◆ linkPhysics2D()

bool eve::scene::SceneHost::linkPhysics2D ( const std::string &  nodeId,
physics::Body b,
int  syncMode = 0 
)

在文件 SceneHost.cpp538 行定义.

引用了 b, eve::scene::findLinkKind() , 以及 link().

◆ linkPhysics3D()

bool eve::scene::SceneHost::linkPhysics3D ( const std::string &  nodeId,
physics::Body3D b,
int  syncMode = 0 
)

在文件 SceneHost.cpp542 行定义.

引用了 b, eve::scene::findLinkKind() , 以及 link().

◆ linkRenderable2D()

bool eve::scene::SceneHost::linkRenderable2D ( const std::string &  nodeId,
graphics::Renderable2D r 
)

在文件 SceneHost.cpp530 行定义.

引用了 eve::scene::findLinkKind() , 以及 link().

◆ linkRenderable3D()

bool eve::scene::SceneHost::linkRenderable3D ( const std::string &  nodeId,
graphics::Renderable3D r 
)

在文件 SceneHost.cpp534 行定义.

引用了 eve::scene::findLinkKind() , 以及 link().

◆ markDirty()

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

在文件 SceneHost.h157 行定义.

◆ markSubtreeDirty()

void eve::scene::SceneHost::markSubtreeDirty ( int  nodeIndex)

Mark a node's subtree for world recompute (recompute it + descendants).

在文件 SceneHost.cpp392 行定义.

被这些函数引用 markSubtreeDirtyById(), removeChild() , 以及 setParent().

◆ markSubtreeDirtyById()

void eve::scene::SceneHost::markSubtreeDirtyById ( const std::string &  id)
inline

在文件 SceneHost.h161 行定义.

引用了 findIndexById() , 以及 markSubtreeDirty().

◆ markTransformDirty()

void eve::scene::SceneHost::markTransformDirty ( )
inline

在文件 SceneHost.h158 行定义.

被这些函数引用 eve::sceneloader::SceneLoader::applyTreeDiff().

◆ release()

void eve::scene::SceneHost::release ( )
inlineoverride

在文件 SceneHost.h84 行定义.

◆ removeChild()

bool eve::scene::SceneHost::removeChild ( int  parentIndex,
int  childIndex 
)

在文件 SceneHost.cpp381 行定义.

引用了 fireEvent() , 以及 markSubtreeDirty().

被这些函数引用 removeChildById().

◆ removeChildById()

bool eve::scene::SceneHost::removeChildById ( const std::string &  parentId,
const std::string &  childId 
)

在文件 SceneHost.cpp602 行定义.

引用了 findIndexById() , 以及 removeChild().

◆ removeTag()

bool eve::scene::SceneHost::removeTag ( SceneNode node,
const std::string &  tag 
)

在文件 SceneHost.cpp618 行定义.

引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.

◆ setEventHandler()

void eve::scene::SceneHost::setEventHandler ( SceneEventFn  fn)
inline

在文件 SceneHost.h170 行定义.

引用了 fn.

◆ setLayer()

void eve::scene::SceneHost::setLayer ( int  layer)
inline

在文件 SceneHost.h176 行定义.

引用了 layer.

◆ setName()

void eve::scene::SceneHost::setName ( const std::string &  name)

在文件 SceneHost.cpp133 行定义.

引用了 name.

◆ setOwnerId()

void eve::scene::SceneHost::setOwnerId ( uint32_t  id)
inline

在文件 SceneHost.h110 行定义.

引用了 id.

◆ setParent()

bool eve::scene::SceneHost::setParent ( int  childIndex,
int  parentIndex 
)

Imperative parent link. Returns false on invalid indices or cycle. Prefer declarative NodeDesc + reconcile for normal use.

在文件 SceneHost.cpp356 行定义.

引用了 fireEvent() , 以及 markSubtreeDirty().

被这些函数引用 addChild() , 以及 setParentById().

◆ setParentById()

bool eve::scene::SceneHost::setParentById ( const std::string &  childId,
const std::string &  parentId 
)

Reparent by id; empty parentId detaches (parent = -1). Cycle-safe.

在文件 SceneHost.cpp594 行定义.

引用了 findIndexById() , 以及 setParent().

◆ setTree()

void eve::scene::SceneHost::setTree ( NodeDesc  root)

Full replace.

在文件 SceneHost.cpp137 行定义.

引用了 eve::scene::applyTree().

被这些函数引用 eve::sceneloader::SceneLoader::load() , 以及 eve::scene::SceneComponent::rebuild().

◆ setTreeReconcile()

bool eve::scene::SceneHost::setTreeReconcile ( NodeDesc  root)

Key-aware patch when structure matches; else full replace.

在文件 SceneHost.cpp139 行定义.

引用了 eve::scene::applyTreeReconcile().

被这些函数引用 eve::scene::SceneComponent::rebuild().

◆ setVisible()

void eve::scene::SceneHost::setVisible ( bool  v)
inline

在文件 SceneHost.h175 行定义.

引用了 v.

◆ unlink() [1/2]

bool eve::scene::SceneHost::unlink ( const std::string &  nodeId)

Remove every link on the node.

在文件 SceneHost.cpp566 行定义.

引用了 findById() , 以及 n.

◆ unlink() [2/2]

bool eve::scene::SceneHost::unlink ( const std::string &  nodeId,
int  kind 
)

Remove all links of a kind; returns true if a link was removed.

在文件 SceneHost.cpp554 行定义.

引用了 findById(), kind , 以及 n.

◆ walkAncestors()

void eve::scene::SceneHost::walkAncestors ( int  nodeIndex,
NodeVisitFn  fn 
)

Parent chain upward, excluding self.

在文件 SceneHost.cpp429 行定义.

引用了 fn , 以及 p.

◆ walkBreadthFirst()

void eve::scene::SceneHost::walkBreadthFirst ( NodeVisitFn  fn)

BFS from root (or from nodeIndex), inclusive.

在文件 SceneHost.cpp414 行定义.

引用了 fn , 以及 walkBreadthFirstFrom().

被这些函数引用 eve::scene::Scene::walkBreadthFirstIds().

◆ walkBreadthFirstFrom()

void eve::scene::SceneHost::walkBreadthFirstFrom ( int  nodeIndex,
NodeVisitFn  fn 
)

在文件 SceneHost.cpp418 行定义.

引用了 fn.

被这些函数引用 walkBreadthFirst().

◆ walkChildren()

void eve::scene::SceneHost::walkChildren ( int  parentIndex,
NodeVisitFn  fn 
)

Direct children only.

在文件 SceneHost.cpp422 行定义.

引用了 c, fn , 以及 getChildIndices().

◆ walkDepthFirst()

void eve::scene::SceneHost::walkDepthFirst ( NodeVisitFn  fn)

DFS from root (or from nodeIndex), inclusive.

在文件 SceneHost.cpp408 行定义.

引用了 fn , 以及 walkDepthFirstFrom().

被这些函数引用 findIndexByName().

◆ walkDepthFirstFrom()

void eve::scene::SceneHost::walkDepthFirstFrom ( int  nodeIndex,
NodeVisitFn  fn 
)

在文件 SceneHost.cpp410 行定义.

引用了 fn.

被这些函数引用 collectIdsFrom(), filterFrom(), filterIndicesFrom(), findIfFrom() , 以及 walkDepthFirst().


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