ECS mount point for one scene graph (full scene or nested subtree root). Isomorphic to eve::ui::UIHost. 更多...
#include <SceneHost.h>
类 | |
| 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. | |
| SceneNode * | findById (const std::string &id) |
| SceneNode * | findByKey (const std::string &key) |
| SceneNode * | findByName (const std::string &name) |
First node whose name equals name (DFS from root). | |
| SceneNode * | findByPath (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 () |
| SceneNode * | getRoot () |
| SceneNode * | getNode (int index) |
| int | getParentIndex (int nodeIndex) |
| SceneNode * | getParent (int nodeIndex) |
| SceneNode * | getParentById (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. | |
| SceneNode * | getChildAt (int parentIndex, int childOrdinal) |
| SceneNode * | getChildAtById (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. | |
| SceneNode * | findIf (NodePredFn pred) |
| First DFS match; nullptr if none. | |
| SceneNode * | findIfFrom (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. | |
| SceneLink * | findLink (SceneNode *node, int kind) |
| const SceneLink * | findLink (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 SceneHost * | createHost (const std::string &name="") |
详细描述
ECS mount point for one scene graph (full scene or nested subtree root). Isomorphic to eve::ui::UIHost.
在文件 SceneHost.h 第 80 行定义.
成员类型定义说明
◆ NodePredFn
| using eve::scene::SceneHost::NodePredFn = std::function<bool(SceneHost *host, int index, const SceneNode &node)> |
在文件 SceneHost.h 第 190 行定义.
◆ NodeVisitFn
| using eve::scene::SceneHost::NodeVisitFn = std::function<void(SceneHost *host, int index, SceneNode &node)> |
在文件 SceneHost.h 第 189 行定义.
◆ SceneEventFn
| using eve::scene::SceneHost::SceneEventFn = std::function<void(SceneHost *host, const std::string &action, const std::string &nodeId, const std::string &parentId)> |
在文件 SceneHost.h 第 167 行定义.
成员函数说明
◆ addChild()
| bool eve::scene::SceneHost::addChild | ( | int | parentIndex, |
| int | childIndex | ||
| ) |
在文件 SceneHost.cpp 第 379 行定义.
引用了 setParent().
◆ addTag()
| bool eve::scene::SceneHost::addTag | ( | SceneNode * | node, |
| const std::string & | tag | ||
| ) |
在文件 SceneHost.cpp 第 609 行定义.
引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.
◆ collectIds()
| std::vector< std::string > eve::scene::SceneHost::collectIds | ( | ) |
◆ collectIdsByName()
| std::vector< std::string > eve::scene::SceneHost::collectIdsByName | ( | const std::string & | name | ) |
在文件 SceneHost.cpp 第 514 行定义.
引用了 collectIdsWhere(), n , 以及 name.
◆ collectIdsFrom()
| std::vector< std::string > eve::scene::SceneHost::collectIdsFrom | ( | int | nodeIndex | ) |
在文件 SceneHost.cpp 第 500 行定义.
引用了 n , 以及 walkDepthFirstFrom().
被这些函数引用 collectIds() , 以及 eve::scene::Scene::collectIdsFrom().
◆ collectIdsVisible()
| std::vector< std::string > eve::scene::SceneHost::collectIdsVisible | ( | bool | visible = true | ) |
在文件 SceneHost.cpp 第 518 行定义.
引用了 collectIdsWhere() , 以及 n.
◆ collectIdsWhere()
| std::vector< std::string > eve::scene::SceneHost::collectIdsWhere | ( | NodePredFn | pred | ) |
在文件 SceneHost.cpp 第 506 行定义.
被这些函数引用 collectIdsByName() , 以及 collectIdsVisible().
◆ createHost()
|
static |
在文件 SceneHost.cpp 第 122 行定义.
被这些函数引用 eve::sceneloader::SceneLoader::load() , 以及 eve::scene::SceneComponent::mountAs().
◆ filter()
| std::vector< SceneNode * > eve::scene::SceneHost::filter | ( | NodePredFn | pred | ) |
在文件 SceneHost.cpp 第 450 行定义.
引用了 filterFrom().
◆ filterFrom()
| std::vector< SceneNode * > eve::scene::SceneHost::filterFrom | ( | int | nodeIndex, |
| NodePredFn | pred | ||
| ) |
◆ filterIndices()
| std::vector< int > eve::scene::SceneHost::filterIndices | ( | NodePredFn | pred | ) |
在文件 SceneHost.cpp 第 463 行定义.
引用了 filterIndicesFrom().
◆ filterIndicesFrom()
| std::vector< int > eve::scene::SceneHost::filterIndicesFrom | ( | int | nodeIndex, |
| NodePredFn | pred | ||
| ) |
在文件 SceneHost.cpp 第 467 行定义.
引用了 eve::scene::node() , 以及 walkDepthFirstFrom().
被这些函数引用 filterIndices().
◆ findAllByKey()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllByKey | ( | const std::string & | key | ) |
在文件 SceneHost.cpp 第 480 行定义.
◆ findAllByName()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllByName | ( | const std::string & | name | ) |
在文件 SceneHost.cpp 第 476 行定义.
◆ findAllBySpace()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllBySpace | ( | const std::string & | space | ) |
在文件 SceneHost.cpp 第 488 行定义.
◆ findAllByTag()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllByTag | ( | const std::string & | tag | ) |
在文件 SceneHost.cpp 第 637 行定义.
◆ findAllLinked()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllLinked | ( | ) |
在文件 SceneHost.cpp 第 492 行定义.
◆ findAllVisible()
| std::vector< SceneNode * > eve::scene::SceneHost::findAllVisible | ( | bool | visible = true | ) |
在文件 SceneHost.cpp 第 484 行定义.
◆ findById()
| SceneNode * eve::scene::SceneHost::findById | ( | const std::string & | id | ) |
◆ findByKey()
| SceneNode * eve::scene::SceneHost::findByKey | ( | const std::string & | key | ) |
在文件 SceneHost.cpp 第 150 行定义.
引用了 n.
◆ findByName()
| SceneNode * eve::scene::SceneHost::findByName | ( | const std::string & | name | ) |
First node whose name equals name (DFS from root).
在文件 SceneHost.cpp 第 159 行定义.
引用了 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.cpp 第 165 行定义.
引用了 findIndexByPath() , 以及 idx.
◆ findIf()
| SceneNode * eve::scene::SceneHost::findIf | ( | NodePredFn | pred | ) |
◆ findIfFrom()
| SceneNode * eve::scene::SceneHost::findIfFrom | ( | int | nodeIndex, |
| NodePredFn | pred | ||
| ) |
◆ findIndexById()
| int eve::scene::SceneHost::findIndexById | ( | const std::string & | id | ) |
在文件 SceneHost.cpp 第 171 行定义.
被这些函数引用 getChildAtById(), getChildCountById(), getChildIds(), getParentById(), getPathById(), hasNode(), isAncestorOfById(), markSubtreeDirtyById(), removeChildById() , 以及 setParentById().
◆ findIndexByKey()
| int eve::scene::SceneHost::findIndexByKey | ( | const std::string & | key | ) |
在文件 SceneHost.cpp 第 186 行定义.
◆ findIndexByName()
| int eve::scene::SceneHost::findIndexByName | ( | const std::string & | name | ) |
◆ findIndexByPath()
| int eve::scene::SceneHost::findIndexByPath | ( | const std::string & | path | ) |
◆ findLink() [1/2]
在文件 SceneHost.cpp 第 581 行定义.
引用了 kind , 以及 eve::scene::node().
◆ findLink() [2/2]
在文件 SceneHost.cpp 第 573 行定义.
引用了 kind , 以及 eve::scene::node().
◆ 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.cpp 第 399 行定义.
被这些函数引用 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.cpp 第 404 行定义.
引用了 fn.
◆ getChildAt()
| SceneNode * eve::scene::SceneHost::getChildAt | ( | int | parentIndex, |
| int | childOrdinal | ||
| ) |
◆ getChildAtById()
| SceneNode * eve::scene::SceneHost::getChildAtById | ( | const std::string & | parentId, |
| int | childOrdinal | ||
| ) |
在文件 SceneHost.cpp 第 291 行定义.
引用了 findIndexById() , 以及 getChildAt().
◆ getChildCount()
| int eve::scene::SceneHost::getChildCount | ( | int | nodeIndex | ) |
◆ getChildCountById()
| int eve::scene::SceneHost::getChildCountById | ( | const std::string & | id | ) |
在文件 SceneHost.cpp 第 272 行定义.
引用了 findIndexById() , 以及 getChildCount().
被这些函数引用 eve::scene::Scene::getChildCount().
◆ getChildIds()
| std::vector< std::string > eve::scene::SceneHost::getChildIds | ( | const std::string & | parentId | ) |
在文件 SceneHost.cpp 第 312 行定义.
引用了 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.cpp 第 274 行定义.
引用了 c.
被这些函数引用 getChildAt().
◆ getChildIndices()
| std::vector< int > eve::scene::SceneHost::getChildIndices | ( | int | nodeIndex | ) |
◆ getChildren()
| std::vector< SceneNode * > eve::scene::SceneHost::getChildren | ( | int | nodeIndex | ) |
◆ getName()
| const std::string & eve::scene::SceneHost::getName | ( | ) |
在文件 SceneHost.cpp 第 135 行定义.
◆ getNode()
| SceneNode * eve::scene::SceneHost::getNode | ( | int | index | ) |
在文件 SceneHost.cpp 第 245 行定义.
被这些函数引用 getChildAt() , 以及 getParent().
◆ getNodeCount()
| int eve::scene::SceneHost::getNodeCount | ( | ) |
在文件 SceneHost.cpp 第 235 行定义.
被这些函数引用 eve::scene::Scene::getNodeCount().
◆ getOwnerId()
|
inline |
在文件 SceneHost.h 第 111 行定义.
◆ getParent()
| SceneNode * eve::scene::SceneHost::getParent | ( | int | nodeIndex | ) |
◆ getParentById()
| SceneNode * eve::scene::SceneHost::getParentById | ( | const std::string & | id | ) |
在文件 SceneHost.cpp 第 259 行定义.
引用了 findIndexById() , 以及 getParent().
◆ getParentIndex()
| int eve::scene::SceneHost::getParentIndex | ( | int | nodeIndex | ) |
在文件 SceneHost.cpp 第 251 行定义.
被这些函数引用 getParent().
◆ getPath()
| std::string eve::scene::SceneHost::getPath | ( | int | nodeIndex | ) |
Id path "a/b/c" from root to node; empty if invalid.
在文件 SceneHost.cpp 第 320 行定义.
被这些函数引用 getPathById().
◆ getPathById()
| std::string eve::scene::SceneHost::getPathById | ( | const std::string & | id | ) |
在文件 SceneHost.cpp 第 335 行定义.
引用了 findIndexById() , 以及 getPath().
被这些函数引用 eve::scene::Scene::getNodePath().
◆ getRoot()
| SceneNode * eve::scene::SceneHost::getRoot | ( | ) |
在文件 SceneHost.cpp 第 239 行定义.
◆ getRootIndex()
| int eve::scene::SceneHost::getRootIndex | ( | ) |
在文件 SceneHost.cpp 第 237 行定义.
◆ hasNode()
| bool eve::scene::SceneHost::hasNode | ( | const std::string & | id | ) |
◆ hasTag()
| bool eve::scene::SceneHost::hasTag | ( | const SceneNode * | node, |
| const std::string & | tag | ||
| ) | const |
在文件 SceneHost.cpp 第 629 行定义.
引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.
◆ invalidateIndex()
|
inline |
在文件 SceneHost.h 第 164 行定义.
被这些函数引用 eve::scene::applyTree() , 以及 eve::sceneloader::SceneLoader::applyTreeDiff().
◆ isAncestorOf()
| bool eve::scene::SceneHost::isAncestorOf | ( | int | ancestorIndex, |
| int | nodeIndex | ||
| ) |
在文件 SceneHost.cpp 第 337 行定义.
被这些函数引用 isAncestorOfById() , 以及 isDescendantOf().
◆ isAncestorOfById()
| bool eve::scene::SceneHost::isAncestorOfById | ( | const std::string & | ancestorId, |
| const std::string & | nodeId | ||
| ) |
在文件 SceneHost.cpp 第 344 行定义.
引用了 findIndexById() , 以及 isAncestorOf().
被这些函数引用 eve::scene::Scene::isAncestor() , 以及 isDescendantOfById().
◆ isDescendantOf()
| bool eve::scene::SceneHost::isDescendantOf | ( | int | nodeIndex, |
| int | ancestorIndex | ||
| ) |
在文件 SceneHost.cpp 第 348 行定义.
引用了 isAncestorOf().
◆ isDescendantOfById()
| bool eve::scene::SceneHost::isDescendantOfById | ( | const std::string & | nodeId, |
| const std::string & | ancestorId | ||
| ) |
◆ 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.cpp 第 522 行定义.
引用了 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.cpp 第 550 行定义.
引用了 eve::scene::findLinkKind(), link() , 以及 s.
◆ linkCamera3D()
| bool eve::scene::SceneHost::linkCamera3D | ( | const std::string & | nodeId, |
| graphics::Camera3D * | c | ||
| ) |
在文件 SceneHost.cpp 第 546 行定义.
引用了 c, eve::scene::findLinkKind() , 以及 link().
◆ linkCount()
| int eve::scene::SceneHost::linkCount | ( | const std::string & | nodeId | ) |
在文件 SceneHost.cpp 第 589 行定义.
引用了 findById() , 以及 n.
◆ linkPhysics2D()
| bool eve::scene::SceneHost::linkPhysics2D | ( | const std::string & | nodeId, |
| physics::Body * | b, | ||
| int | syncMode = 0 |
||
| ) |
在文件 SceneHost.cpp 第 538 行定义.
引用了 b, eve::scene::findLinkKind() , 以及 link().
◆ linkPhysics3D()
| bool eve::scene::SceneHost::linkPhysics3D | ( | const std::string & | nodeId, |
| physics::Body3D * | b, | ||
| int | syncMode = 0 |
||
| ) |
在文件 SceneHost.cpp 第 542 行定义.
引用了 b, eve::scene::findLinkKind() , 以及 link().
◆ linkRenderable2D()
| bool eve::scene::SceneHost::linkRenderable2D | ( | const std::string & | nodeId, |
| graphics::Renderable2D * | r | ||
| ) |
在文件 SceneHost.cpp 第 530 行定义.
引用了 eve::scene::findLinkKind() , 以及 link().
◆ linkRenderable3D()
| bool eve::scene::SceneHost::linkRenderable3D | ( | const std::string & | nodeId, |
| graphics::Renderable3D * | r | ||
| ) |
在文件 SceneHost.cpp 第 534 行定义.
引用了 eve::scene::findLinkKind() , 以及 link().
◆ markDirty()
|
inline |
在文件 SceneHost.h 第 157 行定义.
◆ markSubtreeDirty()
| void eve::scene::SceneHost::markSubtreeDirty | ( | int | nodeIndex | ) |
Mark a node's subtree for world recompute (recompute it + descendants).
在文件 SceneHost.cpp 第 392 行定义.
被这些函数引用 markSubtreeDirtyById(), removeChild() , 以及 setParent().
◆ markSubtreeDirtyById()
|
inline |
在文件 SceneHost.h 第 161 行定义.
引用了 findIndexById() , 以及 markSubtreeDirty().
◆ markTransformDirty()
|
inline |
在文件 SceneHost.h 第 158 行定义.
◆ release()
|
inlineoverride |
在文件 SceneHost.h 第 84 行定义.
◆ removeChild()
| bool eve::scene::SceneHost::removeChild | ( | int | parentIndex, |
| int | childIndex | ||
| ) |
◆ removeChildById()
| bool eve::scene::SceneHost::removeChildById | ( | const std::string & | parentId, |
| const std::string & | childId | ||
| ) |
在文件 SceneHost.cpp 第 602 行定义.
引用了 findIndexById() , 以及 removeChild().
◆ removeTag()
| bool eve::scene::SceneHost::removeTag | ( | SceneNode * | node, |
| const std::string & | tag | ||
| ) |
在文件 SceneHost.cpp 第 618 行定义.
引用了 eve::scene::node() , 以及 eve::scene::NodeDesc::tags.
◆ setEventHandler()
|
inline |
在文件 SceneHost.h 第 170 行定义.
引用了 fn.
◆ setLayer()
|
inline |
在文件 SceneHost.h 第 176 行定义.
引用了 layer.
◆ setName()
| void eve::scene::SceneHost::setName | ( | const std::string & | name | ) |
在文件 SceneHost.cpp 第 133 行定义.
引用了 name.
◆ setOwnerId()
|
inline |
在文件 SceneHost.h 第 110 行定义.
引用了 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.cpp 第 356 行定义.
引用了 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.cpp 第 594 行定义.
引用了 findIndexById() , 以及 setParent().
◆ setTree()
| void eve::scene::SceneHost::setTree | ( | NodeDesc | root | ) |
Full replace.
在文件 SceneHost.cpp 第 137 行定义.
被这些函数引用 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.cpp 第 139 行定义.
◆ setVisible()
|
inline |
在文件 SceneHost.h 第 175 行定义.
引用了 v.
◆ unlink() [1/2]
| bool eve::scene::SceneHost::unlink | ( | const std::string & | nodeId | ) |
◆ 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.cpp 第 554 行定义.
引用了 findById(), kind , 以及 n.
◆ walkAncestors()
| void eve::scene::SceneHost::walkAncestors | ( | int | nodeIndex, |
| NodeVisitFn | fn | ||
| ) |
◆ walkBreadthFirst()
| void eve::scene::SceneHost::walkBreadthFirst | ( | NodeVisitFn | fn | ) |
BFS from root (or from nodeIndex), inclusive.
在文件 SceneHost.cpp 第 414 行定义.
引用了 fn , 以及 walkBreadthFirstFrom().
◆ walkBreadthFirstFrom()
| void eve::scene::SceneHost::walkBreadthFirstFrom | ( | int | nodeIndex, |
| NodeVisitFn | fn | ||
| ) |
◆ walkChildren()
| void eve::scene::SceneHost::walkChildren | ( | int | parentIndex, |
| NodeVisitFn | fn | ||
| ) |
◆ walkDepthFirst()
| void eve::scene::SceneHost::walkDepthFirst | ( | NodeVisitFn | fn | ) |
DFS from root (or from nodeIndex), inclusive.
在文件 SceneHost.cpp 第 408 行定义.
引用了 fn , 以及 walkDepthFirstFrom().
被这些函数引用 findIndexByName().
◆ walkDepthFirstFrom()
| void eve::scene::SceneHost::walkDepthFirstFrom | ( | int | nodeIndex, |
| NodeVisitFn | fn | ||
| ) |
在文件 SceneHost.cpp 第 410 行定义.
引用了 fn.
被这些函数引用 collectIdsFrom(), filterFrom(), filterIndicesFrom(), findIfFrom() , 以及 walkDepthFirst().
该类的文档由以下文件生成:
- src/modules/scene/SceneHost.h
- src/modules/scene/SceneHost.cpp