载入中...
搜索中...
未找到
eve::scene 命名空间参考

struct  AABB3f
 Axis-aligned box in world space. 更多...
 
struct  LinkOps
 
struct  NodeDesc
 Declarative scene-node description (build once / on dirty → flatten into SceneHost::Tree). Isomorphic to eve::ui::WidgetDesc. 更多...
 
class  Scene
 Declarative scene module (eve.Scene). 更多...
 
class  SceneComponent
 React-style scene component: implement build(), call setState / markDirty, then rebuild(). Mounts onto a named SceneHost via mountAs / attach. Isomorphic to eve::ui::Component. 更多...
 
class  SceneHost
 ECS mount point for one scene graph (full scene or nested subtree root). Isomorphic to eve::ui::UIHost. 更多...
 
struct  SceneLink
 
struct  SceneNode
 Retained scene node (arena). Conceptual GameObject; isomorphic to eve::ui::UINode. 更多...
 
class  SceneNodeRef
 Script handle to a scene node (hostName + nodeId). Deliberately holds strings rather than arena pointers, so it stays valid across rebuilds/reconcile. Node-level entity bindings are forwarded through the Scene module. 更多...
 
class  SceneObject
 Per-node ECS identity (created lazily when a node needs script bindings or engine components). A node's stable string id (hostName + nodeId) is mirrored here so ECS systems can address scene nodes and vice versa. 更多...
 
class  TransformSystem
 Propagates local TRS → world matrices for all SceneHost trees (or one host). Call after mount/reconcile or local transform edits. 更多...
 

类型定义

using GameObject = SceneNode
 Alias: GameObject is the conceptual name for a SceneNode in a host tree.
 

函数

void validateUniqueIds (const NodeDesc &root)
 
NodeDesc node (std::string id, std::vector< NodeDesc > children, std::string name)
 
NodeDesc group (std::vector< NodeDesc > children, std::string id)
 
NodeDesc when (bool cond, NodeDesc child)
 Conditional: include child only when cond is true (empty group otherwise).
 
NodeDesc whenElse (bool cond, NodeDesc ifTrue, NodeDesc ifFalse)
 
void applyTree (SceneHost *host, NodeDesc root)
 
bool applyTreeReconcile (SceneHost *host, NodeDesc root)
 Key-aware patch when structure matches; else full replace. Returns true if full rebuild.
 
 Module_IMPL (Scene, new Scene())
 
AABB3f worldBoundsOf (const SceneNode &n)
 World-space AABB of a node's local bounds (8 corners through world matrix).
 
bool rayAABB (const glm::vec3 &o, const glm::vec3 &d, const AABB3f &b, float &t0, float &t1)
 Slab ray-AABB intersection; fills entry/exit t (t0 <= t1).
 
bool cornerInsideClip (const glm::mat4 &m, const glm::vec3 &p)
 
bool aabbIntersectsFrustum (const glm::mat4 &clip, const glm::mat4 &invClip, const AABB3f &b)
 Conservative AABB ↔ frustum overlap (AABB corners + frustum corners).
 
void registerSceneCapabilities ()
 
int registerLinkKind (const LinkOps &ops)
 
int findLinkKind (const char *kind)
 
const LinkOpslinkOps (int kindId)
 
const char * linkKindName (int kindId)
 

类型定义说明

◆ GameObject

Alias: GameObject is the conceptual name for a SceneNode in a host tree.

在文件 SceneHost.h74 行定义.

函数说明

◆ aabbIntersectsFrustum()

bool eve::scene::aabbIntersectsFrustum ( const glm::mat4 &  clip,
const glm::mat4 &  invClip,
const AABB3f b 
)
inline

Conservative AABB ↔ frustum overlap (AABB corners + frustum corners).

在文件 SceneBounds.h75 行定义.

引用了 b, cornerInsideClip(), p , 以及 w.

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

◆ applyTree()

void eve::scene::applyTree ( SceneHost host,
NodeDesc  root 
)

◆ applyTreeReconcile()

bool eve::scene::applyTreeReconcile ( SceneHost host,
NodeDesc  root 
)

Key-aware patch when structure matches; else full replace. Returns true if full rebuild.

在文件 NodeDesc.cpp294 行定义.

引用了 applyTree().

被这些函数引用 eve::scene::SceneHost::setTreeReconcile().

◆ cornerInsideClip()

bool eve::scene::cornerInsideClip ( const glm::mat4 &  m,
const glm::vec3 &  p 
)
inline

在文件 SceneBounds.h68 行定义.

引用了 c, m , 以及 p.

被这些函数引用 aabbIntersectsFrustum().

◆ findLinkKind()

◆ group()

NodeDesc eve::scene::group ( std::vector< NodeDesc children,
std::string  id 
)

在文件 NodeDesc.cpp223 行定义.

引用了 children, d , 以及 eve::scene::NodeDesc::id.

◆ linkKindName()

const char * eve::scene::linkKindName ( int  kindId)

Name for an id, or "" when the id is unknown.

在文件 SceneLink.cpp53 行定义.

引用了 eve::scene::LinkOps::kind, linkOps() , 以及 ops.

◆ linkOps()

const LinkOps * eve::scene::linkOps ( int  kindId)

Operations for an id, or nullptr when the id is unknown.

在文件 SceneLink.cpp47 行定义.

被这些函数引用 eve::scene::SceneHost::link() , 以及 linkKindName().

◆ Module_IMPL()

eve::scene::Module_IMPL ( Scene  ,
new   Scene() 
)

◆ node()

◆ rayAABB()

bool eve::scene::rayAABB ( const glm::vec3 &  o,
const glm::vec3 &  d,
const AABB3f b,
float &  t0,
float &  t1 
)
inline

Slab ray-AABB intersection; fills entry/exit t (t0 <= t1).

在文件 SceneBounds.h44 行定义.

引用了 b , 以及 d.

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

◆ registerLinkKind()

int eve::scene::registerLinkKind ( const LinkOps ops)

Register a link kind and return its id. Registering the same name twice returns the first id and leaves the original operations in place, so a module reloaded as a plugin cannot silently swap them out.

在文件 SceneLink.cpp27 行定义.

引用了 findLinkKind(), eve::scene::LinkOps::kind, ops , 以及 eve::scene::LinkOps::pushWorld.

◆ registerSceneCapabilities()

void eve::scene::registerSceneCapabilities ( )

在文件 SceneCapabilities.cpp147 行定义.

引用了 impl , 以及 eve::cap::query().

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

◆ validateUniqueIds()

void eve::scene::validateUniqueIds ( const NodeDesc root)

在文件 NodeDesc.cpp203 行定义.

引用了 c , 以及 d.

被这些函数引用 applyTree().

◆ when()

NodeDesc eve::scene::when ( bool  cond,
NodeDesc  child 
)

Conditional: include child only when cond is true (empty group otherwise).

在文件 NodeDesc.cpp232 行定义.

引用了 group.

◆ whenElse()

NodeDesc eve::scene::whenElse ( bool  cond,
NodeDesc  ifTrue,
NodeDesc  ifFalse 
)

在文件 NodeDesc.cpp237 行定义.

◆ worldBoundsOf()

AABB3f eve::scene::worldBoundsOf ( const SceneNode n)
inline

World-space AABB of a node's local bounds (8 corners through world matrix).

在文件 SceneBounds.h26 行定义.

引用了 c, n, p , 以及 w.

被这些函数引用 eve::scene::Scene::collectFrustumIdsAt(), eve::scene::Scene::pickRayAt() , 以及 eve::scene::Scene::syncSpatialIndexAt().