void ChromaCommand::readProperties(boost::property_tree::wptree& pt)
{
    AbstractCommand::readProperties(pt);

    if (pt.count(L"chromablur") > 0)        setSpread(pt.get<float>(L"chromablur"));
    if (pt.count(L"chromakey") > 0)         setKey(QString::fromStdWString(pt.get<std::wstring>(L"chromakey")));
    if (pt.count(L"chromasoftness") > 0)    setSpread(pt.get<float>(L"chromasoftness"));
    if (pt.count(L"chromaspill") > 0)       setSpill(pt.get<float>(L"chromaspill"));
    if (pt.count(L"chromathreshold") > 0)   setThreshold(pt.get<float>(L"chromathreshold"));
    setShowMask(false);
}
Esempio n. 2
0
	//---------------------------------------------------
	TremoloDSP::TremoloDSP( XMLParser& parser, XMLNode* tremoloNode )
		:	DSP( MONKY_DSP_TYPE_TREMOLO )
	{
		const float NO_VALUE_SPECIFIED = -1000000000.0f;
		parser.validateXMLAttributes( tremoloNode, "", "type,frequency,depth,shape,timeSkewing,duty,flatness,phase,spread" );
		float frequency = parser.getXMLAttributeAsFloat( tremoloNode, "frequency", NO_VALUE_SPECIFIED );
		float depth = parser.getXMLAttributeAsFloat( tremoloNode, "depth", NO_VALUE_SPECIFIED );
		float shape = parser.getXMLAttributeAsFloat( tremoloNode, "shape", NO_VALUE_SPECIFIED );
		float timeSkewing = parser.getXMLAttributeAsFloat( tremoloNode, "timeSkewing", NO_VALUE_SPECIFIED );
		float duty = parser.getXMLAttributeAsFloat( tremoloNode, "duty", NO_VALUE_SPECIFIED );
		float flatness = parser.getXMLAttributeAsFloat( tremoloNode, "flatness", NO_VALUE_SPECIFIED );
		float phase = parser.getXMLAttributeAsFloat( tremoloNode, "phase", NO_VALUE_SPECIFIED );
		float spread = parser.getXMLAttributeAsFloat( tremoloNode, "spread", NO_VALUE_SPECIFIED );

		if( frequency != NO_VALUE_SPECIFIED )
			setFrequency( frequency );
		if( depth != NO_VALUE_SPECIFIED )
			setDepth( depth );
		if( shape != NO_VALUE_SPECIFIED )
			setShape( shape );
		if( timeSkewing != NO_VALUE_SPECIFIED )
			setTimeSkewing( timeSkewing );
		if( duty != NO_VALUE_SPECIFIED )
			setDuty( duty );
		if( flatness != NO_VALUE_SPECIFIED )
			setFlatness( flatness );
		if( phase != NO_VALUE_SPECIFIED )
			setPhase( phase );
		if( spread != NO_VALUE_SPECIFIED )
			setSpread( spread );
	}
Esempio n. 3
0
 /*! Constructor
   \brief Constructor
   \param P vector of points for which the WSPD is to be constructed.
   \param S seperation factor for the WSPD (boxes will be considered well separated if they have a minimum distance greater than S times the maximum corner to corner distance of the boxes)
 */
 pwspd(std::vector<Point> &P, double S=2) : Points(P), cqtree(P)
 {
     setSpread(S);
 }