Exemple #1
0
Model::~Model()
{
	ReleaseTexture();
	ShutdownBuffers();
	ReleaseModel();

}
Exemple #2
0
void Model::Shutdown()
{
	ReleaseTexture();	
	ShutdownBuffers();
	ReleaseModel();
	return;
}
void StaticMeshComponent::Shutdown()
{
	ReleaseTexture();
	ShutdownBuffers();
	ReleaseModel();
	return;
}
Exemple #4
0
void ColorModel::Shutdown()
{
	ReleaseTextures();

	ReleaseModel();

	return;
}
void ModelClass::Shutdown()
{
    // Release the vertex and index buffers.
    ShutdownBuffers();

    // Release the model data.
    ReleaseModel();

    return;
}
Exemple #6
0
void ModelClass::Shutdown()
{
	//release the model texture
	ReleaseTextures();

	//release the vertex and index buffers
	ShutdownBuffers();

	//release model data
	ReleaseModel();
}
Exemple #7
0
void ModelHandle::Shutdown()
{
	// Release the model texture.
	ReleaseTexture();

	// Shutdown the vertex and index buffers.
	ShutdownBuffers();

	// Release the model data.
	ReleaseModel();

	return;
}
void BumpModelClass::Shutdown()
{
	// Release the model textures.
	ReleaseTextures();

	// Shutdown the vertex and index buffers.
	ShutdownBuffers();

	// Release the model data.
	ReleaseModel();

	return;
}
void Model::KillSafely()
{
	ReleaseTexture();

	ReleaseTexture();

	// Release vertex and index buffers.
	KillSafelyBuffers();

	// Release model data. new to 0.6
	ReleaseModel();
	return;
}
bool GoodsModelManager::OpenModel(const char *szModelFileName /*= "model"*/, bool IsFullPathName /*= false*/)
{
	ReleaseModel();//创建前先销毁
	ResetCamera();
	string strFullPathFileName;
	//是否是完整路径名称
	if(IsFullPathName == false) //不是
	{
		strFullPathFileName = m_PathName;
		strFullPathFileName += '\\';
		strFullPathFileName += szModelFileName;//strFullPathFileName = 路径+文件名
		SetOpenModelFileName(szModelFileName);
	}
	else // 是
	{
		strFullPathFileName = szModelFileName;//strFullPathFilename = 完整路径名称
		//拆分路径和文件名
		string strPathName = szModelFileName;
		string strFilename = szModelFileName;
		strFilename = strFilename.erase(0,strFilename.find("goods")+5);
		SetOpenModelFileName(strFilename.c_str());
		//strPathName = strPathName.erase(strPathName.find_last_of("/\\")+1);
		//SetPathName(strPathName.c_str());
	}
	// 判断输入的正确性
	if (string(strFullPathFileName).find("model") == string::npos)
	{
		MessageBox(NULL, "输入的路径下没有找到 model 文件\n请确认路径是否正确", "Error:", MB_OK);
		return false;
	}
	//创建要显示的模型
	m_DisplayModel = m_GameModelManager->CreateDisplayModel(strFullPathFileName,false);
	VERIFY(m_DisplayModel);
	if(m_DisplayModel==NULL)
		return false;
	m_DisplayModel->ShowAllGroup(false);
	m_DisplayModel->EnableParticleEmitter(TRUE);
	m_DisplayModel->EnableTrailEmitter(TRUE);

	//俩个函数组合使用,使模型大小单位化
	ResetScaleCumulate();
	ScaleCumulate(0.0f,0.0f,0.0f);

	m_cAnimInfo.GetActionInfo()->dwCurAction	= 0;
	m_cAnimInfo.GetActionInfo()->bInterpolation = FALSE;
	m_cAnimInfo.SetTextureProjectiveTime(timeGetTime());

	return true;
}
void GoodsModelManager::Destory()
{
	ReleaseModel();
	CGameModelManager::GetInstance()->Release();
	CGameModelManager::ReleaseInstance();
}
Exemple #12
0
	void ModelClass::Shutdown() {
		ShutdownBuffers();
		ReleaseModel();
		mTexture->Shutdown();
		delete mTexture;
	}
Exemple #13
0
// Cleanup and Shutdown //
void Model::Shutdown()
{	
	ReleaseModel();

	return;
}