本文整理汇总了C++中osg::PointLightRecPtr::getOn方法的典型用法代码示例。如果您正苦于以下问题:C++ PointLightRecPtr::getOn方法的具体用法?C++ PointLightRecPtr::getOn怎么用?C++ PointLightRecPtr::getOn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类osg::PointLightRecPtr
的用法示例。
在下文中一共展示了PointLightRecPtr::getOn方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: keyboard
// react to keys
void keyboard(unsigned char k, int x, int y)
{
switch(k)
{
case 27:
case 'q':
_scene = NULL;
_point1_core = NULL;
_point2_core = NULL;
_point3_core = NULL;
point1_beacon = NULL;
point2_beacon = NULL;
point3_beacon = NULL;
_mgr = NULL;
OSG::osgExit();
exit(1);
break;
case 'w':
OSG::SceneFileHandler::the()->write(_scene, "scene.osb.gz", true);
printf("wrote scene.osb.gz\n");
break;
case '1':
{
if(_point1_core->getOn() == false)
_point1_core->setOn(true);
else
_point1_core->setOn(false);
break;
}
case '2':
{
if(_point2_core->getOn() == false)
_point2_core->setOn(true);
else
_point2_core->setOn(false);
break;
}
case '3':
{
if(_point3_core->getOn() == false)
_point3_core->setOn(true);
else
_point3_core->setOn(false);
break;
}
}
glutPostRedisplay();
}
示例2: keyboard
// react to keys
void keyboard(unsigned char k, int x, int y)
{
switch(k)
{
case 27:
case 'q':
_scene = NULL;
_point1_core = NULL;
_point2_core = NULL;
_point3_core = NULL;
shl = NULL;
delete _mgr;
exit(1);
break;
case 'w':
OSG::SceneFileHandler::the()->write(_scene, "scene.osb.gz", true);
printf("wrote scene.osb.gz\n");
break;
case '1':
{
if(_point1_core->getOn() == false)
_point1_core->setOn(true);
else
_point1_core->setOn(false);
break;
}
case '2':
{
if(_point2_core->getOn() == false)
_point2_core->setOn(true);
else
_point2_core->setOn(false);
break;
}
case '3':
{
if(_point3_core->getOn() == false)
_point3_core->setOn(true);
else
_point3_core->setOn(false);
break;
}
case 'i':
shl->subUniformParameter("OSGLight0Active");
break;
case 'I':
shl->setUniformParameter("OSGLight0Active", 0);
break;
case 'o':
shl->subUniformParameter("OSGLight1Active");
break;
case 'O':
shl->setUniformParameter("OSGLight1Active", 0);
break;
case 'p':
shl->subUniformParameter("OSGLight2Active");
break;
case 'P':
shl->setUniformParameter("OSGLight2Active", 0);
break;
}
glutPostRedisplay();
}