本文整理汇总了C++中SkyBox::scale方法的典型用法代码示例。如果您正苦于以下问题:C++ SkyBox::scale方法的具体用法?C++ SkyBox::scale怎么用?C++ SkyBox::scale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkyBox
的用法示例。
在下文中一共展示了SkyBox::scale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init_graphics
void myApp::init_graphics() {
m_d3ddev = m_pD3D->getDevice();
m_d3ddev->SetRenderState(D3DRS_LIGHTING, false);
m_d3ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
// creating cameras
isWASDCameraActive = true;
wasdCamera = new WASDCamera();
camera = new Camera();
float initPos = 500.0f;
wasdCamera->setPosition({ initPos, -initPos, initPos });
wasdCamera->setUpDirection({ 0.0f, 1.0f, 0.0f });
wasdCamera->setLookAt(worldCenter);
m_d3ddev->SetTransform(D3DTS_VIEW, wasdCamera->getViewMatrix()); // set the view transform to matView
D3DXMatrixPerspectiveFovLH(&m_matProj,
D3DXToRadian(45), // the horizontal field of view
(FLOAT)SCREEN_WIDTH / (FLOAT)SCREEN_HEIGHT, // aspect ratio
1.0f, // the near view-plane
20000.0f); // the far view-plane
m_d3ddev->SetTransform(D3DTS_PROJECTION, &m_matProj); // set the projection
ZeroMemory(&globalMaterial, sizeof(D3DMATERIAL9)); // clear out the struct for use
globalMaterial.Diffuse = hexToColor(0xffffff);
globalMaterial.Ambient = hexToColor(0xffffff);
globalMaterial.Emissive = hexToColor(0x000010);
globalMaterial.Specular = hexToColor(0);
m_nClearColor = 0xFF111111;
SkyBox *box = new SkyBox(m_d3ddev);
box->scale(10000.0f, 10000.0f, 10000.0f);
objects.push_back(box);
aroundCubeObjects.push_back(box);
reflectingCube = new ReflectingCube(m_d3ddev);
objects.push_back(reflectingCube);
reflectingCube->scale(200.0f, 200.0f, 200.0f);
}