Пример #1
0
CObjEntityModel::CObjEntityModel() : CObjectEntity()
{
	Fairy::System* pFairySystem = CEngineInterface::GetMe()->GetFairySystem();
	// 在Fairy中创建实体
	m_pFairyObj = pFairySystem->getObjectFactoryManager()->createInstance(Fairy::String("Model"));
	// 在ogre中创建渲染对象
	m_pFairyObj->createRenderInstance( pFairySystem );
	// 将this指针保留在FairyData中
	m_pFairyObj->setData((Fairy::ulong)this);	
	// 可被鼠标选中
	m_bRayQuery = TRUE;
}
Пример #2
0
CFairyObject::CFairyObject(LPCTSTR szType)
{
	Fairy::System* pFairySystem = CRenderSystem::GetMe()->GetFairySystem();
	//在Fairy中创建实体
	m_pFairyObj = pFairySystem->getObjectFactoryManager()->createInstance(Fairy::String(szType));
	//在ogre中创建渲染对象
	m_pFairyObj->createRenderInstance( pFairySystem );
	//将this指针保留在FairyData中
	m_pFairyObj->setData((Fairy::ulong)this);	

	m_bRayQuery = TRUE;

	m_pUnitSelect = NULL;
	m_pUnitSelectNode = NULL;
	m_pShadowBlob = NULL;
	m_pShadowBlobNode = NULL;

	m_bVisible = TRUE;
}