本文整理汇总了C++中Object3D::SetRotation方法的典型用法代码示例。如果您正苦于以下问题:C++ Object3D::SetRotation方法的具体用法?C++ Object3D::SetRotation怎么用?C++ Object3D::SetRotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Object3D
的用法示例。
在下文中一共展示了Object3D::SetRotation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
//.........这里部分代码省略.........
lightPole->setLightDirection(Vector3D(0.5,-1.3,0.3));
lightPole->SetPosition(new Vector3D(16,0,16));
lightPole->setBoundingBoxMargin(0.01,6,0.01,-0.01,-6,-0.01);
lightPole->CollisionEnabled=false;
objects[objectCount++]=lightPole;
lights[lightCount++]=lightPole->getLight();
/*************OBSTACOLE*************/
Object3D *obstacol;
//Obstacol 1 - Sfera portocalie - sus
obstacol=new Object3D(Sphere);
obstacol->setDiffuseColor(Vector4D(0.5,0.2,0,1));
obstacol->SetColor(new Vector3D(0.5,0.2,0));
obstacol->SetScale(new Vector3D(0.5,0.5,0.5));
obstacol->SetPosition(new Vector3D(-4,1,-19));
obstacol->setBoundingBoxMargin(0.5,0.5,0.5,-0.5,-0.5,-0.5);
objects[objectCount++]=obstacol;
//Obstacol 2 - Paralelipiped mov - dreapta
obstacol=new Object3D(Cube);
obstacol->setDiffuseColor(Vector4D(0.4,0.1,0.4,1));
obstacol->SetColor(new Vector3D(0.4,0.1,0.4));
obstacol->SetScale(new Vector3D(1,1.6,1));
obstacol->SetPosition(new Vector3D(16.65,0.5,2));
obstacol->setBoundingBoxMargin(0.5,0.8,0.5,-0.5,-0.8,-0.5);
objects[objectCount++]=obstacol;
//Obstacol 3 - Romb Turcuaz - jos
obstacol=new Object3D(Cube);
obstacol->setDiffuseColor(Vector4D(0,0.6,0.4,1));
obstacol->SetColor(new Vector3D(0,0.5,0.4));
obstacol->SetScale(new Vector3D(1,1,1));
obstacol->SetRotation(new Vector3D(45,45,0));
obstacol->SetPosition(new Vector3D(12,1,17));
obstacol->setBoundingBoxMargin(0.7,0.7,0.7,-0.7,-0.7,-0.7);
rotatingObject=objectCount;
objects[objectCount++]=obstacol;
//Obstacol 4 - Cub galben - jos
obstacol=new Object3D(Cube);
obstacol->setDiffuseColor(Vector4D(0.5,0.5,0,0.8));
obstacol->SetColor(new Vector3D(0.5,0.5,0));
obstacol->SetScale(new Vector3D(1,1.6,1));
obstacol->SetPosition(new Vector3D(6,0.5,19));
obstacol->setBoundingBoxMargin(0.5,0.5,0.5,-0.5,-0.5,-0.5);
objects[objectCount++]=obstacol;
//Obstacol 5 - Torus Verde - jos
obstacol=new Object3D(Torus);
obstacol->setDiffuseColor(Vector4D(0,0.5,0,1));
obstacol->SetColor(new Vector3D(0,0.5,0));
obstacol->SetScale(new Vector3D(0.4,0.4,0.4));
obstacol->SetPosition(new Vector3D(-10,0,19.5));
obstacol->setBoundingBoxMargin(0.5,0.5,0.4,-0.5,-0.4,-0.5);
objects[objectCount++]=obstacol;
//Obstacol 6 - Sfera portocalie - jos
obstacol=new Object3D(Sphere);
obstacol->setDiffuseColor(Vector4D(0.8,0.2,0,0.6));
obstacol->SetColor(new Vector3D(0.5,0.2,0));
obstacol->SetScale(new Vector3D(0.5,0.5,0.5));
obstacol->SetPosition(new Vector3D(-5,1,16.8));
obstacol->setBoundingBoxMargin(0.5,0.5,0.5,-0.5,-0.5,-0.5);
translatingObject=objectCount;
objects[objectCount++]=obstacol;