本文整理汇总了C++中SkyBox::setTextureFiles方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::setTextureFiles方法的具体用法?C++ SkyBox::setTextureFiles怎么用?C++ SkyBox::setTextureFiles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::setTextureFiles方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void SSAODemo::init()
{
scene = engine->createScene();
FixedArray<std::string, 6> skyBoxTextureFileNames = { Engine::getAssetPath() + "Textures/Skybox/miramar_ft.tga", Engine::getAssetPath() + "Textures/Skybox/miramar_bk.tga",
Engine::getAssetPath() + "Textures/Skybox/miramar_up.tga", Engine::getAssetPath() + "Textures/Skybox/miramar_dn.tga",
Engine::getAssetPath() + "Textures/Skybox/miramar_rt.tga", Engine::getAssetPath() + "Textures/Skybox/miramar_lf.tga" };
scene->setGlobalAmbientLight(Vector3(1.0f, 1.0f, 1.0f));
SkyBox* skyBox = (SkyBox*)scene->createSceneItem("SkyBox");
skyBox->setTextureFiles(skyBoxTextureFileNames);
Mesh* sponza = scene->createSceneItem<Mesh>();
engine->getSceneImporter().importMesh(Engine::getAssetPath() + "Models/Sponza/sponza.obj", sponza);
sponza->scale(0.05f);
float width = static_cast<float>(engine->getRenderer().getScreenViewPort().width);
float height = static_cast<float>(engine->getRenderer().getScreenViewPort().height);
scene->getMainCamera()->setAspectRatio((float)width / (float)height);
camera = scene->getMainCamera();
camera->translate(Vector3(20.0f, 5.0f, 0.0f), FrameOfReference::World);
camera->setRotation(Quaternion(-90.0f, Vector3::UNIT_Y));
}