Beispiel #1
0
Scene::Scene(string name) : XmlObject("scene"), OscObject(""), _name(name), _background(0x00000)
{
    // attach variables to Xml
    addXmlAttribute("R", "background", XML_TYPE_BYTE, &_background.R);
    addXmlAttribute("G", "background", XML_TYPE_BYTE, &_background.G);
    addXmlAttribute("B", "background", XML_TYPE_BYTE, &_background.B);
    addXmlAttribute("A", "background", XML_TYPE_BYTE, &_background.A);

    addXmlAttribute("name", "scene", XML_TYPE_STRING, &_name);
}
Beispiel #2
0
Bitmap::Bitmap(string name, string parentOscAddress) :
	DrawableObject("bitmap", name, parentOscAddress), 
	bitmapWidth(1), bitmapHeight(1),
	pos(0, 0), width(1), height(1), pixelWidth(1), pixelHeight(1),
	bFilled(true), bDrawFromCenter(false)
{
	// add variables to Xml
	addXmlAttribute("width", "bitmap", XML_TYPE_UINT, &bitmapWidth);
	addXmlAttribute("height", "bitmap", XML_TYPE_UINT, &bitmapHeight);
	addXmlAttribute("x", "position", XML_TYPE_FLOAT, &pos.x);
	addXmlAttribute("y", "position", XML_TYPE_FLOAT, &pos.y);
	addXmlAttribute("width", "size", XML_TYPE_UINT, &width);
	addXmlAttribute("height", "size", XML_TYPE_UINT, &height);
	addXmlAttribute("yesno", "filled", XML_TYPE_BOOL, &bFilled);
	addXmlAttribute("yesno", "center", XML_TYPE_BOOL, &bDrawFromCenter);
}
Beispiel #3
0
Scene::Scene(string name, string parentOscAddress) : XmlObject("scene"),
	OscObject(parentOscAddress+"/"+name),
	_name(name), _background(0, 0, 0, 255), _fps(-1)
{
	// attach variables to Xml
	addXmlAttribute("R", "background", XML_TYPE_BYTE, &_background.R);
	addXmlAttribute("G", "background", XML_TYPE_BYTE, &_background.G);
	addXmlAttribute("B", "background", XML_TYPE_BYTE, &_background.B);
	addXmlAttribute("A", "background", XML_TYPE_BYTE, &_background.A);

	addXmlAttribute("name", "scene", XML_TYPE_STRING, &_name);
	addXmlAttribute("fps", "scene", XML_TYPE_UINT, &_fps);
	
	LOG << "SCENE " << parentOscAddress+"/"+name << endl;
}
Beispiel #4
0
Config::Config() :
	XmlObject(""),
	listeningPort(9990),
	sendingIp("127.0.0.1"), sendingPort(8880),
	baseAddress((string) "/"+PACKAGE),
	notificationAddress(baseAddress+"/notifications"),
	deviceAddress(baseAddress+"/devices"),
	connectionId(0),
	fontFilename(visual::Util::toDataPath("ATARCC__.TTF"))
{
	// attach config values to xml attributes
	addXmlAttribute("port", "listening", XML_TYPE_UINT, &listeningPort);
	
	addXmlAttribute("ip", "sending", XML_TYPE_STRING, &sendingIp);
	addXmlAttribute("port", "sending", XML_TYPE_UINT, &sendingPort);
	
	addXmlAttribute("notificationAddress", "osc", XML_TYPE_STRING, &notificationAddress);
	addXmlAttribute("deviceAddress", "osc", XML_TYPE_STRING, &deviceAddress);
	addXmlAttribute("connectionId", "osc", XML_TYPE_UINT, &connectionId);
}