//--------------------------------------------------------------
LayerTransform::LayerTransform() : 
ofxEnablerInterface(true), 
ofxOscRouterNode("transform")
{
    
    addOscNodeAlias("t");
    addOscNodeAlias("xform");
    
    addOscMethod("position");
    addOscMethod("p");

    addOscMethod("anchorpoint");
    addOscMethod("a");

    addOscMethod("rotate");
    addOscMethod("r");

    addOscMethod("scale");
    addOscMethod("s");

    addOscMethod("opacity");
    addOscMethod("o");

    addOscMethod("size");
    addOscMethod("sz");
    
    addOscMethod("width");
    addOscMethod("w");
    
    addOscMethod("height");
    addOscMethod("h");
    
    
    
    size = ofPoint(640,480);
    
    position = ofxClampedPoint(ofPoint(0.0f,0.0f,0.0f));
    bIsPositionNormalized = false;

    anchorPoint = ofxClampedPoint(ofPoint(0.5f,0.5f,0.5f));
    bIsAnchorPointNormalized = true;

    rotation = ofxClampedPoint(ofPoint(0.0f,0.0f,0.0f));
    bIsRotationNormalized = false;

    scale = ofxClampedPoint(ofPoint(1.0f, 1.0f, 1.0f));

    orientation = ofxClampedPoint(ofPoint(1.0f, 1.0f, 1.0f));
    
    opacity = 255;

}
Beispiel #2
0
void ofxOscRouter::setup(const std::string& rootNodeName, int port)
{
    addOscNodeAlias(rootNodeName);
    setPort(port);
    ofLogNotice("ofxOscRouter") << "Listening for osc messages on port " << port;
}
//--------------------------------------------------------------
EffectsManager::EffectsManager() : ofxOscRouterNode("effects") {
    engine = NULL;
    
    addOscNodeAlias("eff");
    addOscNodeAlias("e");
}