Beispiel #1
0
RootNode::RootNode() : SceneNode( INVALID_ACTOR_ID, NULL, RenderPass_0 )
   {
	m_Children.reserve(RenderPass_Last);

   shared_ptr<SceneNode> staticGroup( ENG_NEW SceneNode( INVALID_ACTOR_ID, NULL, RenderPass_Static ) );
	m_Children.push_back(staticGroup);	// RenderPass_Static = 0

   shared_ptr<SceneNode> actorGroup( ENG_NEW SceneNode( INVALID_ACTOR_ID, NULL, RenderPass_Actor ) );
	m_Children.push_back(actorGroup);	// RenderPass_Actor = 1

   shared_ptr<SceneNode> skyGroup( ENG_NEW SceneNode( INVALID_ACTOR_ID, NULL, RenderPass_Sky ) );
	m_Children.push_back(skyGroup);	// RenderPass_Sky = 2

   shared_ptr<SceneNode> invisibleGroup( ENG_NEW SceneNode( INVALID_ACTOR_ID, NULL, RenderPass_NotRendered ) );
	m_Children.push_back(invisibleGroup);	// RenderPass_NotRendered = 3
   }
RootNode::RootNode() :
SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), RenderPass::RenderPass_0, &Mat4x4::Identity)
{
	m_Children.reserve(RenderPass::RenderPass_Last);

	// split children into different groups

	shared_ptr<SceneNode> staticGroup(CB_NEW SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), RenderPass::RenderPass_Static, &Mat4x4::Identity));
	m_Children.push_back(staticGroup);

	shared_ptr<SceneNode> objectGroup(CB_NEW SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), RenderPass::RenderPass_Object, &Mat4x4::Identity));
	m_Children.push_back(objectGroup);

	shared_ptr<SceneNode> skyGroup(CB_NEW SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), RenderPass::RenderPass_Sky, &Mat4x4::Identity));
	m_Children.push_back(skyGroup);

	shared_ptr<SceneNode> invisibleGroup(CB_NEW SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), RenderPass::RenderPass_NotRendered, &Mat4x4::Identity));
	m_Children.push_back(staticGroup);

}