这篇教程C++ GetCamera函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetCamera函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCamera函数的具体用法?C++ GetCamera怎么用?C++ GetCamera使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetCamera函数的23个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetCamera bool BaseGame::IsInFrontOfCamera(const Vector3 &point) const { // Not work, why? //const Matrix4 viewProjMatrix = GetCamera().getViewMatrix() * GetCamera().getProjectionMatrix(); //Vector4 result = Vector4(point.x, point.y, point.z, 1) * viewProjMatrix; // //// Is result in front? //return result.z > result.w - GetCamera().getNearClipDistance(); const Vector3 eyeSpacePos = GetCamera().getViewMatrix() * point; if (eyeSpacePos.z >= 0) return false; const Vector3 hcsPos = GetCamera().getProjectionMatrix() * eyeSpacePos; if ((hcsPos.x < -1.0f) || (hcsPos.x > 1.0f) || (hcsPos.y < -1.0f) || (hcsPos.y > 1.0f)) return false; return true; }
开发者ID:likeleon,项目名称:RocketCommanderOgre,代码行数:19,
示例2: GetCameravoid Scene::UpdateScene(float dt){ MyD3D10Code::Direct3D10Class::UpdateScene(dt); // Update the camera GetCamera().Update(dt); // Update the box m_Box.Update(dt);}
开发者ID:JonathanSimonJones,项目名称:Year3Sem2,代码行数:10,
示例3: GetCameravoid AtlasViewActor::Render(){ SViewPort vp = { 0, 0, g_xres, g_yres }; CCamera& camera = GetCamera(); camera.SetViewPort(vp); camera.SetProjection(2.f, 512.f, DEGTORAD(20.f)); camera.UpdateFrustum(); m_ActorViewer->Render(); Atlas_GLSwapBuffers((void*)g_AtlasGameLoop->glCanvas);}
开发者ID:Moralitycore,项目名称:0ad,代码行数:11,
示例4: GetCameravoid Sky::draw(){ D3DXVECTOR3 eyePos = GetCamera().position(); // center Sky about eye in world space Translate(eyePos.x, eyePos.y, eyePos.z); HR(mfxCubeMapVar->SetResource(mCubeMap)); md3dDevice->IASetInputLayout(InputLayout::Pos); md3dDevice->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST); GfxObj::draw();}
开发者ID:jcrm,项目名称:DX,代码行数:11,
|