Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

ofParameter issue

$
0
0

@ricardomatias wrote:

I’m quite new to C++, so the following is probably a result of that. I’m getting the following error:

of_v0.10.1_osx_release/libs/glm/include/glm/gtc/random.inl:262:4: Attempt to use a deleted function random.ini

Related to the “mean” parameter, I tried adding a listener but that also didn’t work. Any ideas?
Thanks in advance.


void ofApp::createCircles() {
    for (int i = 0; i < N; i++) {
        float rand = ofRandomf() * M_TWO_PI;
        
        float r = glm::gaussRand(mean, deviation); // <= ERROR
        
        ofLog() << r;
        
        float x = ofClamp(glm::cos(rand) * r, -areaRadius, areaRadius);
        float y = ofClamp(glm::sin(rand) * r, -areaRadius, areaRadius);
        
        points[i] = ofPoint(x, y);
        
        ofColor color = colors[(int)ofRandom(4)];
        color.a *= ofRandom(.5f, 1.f);
        pointColor[i] = color;
    }
}

//--------------------------------------------------------------
void ofApp::setup(){
    
    gui.setup("panel");
    gui.add(areaRadius.set("area radius", 200.f, 25.f, 500.f));
    gui.add(mean.set("mean", 100.f, 12.5f, 500.f));
    gui.add(deviation.set("deviation", 8.f, 0.5f, 50.f));
    gui.add(circleRadius.set("circle radius", 20.f, 1.f, 50.f));
    
    createCircles();
}

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles