Declarative scene module (eve.Scene). 更多...
#include <Scene.h>
Public 成员函数 | |
| Module_REG (Scene) | |
| Scene () | |
| ~Scene () override=default | |
| SceneHost * | mountAs (const std::string &name, NodeDesc root) |
| Creates/replaces a named host from a NodeDesc tree and selects it. | |
| SceneHost * | mount (NodeDesc root) |
| Mounts the tree as an auto-named host and selects it. | |
| SceneHost * | remount (NodeDesc root) |
| Replaces the selected host's tree. | |
| SceneHost * | remountReconcile (NodeDesc root) |
| Remount with key reconcile (props-only when structure matches). | |
| SceneHost * | remountAs (const std::string &name, NodeDesc root) |
| Creates/replaces a named host (does not select it). | |
| bool | select (const std::string &name) |
| Selects a named host; false when it does not exist. | |
| SceneHost * | findHost (const std::string &name) const |
| Finds a host by name, or nullptr. | |
| SceneHost * | findHostByOwner (uint32_t ownerId) const |
| Finds the host bound to an owner id, or nullptr. | |
| SceneHost * | current () const |
| Currently selected host, or nullptr. | |
| void | bindOwner (uint32_t ownerId) |
| Binds the selected host to a UI/scene owner id. | |
| void | setHostVisible (bool visible) |
| Shows/hides every host (or the selected one when a host is selected). | |
| void | setHostLayer (int layer) |
| Sets the render layer of every host (or the selected one). | |
| void | updateTransforms () |
| Propagate transforms (+ link sync) for all hosts (or current if selected). | |
| void | updateTransformsAll () |
| Propagate transforms for every host regardless of selection. | |
| bool | setNodePosition (const std::string &id, float x, float y, float z) |
| Script-friendly TRS setters on the current host; each marks the transform dirty. | |
| bool | setNodeRotation (const std::string &id, float yaw, float pitch, float roll) |
| Sets the local rotation (yaw/pitch/roll in degrees) of a node. | |
| bool | setNodeScale (const std::string &id, float sx, float sy, float sz) |
| Sets the local scale of a node. | |
| bool | setNodeVisible (const std::string &id, bool visible) |
| Shows/hides a node. | |
| bool | linkRenderable2D (const std::string &nodeId, graphics::Renderable2D *r) |
| Links a 2D renderable to a node in the current host. | |
| bool | linkRenderable3D (const std::string &nodeId, graphics::Renderable3D *r) |
| Links a 3D renderable to a node in the current host. | |
| bool | unlinkNode (const std::string &nodeId) |
| Removes every link on a node in the current host. | |
| bool | linkRenderable2DAt (const std::string &hostName, const std::string &nodeId, graphics::Renderable2D *r) |
| bool | linkRenderable3DAt (const std::string &hostName, const std::string &nodeId, graphics::Renderable3D *r) |
| bool | linkPhysics2DAt (const std::string &hostName, const std::string &nodeId, physics::Body *b, const std::string &mode) |
| bool | linkPhysics3DAt (const std::string &hostName, const std::string &nodeId, physics::Body3D *b, const std::string &mode) |
| bool | linkCamera3DAt (const std::string &hostName, const std::string &nodeId, graphics::Camera3D *c) |
| bool | linkAudio3DAt (const std::string &hostName, const std::string &nodeId, audio::Source *s) |
| bool | unlinkNodeAt (const std::string &hostName, const std::string &nodeId) |
| Remove every link on the node. | |
| bool | unlinkNodeKindAt (const std::string &hostName, const std::string &nodeId, const std::string &kind) |
| Remove links of one kind ("renderable2d"|"renderable3d"|"physics2d"|...). | |
| int | linkCountAt (const std::string &hostName, const std::string &nodeId) |
| std::vector< float > | getNodePositionAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeRotationAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeScaleAt (const std::string &hostName, const std::string &nodeId) const |
| bool | getNodeVisibleAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeWorldPositionAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeWorldRotationAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeWorldScaleAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | localToWorldAt (const std::string &hostName, const std::string &nodeId, float x, float y, float z) const |
| std::vector< float > | worldToLocalAt (const std::string &hostName, const std::string &nodeId, float x, float y, float z) const |
| bool | setNodeParentAt (const std::string &hostName, const std::string &childId, const std::string &parentId) |
| Reparent by id; empty parentId detaches. Cycle-safe. | |
| bool | removeNodeAt (const std::string &hostName, const std::string &nodeId) |
| Detach node from its parent (arena node stays; rebuild to delete). | |
| bool | addChildAt (const std::string &hostName, const std::string &parentId, const std::string &childId) |
| bool | removeChildAt (const std::string &hostName, const std::string &parentId, const std::string &childId) |
| bool | setNodeQuaternionAt (const std::string &hostName, const std::string &nodeId, float qx, float qy, float qz, float qw) |
| std::vector< float > | getNodeQuaternionAt (const std::string &hostName, const std::string &nodeId) const |
| bool | setNodeLookAtAt (const std::string &hostName, const std::string &nodeId, float tx, float ty, float tz) |
| Orient node so its local +Z axis points at (tx,ty,tz). | |
| bool | addNodeTagAt (const std::string &hostName, const std::string &nodeId, const std::string &tag) |
| bool | removeNodeTagAt (const std::string &hostName, const std::string &nodeId, const std::string &tag) |
| bool | hasNodeTagAt (const std::string &hostName, const std::string &nodeId, const std::string &tag) const |
| std::vector< std::string > | getNodeTagsAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< std::string > | collectIdsByTagAt (const std::string &hostName, const std::string &tag) const |
| bool | setNodeLayerAt (const std::string &hostName, const std::string &nodeId, int layer) |
| int | getNodeLayerAt (const std::string &hostName, const std::string &nodeId) const |
| bool | setNodeEventHandlerAt (const std::string &hostName, ssq::Object cb) |
| Register a script callback for node lifecycle events on a host: cb(action, nodeId, parentId) with action in {"node_added","node_removed","node_moved","node_changed"}. Pass null cb to clear. Rooted for the process lifetime. | |
| bool | setNodeBoundsAt (const std::string &hostName, const std::string &nodeId, float minX, float minY, float minZ, float maxX, float maxY, float maxZ) |
| bool | hasNodeBoundsAt (const std::string &hostName, const std::string &nodeId) const |
| std::vector< float > | getNodeBoundsAt (const std::string &hostName, const std::string &nodeId) const |
| std::string | serializeHostAt (const std::string &hostName) const |
| bool | deserializeHostAt (const std::string &hostName, const std::string &json) |
| std::string | pickRayAt (const std::string &hostName, float ox, float oy, float oz, float dx, float dy, float dz) const |
| Nearest node id hit by a world ray (nodes with bounds), or "". | |
| std::string | pickScreenAt (const std::string &hostName, graphics::Camera3D *cam, float screenX, float screenY, float viewW, float viewH) const |
| Screen-space picking through a Camera3D (camera.screenToRay). | |
| std::vector< std::string > | collectFrustumIdsAt (const std::string &hostName, graphics::Camera3D *cam, float viewW, float viewH) const |
| Ids of nodes whose world AABB intersects the camera frustum. | |
| bool | syncSpatialIndexAt (const std::string &hostName, spatial::Octree *ot) const |
| Insert every bounded node's world AABB into an octree (id = arena index). | |
| std::string | nodeIdFromSpatialIdAt (const std::string &hostName, int index) const |
| Map a spatial-index id (arena index) back to a node id. | |
| bool | hasNode (const std::string &id) |
| int | getNodeCount () |
| std::string | getRootId () |
| std::string | getParentId (const std::string &id) |
| int | getChildCount (const std::string &id) |
| std::string | getChildIdAt (const std::string &parentId, int childOrdinal) |
| std::string | findIdByName (const std::string &name) |
| std::string | findIdByPath (const std::string &path) |
| std::string | getNodePath (const std::string &id) |
| bool | isAncestor (const std::string &ancestorId, const std::string &nodeId) |
| bool | isDescendant (const std::string &nodeId, const std::string &ancestorId) |
| std::vector< std::string > | collectIds () |
| std::vector< std::string > | collectIdsFrom (const std::string &id) |
| std::vector< std::string > | collectIdsByName (const std::string &name) |
| std::vector< std::string > | collectIdsVisible (bool visible) |
| std::vector< std::string > | collectChildIds (const std::string &parentId) |
| std::vector< std::string > | walkDepthFirstIds () |
| DFS order of ids under root (same as collectIds). Kept for script naming clarity. | |
| std::vector< std::string > | walkBreadthFirstIds () |
| void | beginBuild () |
| void | beginNode (const std::string &id, const std::string &name="") |
| void | beginGroup (const std::string &id="") |
| void | end () |
| void | addNode (const std::string &id, const std::string &name="") |
| void | setBuildPosition (float x, float y, float z=0.f) |
| void | setBuildRotation (float yaw, float pitch=0.f, float roll=0.f) |
| void | setBuildScale (float sx, float sy, float sz=1.f) |
| void | setBuildSpace (const std::string &space) |
| void | setBuildVisible (bool visible) |
| bool | mountBuild () |
| bool | mountBuildAs (const std::string &name) |
| bool | remountBuildAs (const std::string &name) |
| SceneHost * | resolveHost (const std::string &hostName) const |
| Host-qualified resolution: empty hostName → currently selected host. | |
| bool | rootEntity (const std::string &hostName, const std::string &nodeId, ssq::Object instance) |
| Root one script instance on a node (creates SceneObject lazily). | |
| bool | unrootEntityAt (const std::string &hostName, const std::string &nodeId, int index) |
| Remove a rooted script instance by its index in the binding list. | |
| int | forEachEntity (const std::string &hostName, const std::string &nodeId, ssq::Object cb) |
| Call cb(instance, index) for every rooted instance; returns count. | |
| void | updateScripts (float dt) |
| updateTransformsAll() + call update(dt) on every rooted instance. | |
| std::string | currentHostName () const |
| SceneNodeRef * | getNodeRefAt (const std::string &hostName, const std::string &nodeId) const |
| SceneNodeRef * | getNodeRefByPathAt (const std::string &hostName, const std::string &path) const |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
详细描述
Declarative scene module (eve.Scene).
Isomorphic to eve::ui::UI: named SceneHost graphs, NodeDesc + SceneComponent.build, mount / remountReconcile / beginBuild. TransformSystem propagates world matrices and syncs linked Renderable2D/3D transforms.
构造及析构函数说明
◆ Scene()
| eve::scene::Scene::Scene | ( | ) |
◆ ~Scene()
|
overridedefault |
成员函数说明
◆ addChildAt()
| bool eve::scene::Scene::addChildAt | ( | const std::string & | hostName, |
| const std::string & | parentId, | ||
| const std::string & | childId | ||
| ) |
在文件 SceneNodes.cpp 第 262 行定义.
引用了 h, ok, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ addNode()
| void eve::scene::Scene::addNode | ( | const std::string & | id, |
| const std::string & | name = "" |
||
| ) |
◆ addNodeTagAt()
| bool eve::scene::Scene::addNodeTagAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| const std::string & | tag | ||
| ) |
在文件 SceneNodes.cpp 第 327 行定义.
引用了 h, n , 以及 resolveHost().
◆ beginBuild()
| void eve::scene::Scene::beginBuild | ( | ) |
◆ beginGroup()
◆ beginNode()
| void eve::scene::Scene::beginNode | ( | const std::string & | id, |
| const std::string & | name = "" |
||
| ) |
◆ bindOwner()
| void eve::scene::Scene::bindOwner | ( | uint32_t | ownerId | ) |
Binds the selected host to a UI/scene owner id.
引用了 beginBuild(), name , 以及 eve::scene::node().
◆ collectChildIds()
| std::vector< std::string > eve::scene::Scene::collectChildIds | ( | const std::string & | parentId | ) |
在文件 SceneNodes.cpp 第 589 行定义.
引用了 eve::scene::SceneHost::getChildIds() , 以及 h.
◆ collectFrustumIdsAt()
| std::vector< std::string > eve::scene::Scene::collectFrustumIdsAt | ( | const std::string & | hostName, |
| graphics::Camera3D * | cam, | ||
| float | viewW, | ||
| float | viewH | ||
| ) | const |
Ids of nodes whose world AABB intersects the camera frustum.
在文件 ScenePicking.cpp 第 34 行定义.
引用了 eve::scene::aabbIntersectsFrustum(), d, eye, h, n, eve::graphics::perspectiveVulkanRH_ZO(), resolveHost() , 以及 eve::scene::worldBoundsOf().
◆ collectIds()
| std::vector< std::string > eve::scene::Scene::collectIds | ( | ) |
在文件 SceneNodes.cpp 第 568 行定义.
引用了 eve::scene::SceneHost::collectIds() , 以及 h.
被这些函数引用 walkDepthFirstIds().
◆ collectIdsByName()
| std::vector< std::string > eve::scene::Scene::collectIdsByName | ( | const std::string & | name | ) |
在文件 SceneNodes.cpp 第 579 行定义.
引用了 eve::scene::SceneHost::collectIdsByName(), h , 以及 name.
◆ collectIdsByTagAt()
| std::vector< std::string > eve::scene::Scene::collectIdsByTagAt | ( | const std::string & | hostName, |
| const std::string & | tag | ||
| ) | const |
在文件 SceneNodes.cpp 第 356 行定义.
引用了 h, n , 以及 resolveHost().
◆ collectIdsFrom()
| std::vector< std::string > eve::scene::Scene::collectIdsFrom | ( | const std::string & | id | ) |
在文件 SceneNodes.cpp 第 573 行定义.
引用了 eve::scene::SceneHost::collectIdsFrom() , 以及 h.
◆ collectIdsVisible()
| std::vector< std::string > eve::scene::Scene::collectIdsVisible | ( | bool | visible | ) |
在文件 SceneNodes.cpp 第 584 行定义.
引用了 eve::scene::SceneHost::collectIdsVisible() , 以及 h.
◆ current()
|
inline |
◆ currentHostName()
| std::string eve::scene::Scene::currentHostName | ( | ) | const |
被这些函数引用 linkRenderable2D(), linkRenderable3D() , 以及 unlinkNode().
◆ deserializeHostAt()
| bool eve::scene::Scene::deserializeHostAt | ( | const std::string & | hostName, |
| const std::string & | json | ||
| ) |
◆ end()
◆ findHost()
| SceneHost * eve::scene::Scene::findHost | ( | const std::string & | name | ) | const |
◆ findHostByOwner()
| SceneHost * eve::scene::Scene::findHostByOwner | ( | uint32_t | ownerId | ) | const |
◆ findIdByName()
| std::string eve::scene::Scene::findIdByName | ( | const std::string & | name | ) |
在文件 SceneNodes.cpp 第 539 行定义.
引用了 h, eve::scene::SceneNode::id, n , 以及 name.
◆ findIdByPath()
| std::string eve::scene::Scene::findIdByPath | ( | const std::string & | path | ) |
在文件 SceneNodes.cpp 第 546 行定义.
引用了 h, eve::scene::SceneNode::id , 以及 n.
◆ forEachEntity()
| int eve::scene::Scene::forEachEntity | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| ssq::Object | cb | ||
| ) |
◆ getChildCount()
| int eve::scene::Scene::getChildCount | ( | const std::string & | id | ) |
在文件 SceneNodes.cpp 第 527 行定义.
引用了 eve::scene::SceneHost::getChildCountById() , 以及 h.
◆ getChildIdAt()
| std::string eve::scene::Scene::getChildIdAt | ( | const std::string & | parentId, |
| int | childOrdinal | ||
| ) |
在文件 SceneNodes.cpp 第 532 行定义.
引用了 c, h , 以及 eve::scene::SceneNode::id.
◆ getNodeBoundsAt()
| std::vector< float > eve::scene::Scene::getNodeBoundsAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 452 行定义.
引用了 eve::scene::SceneNode::bminX, h, n , 以及 resolveHost().
◆ getNodeCount()
| int eve::scene::Scene::getNodeCount | ( | ) |
在文件 SceneNodes.cpp 第 508 行定义.
引用了 eve::scene::SceneHost::getNodeCount() , 以及 h.
◆ getNodeLayerAt()
| int eve::scene::Scene::getNodeLayerAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 376 行定义.
引用了 h, eve::scene::SceneNode::layer, n , 以及 resolveHost().
◆ getNodePath()
| std::string eve::scene::Scene::getNodePath | ( | const std::string & | id | ) |
在文件 SceneNodes.cpp 第 553 行定义.
引用了 eve::scene::SceneHost::getPathById() , 以及 h.
◆ getNodePositionAt()
| std::vector< float > eve::scene::Scene::getNodePositionAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 166 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::x.
◆ getNodeQuaternionAt()
| std::vector< float > eve::scene::Scene::getNodeQuaternionAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 294 行定义.
引用了 h, n , 以及 resolveHost().
◆ getNodeRefAt()
| SceneNodeRef * eve::scene::Scene::getNodeRefAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
◆ getNodeRefByPathAt()
| SceneNodeRef * eve::scene::Scene::getNodeRefByPathAt | ( | const std::string & | hostName, |
| const std::string & | path | ||
| ) | const |
◆ getNodeRotationAt()
| std::vector< float > eve::scene::Scene::getNodeRotationAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 174 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::yaw.
◆ getNodeScaleAt()
| std::vector< float > eve::scene::Scene::getNodeScaleAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 182 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::sx.
◆ getNodeTagsAt()
| std::vector< std::string > eve::scene::Scene::getNodeTagsAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 348 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::tags.
◆ getNodeVisibleAt()
| bool eve::scene::Scene::getNodeVisibleAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 190 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::visible.
◆ getNodeWorldPositionAt()
| std::vector< float > eve::scene::Scene::getNodeWorldPositionAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 197 行定义.
引用了 h, n, resolveHost() , 以及 eve::scene::SceneNode::world.
◆ getNodeWorldRotationAt()
| std::vector< float > eve::scene::Scene::getNodeWorldRotationAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 205 行定义.
引用了 h, n, pos, resolveHost() , 以及 scale.
◆ getNodeWorldScaleAt()
| std::vector< float > eve::scene::Scene::getNodeWorldScaleAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 215 行定义.
引用了 h, n, pos, resolveHost() , 以及 scale.
◆ getParentId()
| std::string eve::scene::Scene::getParentId | ( | const std::string & | id | ) |
在文件 SceneNodes.cpp 第 520 行定义.
引用了 h, eve::scene::SceneNode::id , 以及 p.
◆ getRootId()
| std::string eve::scene::Scene::getRootId | ( | ) |
在文件 SceneNodes.cpp 第 513 行定义.
引用了 h , 以及 eve::scene::SceneNode::id.
◆ hasNode()
| bool eve::scene::Scene::hasNode | ( | const std::string & | id | ) |
在文件 SceneNodes.cpp 第 503 行定义.
引用了 h , 以及 eve::scene::SceneHost::hasNode().
◆ hasNodeBoundsAt()
| bool eve::scene::Scene::hasNodeBoundsAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) | const |
在文件 SceneNodes.cpp 第 446 行定义.
引用了 h, eve::scene::SceneNode::hasBounds, n , 以及 resolveHost().
◆ hasNodeTagAt()
| bool eve::scene::Scene::hasNodeTagAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| const std::string & | tag | ||
| ) | const |
在文件 SceneNodes.cpp 第 341 行定义.
引用了 h, n , 以及 resolveHost().
◆ isAncestor()
| bool eve::scene::Scene::isAncestor | ( | const std::string & | ancestorId, |
| const std::string & | nodeId | ||
| ) |
在文件 SceneNodes.cpp 第 558 行定义.
引用了 h , 以及 eve::scene::SceneHost::isAncestorOfById().
◆ isDescendant()
| bool eve::scene::Scene::isDescendant | ( | const std::string & | nodeId, |
| const std::string & | ancestorId | ||
| ) |
在文件 SceneNodes.cpp 第 563 行定义.
引用了 h , 以及 eve::scene::SceneHost::isDescendantOfById().
◆ linkAudio3DAt()
| bool eve::scene::Scene::linkAudio3DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| audio::Source * | s | ||
| ) |
在文件 SceneNodes.cpp 第 132 行定义.
引用了 h, resolveHost(), s , 以及 eve::scene::TransformSystem::updateHost().
◆ linkCamera3DAt()
| bool eve::scene::Scene::linkCamera3DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| graphics::Camera3D * | c | ||
| ) |
在文件 SceneNodes.cpp 第 123 行定义.
引用了 c, h, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ linkCountAt()
| int eve::scene::Scene::linkCountAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) |
在文件 SceneNodes.cpp 第 157 行定义.
引用了 h , 以及 resolveHost().
◆ linkPhysics2DAt()
| bool eve::scene::Scene::linkPhysics2DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| physics::Body * | b, | ||
| const std::string & | mode | ||
| ) |
在文件 SceneNodes.cpp 第 105 行定义.
引用了 b, h, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ linkPhysics3DAt()
| bool eve::scene::Scene::linkPhysics3DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| physics::Body3D * | b, | ||
| const std::string & | mode | ||
| ) |
在文件 SceneNodes.cpp 第 114 行定义.
引用了 b, h, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ linkRenderable2D()
| bool eve::scene::Scene::linkRenderable2D | ( | const std::string & | nodeId, |
| graphics::Renderable2D * | r | ||
| ) |
Links a 2D renderable to a node in the current host.
在文件 SceneNodes.cpp 第 71 行定义.
引用了 currentHostName() , 以及 linkRenderable2DAt().
◆ linkRenderable2DAt()
| bool eve::scene::Scene::linkRenderable2DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| graphics::Renderable2D * | r | ||
| ) |
在文件 SceneNodes.cpp 第 87 行定义.
引用了 h, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
被这些函数引用 linkRenderable2D().
◆ linkRenderable3D()
| bool eve::scene::Scene::linkRenderable3D | ( | const std::string & | nodeId, |
| graphics::Renderable3D * | r | ||
| ) |
Links a 3D renderable to a node in the current host.
在文件 SceneNodes.cpp 第 75 行定义.
引用了 currentHostName() , 以及 linkRenderable3DAt().
◆ linkRenderable3DAt()
| bool eve::scene::Scene::linkRenderable3DAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| graphics::Renderable3D * | r | ||
| ) |
在文件 SceneNodes.cpp 第 96 行定义.
引用了 h, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
被这些函数引用 linkRenderable3D().
◆ localToWorldAt()
| std::vector< float > eve::scene::Scene::localToWorldAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | const |
在文件 SceneNodes.cpp 第 225 行定义.
引用了 h, n, p, resolveHost(), eve::scene::SceneNode::world, x, y , 以及 z.
◆ Module_REG()
| eve::scene::Scene::Module_REG | ( | Scene | ) |
◆ mount()
◆ mountAs()
Creates/replaces a named host from a NodeDesc tree and selects it.
被这些函数引用 beginBuild().
◆ mountBuild()
◆ mountBuildAs()
| bool eve::scene::Scene::mountBuildAs | ( | const std::string & | name | ) |
引用了 h, n , 以及 resolveHost().
◆ nodeIdFromSpatialIdAt()
| std::string eve::scene::Scene::nodeIdFromSpatialIdAt | ( | const std::string & | hostName, |
| int | index | ||
| ) | const |
Map a spatial-index id (arena index) back to a node id.
在文件 SceneNodes.cpp 第 497 行定义.
引用了 h, eve::scene::SceneNode::id, n , 以及 resolveHost().
◆ pickRayAt()
| std::string eve::scene::Scene::pickRayAt | ( | const std::string & | hostName, |
| float | ox, | ||
| float | oy, | ||
| float | oz, | ||
| float | dx, | ||
| float | dy, | ||
| float | dz | ||
| ) | const |
Nearest node id hit by a world ray (nodes with bounds), or "".
在文件 SceneNodes.cpp 第 461 行定义.
引用了 dir, h, n, eve::scene::rayAABB(), resolveHost(), w , 以及 eve::scene::worldBoundsOf().
被这些函数引用 pickScreenAt().
◆ pickScreenAt()
| std::string eve::scene::Scene::pickScreenAt | ( | const std::string & | hostName, |
| graphics::Camera3D * | cam, | ||
| float | screenX, | ||
| float | screenY, | ||
| float | viewW, | ||
| float | viewH | ||
| ) | const |
Screen-space picking through a Camera3D (camera.screenToRay).
在文件 ScenePicking.cpp 第 24 行定义.
引用了 eve::graphics::Camera3D::getScreenRayDirX(), eve::graphics::Camera3D::getScreenRayDirY(), eve::graphics::Camera3D::getScreenRayDirZ(), eve::graphics::Camera3D::getScreenRayOriginX(), eve::graphics::Camera3D::getScreenRayOriginY(), eve::graphics::Camera3D::getScreenRayOriginZ(), pickRayAt() , 以及 eve::graphics::Camera3D::screenToRay().
◆ remount()
◆ remountAs()
◆ remountBuildAs()
◆ remountReconcile()
◆ removeChildAt()
| bool eve::scene::Scene::removeChildAt | ( | const std::string & | hostName, |
| const std::string & | parentId, | ||
| const std::string & | childId | ||
| ) |
在文件 SceneNodes.cpp 第 271 行定义.
引用了 h, ok, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ removeNodeAt()
| bool eve::scene::Scene::removeNodeAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) |
Detach node from its parent (arena node stays; rebuild to delete).
在文件 SceneNodes.cpp 第 254 行定义.
引用了 h, ok, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ removeNodeTagAt()
| bool eve::scene::Scene::removeNodeTagAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| const std::string & | tag | ||
| ) |
在文件 SceneNodes.cpp 第 334 行定义.
引用了 h, n , 以及 resolveHost().
◆ resolveHost()
| SceneHost * eve::scene::Scene::resolveHost | ( | const std::string & | hostName | ) | const |
Host-qualified resolution: empty hostName → currently selected host.
被这些函数引用 addChildAt(), addNodeTagAt(), collectFrustumIdsAt(), collectIdsByTagAt(), getNodeBoundsAt(), getNodeLayerAt(), getNodePositionAt(), getNodeQuaternionAt(), getNodeRotationAt(), getNodeScaleAt(), getNodeTagsAt(), getNodeVisibleAt(), getNodeWorldPositionAt(), getNodeWorldRotationAt(), getNodeWorldScaleAt(), hasNodeBoundsAt(), hasNodeTagAt(), linkAudio3DAt(), linkCamera3DAt(), linkCountAt(), linkPhysics2DAt(), linkPhysics3DAt(), linkRenderable2DAt(), linkRenderable3DAt(), localToWorldAt(), mountBuildAs(), nodeIdFromSpatialIdAt(), pickRayAt(), removeChildAt(), removeNodeAt(), removeNodeTagAt(), setBuildScale(), setNodeBoundsAt(), setNodeEventHandlerAt(), setNodeLayerAt(), setNodeLookAtAt(), setNodeParentAt(), setNodeQuaternionAt(), syncSpatialIndexAt(), unlinkNodeAt(), unlinkNodeKindAt() , 以及 worldToLocalAt().
◆ rootEntity()
| bool eve::scene::Scene::rootEntity | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| ssq::Object | instance | ||
| ) |
Root one script instance on a node (creates SceneObject lazily).
◆ select()
| bool eve::scene::Scene::select | ( | const std::string & | name | ) |
◆ serializeHostAt()
| std::string eve::scene::Scene::serializeHostAt | ( | const std::string & | hostName | ) | const |
◆ setBuildPosition()
| void eve::scene::Scene::setBuildPosition | ( | float | x, |
| float | y, | ||
| float | z = 0.f |
||
| ) |
◆ setBuildRotation()
◆ setBuildScale()
| void eve::scene::Scene::setBuildScale | ( | float | sx, |
| float | sy, | ||
| float | sz = 1.f |
||
| ) |
引用了 h, n , 以及 resolveHost().
◆ setBuildSpace()
◆ setBuildVisible()
◆ setHostLayer()
| void eve::scene::Scene::setHostLayer | ( | int | layer | ) |
◆ setHostVisible()
| void eve::scene::Scene::setHostVisible | ( | bool | visible | ) |
Shows/hides every host (or the selected one when a host is selected).
引用了 beginBuild(), group , 以及 id.
◆ setNodeBoundsAt()
| bool eve::scene::Scene::setNodeBoundsAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| float | minX, | ||
| float | minY, | ||
| float | minZ, | ||
| float | maxX, | ||
| float | maxY, | ||
| float | maxZ | ||
| ) |
在文件 SceneNodes.cpp 第 430 行定义.
引用了 eve::scene::SceneNode::bminX, h, n , 以及 resolveHost().
◆ setNodeEventHandlerAt()
| bool eve::scene::Scene::setNodeEventHandlerAt | ( | const std::string & | hostName, |
| ssq::Object | cb | ||
| ) |
Register a script callback for node lifecycle events on a host: cb(action, nodeId, parentId) with action in {"node_added","node_removed","node_moved","node_changed"}. Pass null cb to clear. Rooted for the process lifetime.
在文件 SceneNodes.cpp 第 382 行定义.
引用了 h, name , 以及 resolveHost().
◆ setNodeLayerAt()
| bool eve::scene::Scene::setNodeLayerAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| int | layer | ||
| ) |
在文件 SceneNodes.cpp 第 367 行定义.
引用了 h, layer, eve::scene::SceneNode::layer, n , 以及 resolveHost().
◆ setNodeLookAtAt()
| bool eve::scene::Scene::setNodeLookAtAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| float | tx, | ||
| float | ty, | ||
| float | tz | ||
| ) |
Orient node so its local +Z axis points at (tx,ty,tz).
在文件 SceneNodes.cpp 第 303 行定义.
引用了 f, h, n, pos , 以及 resolveHost().
◆ setNodeParentAt()
| bool eve::scene::Scene::setNodeParentAt | ( | const std::string & | hostName, |
| const std::string & | childId, | ||
| const std::string & | parentId | ||
| ) |
Reparent by id; empty parentId detaches. Cycle-safe.
在文件 SceneNodes.cpp 第 245 行定义.
引用了 h, ok, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ setNodePosition()
| bool eve::scene::Scene::setNodePosition | ( | const std::string & | id, |
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) |
Script-friendly TRS setters on the current host; each marks the transform dirty.
在文件 SceneNodes.cpp 第 25 行定义.
◆ setNodeQuaternionAt()
| bool eve::scene::Scene::setNodeQuaternionAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| float | qx, | ||
| float | qy, | ||
| float | qz, | ||
| float | qw | ||
| ) |
在文件 SceneNodes.cpp 第 280 行定义.
引用了 h, n , 以及 resolveHost().
◆ setNodeRotation()
| bool eve::scene::Scene::setNodeRotation | ( | const std::string & | id, |
| float | yaw, | ||
| float | pitch, | ||
| float | roll | ||
| ) |
Sets the local rotation (yaw/pitch/roll in degrees) of a node.
在文件 SceneNodes.cpp 第 37 行定义.
引用了 h, n , 以及 eve::scene::SceneNode::yaw.
◆ setNodeScale()
| bool eve::scene::Scene::setNodeScale | ( | const std::string & | id, |
| float | sx, | ||
| float | sy, | ||
| float | sz | ||
| ) |
Sets the local scale of a node.
在文件 SceneNodes.cpp 第 49 行定义.
引用了 h, n , 以及 eve::scene::SceneNode::sx.
◆ setNodeVisible()
| bool eve::scene::Scene::setNodeVisible | ( | const std::string & | id, |
| bool | visible | ||
| ) |
◆ syncSpatialIndexAt()
| bool eve::scene::Scene::syncSpatialIndexAt | ( | const std::string & | hostName, |
| spatial::Octree * | ot | ||
| ) | const |
Insert every bounded node's world AABB into an octree (id = arena index).
在文件 SceneNodes.cpp 第 484 行定义.
引用了 h, eve::spatial::Octree::insert(), n, resolveHost(), w , 以及 eve::scene::worldBoundsOf().
◆ unlinkNode()
| bool eve::scene::Scene::unlinkNode | ( | const std::string & | nodeId | ) |
Removes every link on a node in the current host.
在文件 SceneNodes.cpp 第 79 行定义.
引用了 currentHostName() , 以及 unlinkNodeAt().
◆ unlinkNodeAt()
| bool eve::scene::Scene::unlinkNodeAt | ( | const std::string & | hostName, |
| const std::string & | nodeId | ||
| ) |
Remove every link on the node.
在文件 SceneNodes.cpp 第 141 行定义.
引用了 h , 以及 resolveHost().
被这些函数引用 unlinkNode().
◆ unlinkNodeKindAt()
| bool eve::scene::Scene::unlinkNodeKindAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| const std::string & | kind | ||
| ) |
Remove links of one kind ("renderable2d"|"renderable3d"|"physics2d"|...).
在文件 SceneNodes.cpp 第 146 行定义.
引用了 h, kind, removed, resolveHost() , 以及 eve::scene::TransformSystem::updateHost().
◆ unrootEntityAt()
| bool eve::scene::Scene::unrootEntityAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| int | index | ||
| ) |
◆ updateScripts()
| void eve::scene::Scene::updateScripts | ( | float | dt | ) |
updateTransformsAll() + call update(dt) on every rooted instance.
◆ updateTransforms()
| void eve::scene::Scene::updateTransforms | ( | ) |
◆ updateTransformsAll()
| void eve::scene::Scene::updateTransformsAll | ( | ) |
◆ walkBreadthFirstIds()
| std::vector< std::string > eve::scene::Scene::walkBreadthFirstIds | ( | ) |
在文件 SceneNodes.cpp 第 596 行定义.
引用了 h, n , 以及 eve::scene::SceneHost::walkBreadthFirst().
◆ walkDepthFirstIds()
| std::vector< std::string > eve::scene::Scene::walkDepthFirstIds | ( | ) |
DFS order of ids under root (same as collectIds). Kept for script naming clarity.
在文件 SceneNodes.cpp 第 594 行定义.
引用了 collectIds().
◆ worldToLocalAt()
| std::vector< float > eve::scene::Scene::worldToLocalAt | ( | const std::string & | hostName, |
| const std::string & | nodeId, | ||
| float | x, | ||
| float | y, | ||
| float | z | ||
| ) | const |
在文件 SceneNodes.cpp 第 235 行定义.
该类的文档由以下文件生成:
- src/modules/scene/Scene.h
- src/modules/graphics/ScenePicking.cpp
- src/modules/scene/Scene.cpp
- src/modules/scene/SceneNodes.cpp
Public 成员函数 继承自