Esempio n. 1
0
SkyNode::SkyNode(const char* textureFile) :
	SceneNode(INVALID_GAMEOBJECT_ID, WeakBaseRenderComponentPtr(), 
	RenderPass::RenderPass_Sky, &Mat4x4::Identity)
{
	m_Active = true;
	m_TextureBaseName = textureFile;
}
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);

}
Esempio n. 3
0
RootNode::RootNode() : SceneNode(INVALID_ACTOR_ID, "Root", WeakBaseRenderComponentPtr(), RenderPass_0, &mat4x4())
{
	m_Children.reserve(RenderPass_Last);

	// Static Render Pass Group
	shared_ptr<SceneNode> StaticGroup(new SceneNode(INVALID_ACTOR_ID, "StaticGroup", WeakBaseRenderComponentPtr(), RenderPass_Static, &mat4x4()));
	m_Children.push_back(StaticGroup);

	// Actor Pass Group
	shared_ptr<SceneNode> ActorGroup(new SceneNode(INVALID_ACTOR_ID, "ActorGroup", WeakBaseRenderComponentPtr(), RenderPass_Actor, &mat4x4()));
	m_Children.push_back(ActorGroup);

	// Background Objects Render Pass Group
	shared_ptr<SceneNode> BackgroundGroup(new SceneNode(INVALID_ACTOR_ID, "BackgroundGroup", WeakBaseRenderComponentPtr(), RenderPass_Sky, &mat4x4()));
	m_Children.push_back(BackgroundGroup);

	// Hidden Objects Render Pass Group
	shared_ptr<SceneNode> HiddenGroup(new SceneNode(INVALID_ACTOR_ID, "HiddenGroup", WeakBaseRenderComponentPtr(), RenderPass_NotRendered, &mat4x4()));
	m_Children.push_back(HiddenGroup);

}
Esempio n. 4
0
//---------------------------------------------------------------------------------------------------------------------
// MeshRenderComponent
//---------------------------------------------------------------------------------------------------------------------
shared_ptr<SceneNode> MeshRenderComponent::VCreateSceneNode(void)
{
	m_pSceneNode = shared_ptr<SceneNode>(WE_NEW OpenGLSceneNode(m_pOwner->GetId(), "RenderComponentNode?", WeakBaseRenderComponentPtr(this), RenderPass_Actor, &glm::mat4x4()));
	return m_pSceneNode;
}
Esempio n. 5
0
//
// SkyNode::SkyNode						- Chapter 16, page 554
//
SkyNode::SkyNode(const char *pTextureBaseName)
: SceneNode(INVALID_ACTOR_ID, WeakBaseRenderComponentPtr(), RenderPass_Sky, &Mat4x4::g_Identity)
, m_bActive(true)
{
	m_textureBaseName = pTextureBaseName;
}
Esempio n. 6
0
//
// SkyNode::SkyNode						- Chapter 16, page 554
//
SkyNode::SkyNode(shared_ptr<ResHandle> cubemap)
	: SceneNode(INVALID_ACTOR_ID, WeakBaseRenderComponentPtr(), RenderPass_Sky, &glm::mat4())
	, m_bActive(true), m_Cubemap(cubemap)
{
}