renamed to ChildNode instead of SubNode
This commit is contained in:
parent
b9fbab56f1
commit
2f34d556e4
2
CMCore
2
CMCore
@ -1 +1 @@
|
||||
Subproject commit 2ebd4b4ac93ad89cb5f74af0b01d06d30752b1aa
|
||||
Subproject commit 14ae93e9096b37dd832cee1903f9ae546b033b59
|
@ -1 +1 @@
|
||||
Subproject commit f9e2389303d54229946e88cd514d1c38b07bb28b
|
||||
Subproject commit 9ff596c42437ada641f62b4d0d2bfae535638666
|
@ -61,6 +61,8 @@ bool InitGizmoRotateStaticMesh()
|
||||
|
||||
TransformFaceToCamera *rotate_white_torus_tfc=new TransformFaceToCamera();
|
||||
|
||||
//暂时因为无法传入Camera所以无法正确计算朝向,正在设计Actor/World结构
|
||||
|
||||
white_torus->GetTransform().AddTransform(rotate_white_torus_tfc);
|
||||
|
||||
root_node->Add(white_torus);
|
||||
|
@ -5,21 +5,6 @@ namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
{
|
||||
template<typename T> class ObjectAllocator
|
||||
{
|
||||
|
||||
template<typename OBJECT,typename ID,typename NAME> class IDNameObjectMap
|
||||
{
|
||||
ObjectList<OBJECT> obj_list;
|
||||
|
||||
Map<ID,OBJECT *> obj_map_by_id;
|
||||
Map<NAME,OBJECT *> obj_map_by_name;
|
||||
|
||||
public:
|
||||
|
||||
virtual ~IDNameObjectMap()=default;
|
||||
};//class NodeManager;
|
||||
|
||||
/**
|
||||
* 场景管理器<Br>
|
||||
* 管理一个场景中的所有资源与场景节点
|
||||
|
@ -32,14 +32,14 @@ namespace hgl
|
||||
|
||||
protected:
|
||||
|
||||
ObjectList<SceneNode> SubNode; ///<子节点
|
||||
ObjectList<SceneNode> ChildNode; ///<子节点
|
||||
|
||||
public:
|
||||
|
||||
const SceneNodeID & GetNodeID ()const { return NodeID; } ///<取得节点ID
|
||||
const SceneNodeName & GetNodeName ()const { return NodeName; } ///<取得节点名称
|
||||
|
||||
const ObjectList<SceneNode> &GetSubNode()const { return SubNode; } ///<取得子节点列表
|
||||
const ObjectList<SceneNode> &GetChildNode()const { return ChildNode; } ///<取得子节点列表
|
||||
|
||||
public:
|
||||
|
||||
@ -62,14 +62,14 @@ namespace hgl
|
||||
BoundingBox.SetZero();
|
||||
LocalBoundingBox.SetZero();
|
||||
|
||||
SubNode.Clear();
|
||||
ChildNode.Clear();
|
||||
render_obj=nullptr;
|
||||
}
|
||||
|
||||
const bool IsEmpty()const
|
||||
{
|
||||
if(render_obj)return(false);
|
||||
if(SubNode.GetCount())return(false);
|
||||
if(ChildNode.GetCount())return(false);
|
||||
|
||||
return(true);
|
||||
}
|
||||
@ -82,7 +82,7 @@ namespace hgl
|
||||
if(!sn)
|
||||
return(nullptr);
|
||||
|
||||
SubNode.Add(sn);
|
||||
ChildNode.Add(sn);
|
||||
return sn;
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ namespace hgl
|
||||
++renderable_count;
|
||||
}
|
||||
|
||||
for(SceneNode *sub:sn->GetSubNode())
|
||||
for(SceneNode *sub:sn->GetChildNode())
|
||||
ExpendNode(sub);
|
||||
|
||||
return(true);
|
||||
|
@ -13,7 +13,7 @@ namespace hgl
|
||||
|
||||
node->SetRenderable(src_node->GetRenderable());
|
||||
|
||||
for(SceneNode *sn:src_node->GetSubNode())
|
||||
for(SceneNode *sn:src_node->GetChildNode())
|
||||
{
|
||||
node->Add(Duplication(sn));
|
||||
}
|
||||
@ -50,9 +50,9 @@ namespace hgl
|
||||
|
||||
const Matrix4f &l2w=scene_matrix.GetLocalToWorldMatrix();
|
||||
|
||||
const int count=SubNode.GetCount();
|
||||
const int count=ChildNode.GetCount();
|
||||
|
||||
SceneNode **sub=SubNode.GetData();
|
||||
SceneNode **sub=ChildNode.GetData();
|
||||
|
||||
for(int i=0;i<count;i++)
|
||||
{
|
||||
@ -68,8 +68,8 @@ namespace hgl
|
||||
*/
|
||||
void SceneNode::RefreshBoundingBox()
|
||||
{
|
||||
int count=SubNode.GetCount();
|
||||
SceneNode **sub=SubNode.GetData();
|
||||
int count=ChildNode.GetCount();
|
||||
SceneNode **sub=ChildNode.GetData();
|
||||
|
||||
AABB local,world;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user