本文整理汇总了C++中Ptr::AddSolidColorBox方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::AddSolidColorBox方法的具体用法?C++ Ptr::AddSolidColorBox怎么用?C++ Ptr::AddSolidColorBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ptr
的用法示例。
在下文中一共展示了Ptr::AddSolidColorBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PopulateScene
// Loads the scene data
void OculusWorldDemoApp::PopulateScene(const char *fileName)
{
XmlHandler xmlHandler;
if(!xmlHandler.ReadFile(fileName, pRender, &MainScene, &CollisionModels, &GroundCollisionModels))
{
Menu.SetPopupMessage("FILE LOAD FAILED");
Menu.SetPopupTimeout(10.0f, true);
}
MainScene.SetAmbient(Color4f(1.0f, 1.0f, 1.0f, 1.0f));
// Handy cube.
Ptr<Model> smallGreenCubeModel = *Model::CreateBox(Color(0, 255, 0, 255), Vector3f(0.0f, 0.0f, 0.0f), Vector3f(0.004f, 0.004f, 0.004f));
SmallGreenCube.World.Add(smallGreenCubeModel);
String mainFilePathNoExtension = MainFilePath;
mainFilePathNoExtension.StripExtension();
// 10x10x10 cubes.
Ptr<Fill> fillR = *CreateTextureFill(pRender, mainFilePathNoExtension + "_redCube.tga");
PopulateCubeFieldScene(&RedCubesScene, fillR.GetPtr(), 10, 10, 10, Vector3f(0.0f, 0.0f, 0.0f), 0.4f);
// 10x10x10 cubes.
Ptr<Fill> fillB = *CreateTextureFill(pRender, mainFilePathNoExtension + "_blueCube.tga");
PopulateCubeFieldScene(&BlueCubesScene, fillB.GetPtr(), 10, 10, 10, Vector3f(0.0f, 0.0f, 0.0f), 0.4f);
// Anna: OculusWorldDemo/Assets/Tuscany/Tuscany_OculusCube.tga file needs to be added
Ptr<Fill> imageFill = *CreateTextureFill(pRender, mainFilePathNoExtension + "_OculusCube.tga");
PopulateCubeFieldScene(&OculusCubesScene, imageFill.GetPtr(), 11, 4, 35, Vector3f(0.0f, 0.0f, -6.0f), 0.5f);
float r = 0.01f;
Ptr<Model> purpleCubesModel = *new Model(Prim_Triangles);
for (int i = 0; i < 10; i++)
for (int j = 0; j < 10; j++)
for (int k = 0; k < 10; k++)
purpleCubesModel->AddSolidColorBox(i*0.25f-1.25f-r,j*0.25f-1.25f-r,k*0.25f-1.25f-r,
i*0.25f-1.25f+r,j*0.25f-1.25f+r,k*0.25f-1.25f+r,0xFF9F009F);
}