本文整理汇总了C++中AudioListener::getCamera方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioListener::getCamera方法的具体用法?C++ AudioListener::getCamera怎么用?C++ AudioListener::getCamera使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioListener
的用法示例。
在下文中一共展示了AudioListener::getCamera方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setActiveCamera
void Scene::setActiveCamera(Camera* camera)
{
// Make sure we don't release the camera if the same camera is set twice.
if (_activeCamera != camera)
{
AudioListener* audioListener = AudioListener::getInstance();
if (_activeCamera)
{
// Unbind the active camera from the audio listener
if (audioListener && (audioListener->getCamera() == _activeCamera))
{
audioListener->setCamera(NULL);
}
SAFE_RELEASE(_activeCamera);
}
_activeCamera = camera;
if (_activeCamera)
{
_activeCamera->addRef();
if (audioListener && _bindAudioListenerToCamera)
{
audioListener->setCamera(_activeCamera);
}
}
}
}
示例2: removeAllNodes
Scene::~Scene()
{
// Unbind our active camera from the audio listener
if (_activeCamera)
{
AudioListener* audioListener = AudioListener::getInstance();
if (audioListener && (audioListener->getCamera() == _activeCamera))
{
audioListener->setCamera(NULL);
}
SAFE_RELEASE(_activeCamera);
}
// Remove all nodes from the scene
removeAllNodes();
}
示例3: removeAllNodes
Scene::~Scene()
{
// Unbind our active camera from the audio listener
if (_activeCamera)
{
AudioListener* audioListener = AudioListener::getInstance();
if (audioListener && (audioListener->getCamera() == _activeCamera))
{
audioListener->setCamera(NULL);
}
SAFE_RELEASE(_activeCamera);
}
// Remove all nodes from the scene
removeAllNodes();
// Remove the scene from global list
std::vector<Scene*>::iterator itr = std::find(__sceneList.begin(), __sceneList.end(), this);
if (itr != __sceneList.end())
__sceneList.erase(itr);
}