本文整理汇总了C++中CScene::GetInitCameraPos方法的典型用法代码示例。如果您正苦于以下问题:C++ CScene::GetInitCameraPos方法的具体用法?C++ CScene::GetInitCameraPos怎么用?C++ CScene::GetInitCameraPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CScene
的用法示例。
在下文中一共展示了CScene::GetInitCameraPos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSaveAsSceneInitClicked
void CEditCameraWnd::OnSaveAsSceneInitClicked(wxCommandEvent& /*event*/)
{
CScene* pCurScene = CSceneManager::GetInstance()->GetCurrentScene();
if (pCurScene != NULL)
{
pCurScene->SetInitCameraPos(CVec3((float)m_pPosX->GetValue().GetDouble(),
(float)m_pPosY->GetValue().GetDouble(),
(float)m_pPosZ->GetValue().GetDouble()));
UPDATE_PROXY_PROPERTY_BY_NAME(pCurScene, pCurScene->GetInitCameraPos(), "m_cameraInitPos");
pCurScene->SetInitCameraRotation(CVec3((float)m_pRotationX->GetValue().GetDouble(),
(float)m_pRotationY->GetValue().GetDouble(),
(float)m_pRotationZ->GetValue().GetDouble()));
UPDATE_PROXY_PROPERTY_BY_NAME(pCurScene, pCurScene->GetInitCameraRotation(), "m_cameraInitRotation");
pCurScene->SetInitCameraNear((float)m_pClipNear->GetValue().GetDouble());
UPDATE_PROXY_PROPERTY_BY_NAME(pCurScene, pCurScene->GetInitCameraNear(), "m_fCameraInitNear");
pCurScene->SetInitCameraFar((float)m_pClipFar->GetValue().GetDouble());
UPDATE_PROXY_PROPERTY_BY_NAME(pCurScene, pCurScene->GetInitCameraFar(), "m_fCameraInitFar");
pCurScene->SetInitCameraFov((float)m_pFov->GetValue().GetDouble());
UPDATE_PROXY_PROPERTY_BY_NAME(pCurScene, pCurScene->GetInitCameraFov(), "m_fCameraInitFov");
CEditorMainFrame* pMainFrame = static_cast<CEngineEditor*>(wxApp::GetInstance())->GetMainFrame();
CComponentProxy* pProxy = pCurScene->GetProxyComponent();
BEATS_ASSERT(pProxy != NULL, _T("Can't find the proxy of Scene!"));
if (pMainFrame->GetSelectedComponent() == pProxy)
{
//Refresh the current showing property grid.
pMainFrame->SelectComponent(pProxy);
}
}
}
示例2: OnLoadSceneInitClicked
void CEditCameraWnd::OnLoadSceneInitClicked(wxCommandEvent& /*event*/)
{
CScene* pCurScene = CSceneManager::GetInstance()->GetCurrentScene();
if (pCurScene != NULL)
{
CEditorMainFrame* pMainFrame = static_cast<CEngineEditor*>(wxApp::GetInstance())->GetMainFrame();
CBeyondEngineEditorGLWindow* pSceneWnd = pMainFrame->GetSceneWindow();
CCamera* pCurCamera = pSceneWnd->GetCamera();
if (pCurCamera != NULL)
{
const CVec3& rotation = pCurScene->GetInitCameraRotation();
pCurCamera->SetRotation(rotation);
const CVec3& viewPos = pCurScene->GetInitCameraPos();
pCurCamera->SetViewPos(viewPos);
float fNear = pCurScene->GetInitCameraNear();
pCurCamera->SetNear(fNear);
float fFar = pCurScene->GetInitCameraFar();
pCurCamera->SetFar(fFar);
float fFov = pCurScene->GetInitCameraFov();
pCurCamera->SetFOV(fFov);
}
}
}