本文整理汇总了C++中Cube::SetPos方法的典型用法代码示例。如果您正苦于以下问题:C++ Cube::SetPos方法的具体用法?C++ Cube::SetPos怎么用?C++ Cube::SetPos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cube
的用法示例。
在下文中一共展示了Cube::SetPos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void init()
{
glShadeModel(GL_SMOOTH);
glEnable(GL_LINE_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
glClearColor(0.0, 0.0, 0.0, 0.5);
glClearDepth(1.0);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glEnable(GL_COLOR_MATERIAL);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHT1);
w.cam->SetPosition(0.0, 0, -70, 0, 0, 0, 0, 1, 0);
buildLists();
buildBeams();
buildFog();
Cube jackpot;
jackpot.SetBuffers(1, 1, 1);
jackpot.SetPos(0, -1, 80);
jackpots.push_back(jackpot);
}
示例2: buildBeams
void buildBeams()
{
//5 right, offset by 10
for (int i = 0; i <= 1; i++)
{
Cube beam;
beam.SetPos(-14, -1.0, -60 + (i * 25));
beamsRight.push_back(beam);
}
Cube beam;
beam.SetPos(-14, -1.0, 0.0);
beamsRight.push_back(beam);
for (int i = 3; i <= 4; i++)
{
Cube beam;
beam.SetPos(-14, -1.0, -40 + (i * 25));
beamsRight.push_back(beam);
}
//4 left
for (int i = 0; i <= 1; i++)
{
Cube beam;
beam.SetPos(14, -1.0, -50 + (i * 25));
beamsLeft.push_back(beam);
}
for (int i = 3; i <= 4; i++)
{
Cube beam;
beam.SetPos(14, -1.0, -50 + (i * 25));
beamsLeft.push_back(beam);
}
}