//
// Formation& =(f)
// Last modified: 28Aug2006
//
// Copies the contents of the parameterized formation into this formation.
//
// Returns:     this formation
// Parameters:
//      f       in/out      the formation being copied
//
Formation& Formation::operator =(const Formation &f)
{
    setFunctions(f);
    setRadius(f.radius);
    setSeedGradient(f.seedGradient);
    setSeedID(f.seedID);
    setFormationID(f.formationID);
    setHeading(f.heading);
    return *this;
}   // =(const Formation &)
Example #2
0
void StyleContext::initFunctions(const Scene& _scene) {

    if (_scene.id == m_sceneId) {
        return;
    }
    m_sceneId = _scene.id;

    setFunctions(_scene.functions());
    setSceneGlobals(_scene.globals());
}
Example #3
0
D3DRendererImpl::D3DRendererImpl(IUnknown *w, const detail::RendererFunctions& fns)
  {
  setFunctions(fns);
  _featureLevel = D3D_FEATURE_LEVEL_9_1;

  xAssertIsAligned(&_clearColour);
  _clearColour = Colour::Zero();
  _window = w;
  _handle = 0;
  createResources();
  }
//
// Formation(f, r, sGrad, sID, fID, theta)
// Last modified: 28Aug2006
//
// Default constructor that initializes
// the formation to the parameterized values.
//
// Returns:     <none>
// Parameters:
//      f           in      the initial set of functions of the formation
//      r           in      the initial radius of the formation
//      sGrad       in      the initial seed gradient of the formation
//      sID         in      the initial seed ID of the formation
//      fID         in      the initial ID of the formation
//      theta       in      the initial heading of the formation
//
Formation::Formation(LinkedList<Function> f,
                     const GLfloat        r,
                     const Vector         sGrad,
                     const GLint          sID,
                     const GLint          fID,
                     const GLfloat        theta)
{
    setFunctions(f);
    setRadius(r);
    setSeedGradient(sGrad);
    setSeedID(sID);
    setFormationID(fID);
    setHeading(theta);
}   // Formation(const..{LL<Function>, GLfloat, Vector, GLint..<2>, GLfloat})
Example #5
0
// Default constructor that initializes
// the formation to the parameterized values.
Formation::Formation(vector<Function> f,
                     const float    r,
                     const Vector     sGrad,
                     const int      sID,
                     const int      fID,
                     const float    theta)
{
    setFunctions(f);
    setRadius(r);
    setSeedFrp(sGrad);
    setSeedID(sID);
    setFormationID(fID);
    setHeading(theta);


}
Example #6
0
void setFunctions_pc(){
    commonFunctions funcs;
    funcs.newModelParameters    = newModelParameters_pc;
    funcs.freeModelParameters   = freeModelParameters_pc;
    funcs.newModelStats         = newModelStats_pc;
    funcs.freeModelStats        = freeModelStats_pc;
    funcs.initializeVbHmm       = initializeVbHmm_pc;
    funcs.pTilde_z1             = pTilde_z1_pc;
    funcs.pTilde_zn_zn1         = pTilde_zn_zn1_pc;
    funcs.pTilde_xn_zn          = pTilde_xn_zn_pc;
    funcs.calcStatsVars         = calcStatsVars_pc;
    funcs.maximization          = maximization_pc;
    funcs.varLowerBound         = varLowerBound_pc;
    funcs.reorderParameters     = reorderParameters_pc;
    funcs.outputResults         = outputResults_pc;
    setFunctions( funcs );
}
setColValuesDialog::setColValuesDialog( ScriptingEnv *env, QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
  scriptEnv = env;
    if ( !name )
	setName( "setColValuesDialog" );
    setCaption( tr( "QtiPlot - Set column values" ) );
    setFocusPolicy( QDialog::StrongFocus );
	
	QHBox *hbox1=new QHBox (this, "hbox1"); 
	hbox1->setSpacing (5);
	
	QVBox *box1=new QVBox (hbox1, "box2"); 
	box1->setSpacing (5);

	explain = new QTextEdit(box1, "explain" );
	explain->setReadOnly (true);
	explain->setPaletteBackgroundColor(QColor(197, 197, 197));
	
	colNameLabel = new QLabel(box1, "colNameLabel" );

	QVBox *box2=new QVBox (hbox1, "box2"); 
	box2->setMargin(5);
	box2->setFrameStyle (QFrame::Box);

	QHBox *hbox2=new QHBox (box2, "hbox2"); 
	hbox2->setMargin(5);
	hbox2->setSpacing (5);
	
	QLabel *TextLabel1 = new QLabel(hbox2, "TextLabel1" );
    TextLabel1->setText( tr( "For row (i)" ) );
	
	start = new QSpinBox(hbox2, "start" );
   
    QLabel *TextLabel2 = new QLabel(hbox2, "TextLabel2" );
    TextLabel2->setText( tr( "to" ) );

    end = new QSpinBox(hbox2, "end" );

    start->setMinValue(1);
    end->setMinValue(1);
    if (sizeof(int)==2)
	 { // 16 bit signed integer
	 start->setMaxValue(0x7fff);
	 end->setMaxValue(0x7fff);
	 }
    else
	 { // 32 bit signed integer
	 start->setMaxValue(0x7fffffff);
	 end->setMaxValue(0x7fffffff);
	 }
  
	QButtonGroup *GroupBox0 = new QButtonGroup(2,QGroupBox::Horizontal,tr( "" ),box2, "GroupBox0" );
	GroupBox0->setLineWidth(0);
	GroupBox0->setFlat(true);

    functions = new QComboBox( FALSE, GroupBox0, "functions" );
	
	PushButton3 = new QPushButton(GroupBox0, "PushButton3" );
    PushButton3->setText( tr( "Add function" ) );
    
    boxColumn = new QComboBox( FALSE, GroupBox0, "boxColumn" );
   
    PushButton4 = new QPushButton(GroupBox0, "PushButton4" );
    PushButton4->setText( tr( "Add column" ) );

	QHBox *hbox6=new QHBox (GroupBox0, "hbox6"); 
	hbox6->setSpacing (5);

	buttonPrev = new QPushButton( hbox6, "buttonPrev" );
	buttonPrev->setText("&<<");

	buttonNext = new QPushButton( hbox6, "buttonNext" );
	buttonNext->setText("&>>");

	addCellButton = new QPushButton(GroupBox0, "addCellButton" );
    addCellButton->setText( tr( "Add cell" ) );

	QHBox *hbox3=new QHBox (this, "hbox3"); 
	hbox3->setSpacing (5);
	
	commandes = new ScriptEdit( env, hbox3, "commandes" );
    commandes->setGeometry( QRect(10, 100, 260, 70) );
	commandes->setFocus();
	
	QVBox *box3=new QVBox (hbox3,"box3"); 
	box3->setSpacing (5);
	
    btnOk = new QPushButton(box3, "btnOk" );
    btnOk->setText( tr( "OK" ) );

	btnApply = new QPushButton(box3, "btnApply" );
    btnApply->setText( tr( "Apply" ) );

    btnCancel = new QPushButton( box3, "btnCancel" );
    btnCancel->setText( tr( "Cancel" ) );
	
	QVBoxLayout* layout = new QVBoxLayout(this,5,5, "hlayout3");
    layout->addWidget(hbox1);
	layout->addWidget(hbox3);

setFunctions();
insertExplain(0);

connect(PushButton3, SIGNAL(clicked()),this, SLOT(insertFunction()));
connect(PushButton4, SIGNAL(clicked()),this, SLOT(insertCol()));
connect(addCellButton, SIGNAL(clicked()),this, SLOT(insertCell()));
connect(btnOk, SIGNAL(clicked()),this, SLOT(accept()));
connect(btnApply, SIGNAL(clicked()),this, SLOT(apply()));
connect(btnCancel, SIGNAL(clicked()),this, SLOT(close()));
connect(functions, SIGNAL(activated(int)),this, SLOT(insertExplain(int)));
connect(buttonPrev, SIGNAL(clicked()), this, SLOT(prevColumn()));
connect(buttonNext, SIGNAL(clicked()), this, SLOT(nextColumn()));
}