本文整理汇总了C++中CameraPtr::SetEnalbeInput方法的典型用法代码示例。如果您正苦于以下问题:C++ CameraPtr::SetEnalbeInput方法的具体用法?C++ CameraPtr::SetEnalbeInput怎么用?C++ CameraPtr::SetEnalbeInput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CameraPtr
的用法示例。
在下文中一共展示了CameraPtr::SetEnalbeInput方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetEnalbeInput
void SetEnalbeInput(bool enable)
{
if (mOverridingCamera){
mOverridingCamera->SetEnalbeInput(enable);
return;
}
mProcessInput = enable;
}
示例2: EditThisParticle
void EditThisParticle(const char* file){
if (mEditingParticle)
mEditingParticle->StopImmediate();
bool numeric = IsNumeric(file);
std::string fullpath;
if (numeric)
{
fullpath = FindParticleNameWithID("data/particles", StringConverter::ParseInt(file));
}
else
{
fullpath = file;
fullpath += ".particle";
}
ParticleEmitterPtr pnew = 0;
if (strcmp(file, "0"))
pnew = GetParticleEmitter(fullpath.c_str());
auto& renderer = Renderer::GetInstance();
if (pnew)
{
mEditingParticle = pnew;
Logger::Log(FB_DEFAULT_LOG_ARG, FormatString("Editing : %s", fullpath.c_str()).c_str());
auto rt = renderer.GetMainRenderTarget();
assert(rt);
if (!mOriginalCamera){
mOriginalCamera = rt->ReplaceCamera(mOverridingCamera);
*mOverridingCamera = *mOriginalCamera;
}
mEditingParticle->SetPosition(mOverridingCamera->GetPosition() + mOverridingCamera->GetDirection() * 4.f);
mEditingParticle->Active(true);
mOverridingCamera->SetTarget(mEditingParticle);
mOverridingCamera->SetEnalbeInput(true);
}
else if (strcmp(file, "0") == 0)
{
mEditingParticle->StopImmediate();
mEditingParticle = 0;
auto rt = renderer.GetMainRenderTarget();
assert(rt);
if (mOriginalCamera){
rt->ReplaceCamera(mOriginalCamera);
mOriginalCamera = 0;
}
Logger::Log(FB_ERROR_LOG_ARG, "Exit particle editor");
}
else
{
Logger::Log(FB_ERROR_LOG_ARG, FormatString("Cannot find the particle %s", fullpath.c_str()).c_str());
}
}