Exemple #1
0
int runJobsBG(simpleCmd * cmd)
{
	if (cmd->argc == 2)
	{
		jid_t jid = atoi(cmd->argv[1]);
		if (jid > 0)
			makeBG(jid, 1);
	}

	return INTERNAL_COMMAND_SUCCESS;
}
ComparativeBarChart::ComparativeBarChart(float width, float height)
{
    _width = width;
    _height = height;

    _title = "Comparative Bar Chart";
    _axisLabel = "Value";

    _axisType = FPAT_LINEAR;

    _maxValue = FLT_MIN;
    _minValue = FLT_MAX;
    _paddedMaxValue = FLT_MIN;
    _paddedMinValue = FLT_MAX;

    _leftPaddingMult = 0.15;
    _rightPaddingMult = 0.05;
    _topPaddingMult = 0.1;
    _bottomPaddingMult = 0.2;
    _axisLabelMult = 0.33;

    _root = new osg::Group();
    _bgScaleMT = new osg::MatrixTransform();
    _bgGeode = new osg::Geode();
    _axisGeode = new osg::Geode();
    _dataGeode = new osg::Geode();
    _dataGeometry = new osg::Geometry();

    _root->addChild(_bgScaleMT);
    _bgScaleMT->addChild(_bgGeode);
    _root->addChild(_axisGeode);
    _root->addChild(_dataGeode);
    _dataGeode->addDrawable(_dataGeometry);

    _dataGeometry->setUseDisplayList(false);
    _dataGeometry->setUseVertexBufferObjects(true);

    osg::StateSet * stateset = _root->getOrCreateStateSet();
    stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF);

    makeBG();
    update();
}