当前位置: 首页>>代码示例>>C++>>正文


C++ ImageEffectDescriptor::defineDouble3DParam方法代码示例

本文整理汇总了C++中ofx::ImageEffectDescriptor::defineDouble3DParam方法的典型用法代码示例。如果您正苦于以下问题:C++ ImageEffectDescriptor::defineDouble3DParam方法的具体用法?C++ ImageEffectDescriptor::defineDouble3DParam怎么用?C++ ImageEffectDescriptor::defineDouble3DParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ofx::ImageEffectDescriptor的用法示例。


在下文中一共展示了ImageEffectDescriptor::defineDouble3DParam方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: describe3DDoubleParam

/** @brief describe a double param */
void describe3DDoubleParam(OFX::ImageEffectDescriptor &desc, const std::string &name, DoubleTypeEnum doubleType,
                           double min, double max, PageParamDescriptor *page)
{
  Double3DParamDescriptor *param = desc.defineDouble3DParam(name);
  param->setLabels(name, name, name);
  param->setScriptName(name);
  param->setHint("A 3D double parameter");
  param->setDefault(0, 0, 0);
  param->setRange(min, min, min, max, max, max);
  param->setDisplayRange(min, min, min, max, max, max);
  param->setDoubleType(doubleType);
  page->addChild(*param);
}
开发者ID:chajaeik,项目名称:openfx,代码行数:14,代码来源:propTester.cpp

示例2: describeInContext


//.........这里部分代码省略.........
	pIn3->setDefault( 0.5, 0.5 );
	pIn3->setParent( groupIn );

	OFX::BooleanParamDescriptor* overlayIn = desc.defineBooleanParam( kParamOverlayIn );
	overlayIn->setLabel( "Overlay" );
	overlayIn->setDefault( true );
	overlayIn->setParent( groupIn );

	OFX::RGBParamDescriptor* ouverlayInColor = desc.defineRGBParam( kParamOverlayInColor );
	ouverlayInColor->setLabel( "Color" );
	ouverlayInColor->setHint( "Input point overlay color" );
	ouverlayInColor->setDefault( 1.0, 0.0, 0.0 );
	ouverlayInColor->setParent( groupIn );

	//////////////////// OUT Points ////////////////////
	OFX::GroupParamDescriptor* groupOut = desc.defineGroupParam( kParamGroupOut );
	groupOut->setLabel( "Output points" );
        groupOut->setOpen(false);

	OFX::Double2DParamDescriptor* pOut0 = desc.defineDouble2DParam( kParamPointOut + "0" );
	pOut0->setLabel( "Out 0" );
	pOut0->setHint( "Output point 0" );
	pOut0->setDefault( -0.5, -0.5 );
	pOut0->setParent( groupOut );

	OFX::Double2DParamDescriptor* pOut1 = desc.defineDouble2DParam( kParamPointOut + "1" );
	pOut1->setLabel( "Out 1" );
	pOut1->setHint( "Output point 1" );
	pOut1->setDefault( 0.5, -0.5 );
	pOut1->setParent( groupOut );

	OFX::Double2DParamDescriptor* pOut2 = desc.defineDouble2DParam( kParamPointOut + "2" );
	pOut2->setLabel( "Out 2" );
	pOut2->setHint( "Output point 2" );
	pOut2->setDefault( -0.5, 0.5 );
	pOut2->setParent( groupOut );

	OFX::Double2DParamDescriptor* pOut3 = desc.defineDouble2DParam( kParamPointOut + "3" );
	pOut3->setLabel( "Out 3" );
	pOut3->setHint( "Output point 3" );
	pOut3->setDefault( 0.5, 0.5 );
	pOut3->setParent( groupOut );

	OFX::BooleanParamDescriptor* overlayOut = desc.defineBooleanParam( kParamOverlayOut );
	overlayOut->setLabel( "Overlay" );
	overlayOut->setDefault( true );
	overlayOut->setParent( groupOut );

	OFX::RGBParamDescriptor* ouverlayOutColor = desc.defineRGBParam( kParamOverlayOutColor );
	ouverlayOutColor->setLabel( "Color" );
	ouverlayOutColor->setHint( "Output point overlay color" );
	ouverlayOutColor->setDefault( 0.0, 0.0, 1.0 );
	ouverlayOutColor->setParent( groupOut );

	//////////////////// Persp Matrix ////////////////////
	OFX::GroupParamDescriptor* groupPerspMatrix = desc.defineGroupParam( kParamGroupPerspMatrix );
	groupPerspMatrix->setLabel( "Perspective matrix" );
	groupPerspMatrix->setHint( "Transformation matrix" );

	OFX::Double3DParamDescriptor* perspMatrixRow0 = desc.defineDouble3DParam( kParamPerspMatrixRow + "0" );
	perspMatrixRow0->setLabel( "row 0" );
	perspMatrixRow0->setDefault( 1.0, 0.0, 0.0 );
	perspMatrixRow0->setParent( groupPerspMatrix );

	OFX::Double3DParamDescriptor* perspMatrixRow1 = desc.defineDouble3DParam( kParamPerspMatrixRow + "1" );
	perspMatrixRow1->setLabel( "row 1" );
	perspMatrixRow1->setDefault( 0.0, 1.0, 0.0 );
	perspMatrixRow1->setParent( groupPerspMatrix );

	OFX::Double3DParamDescriptor* perspMatrixRow2 = desc.defineDouble3DParam( kParamPerspMatrixRow + "2" );
	perspMatrixRow2->setLabel( "row 2" );
	perspMatrixRow2->setDefault( 0.0, 0.0, 1.0 );
	perspMatrixRow2->setParent( groupPerspMatrix );

	////////////////// Bilinear Matrix ////////////////////
	OFX::GroupParamDescriptor* groupBilMatrix = desc.defineGroupParam( kParamGroupBilinearMatrix );
	groupBilMatrix->setLabel( "Bilinear matrix" );
	groupBilMatrix->setHint( "Billinear transformation matrix" );

	OFX::Double2DParamDescriptor* bilMatrixRow0 = desc.defineDouble2DParam( kParamBilinearMatrixRow + "0" );
	bilMatrixRow0->setLabel( "row 0" );
	bilMatrixRow0->setDefault( 1.0, 0.0 );
	bilMatrixRow0->setParent( groupBilMatrix );

	OFX::Double2DParamDescriptor* bilMatrixRow1 = desc.defineDouble2DParam( kParamBilinearMatrixRow + "1" );
	bilMatrixRow1->setLabel( "row 1" );
	bilMatrixRow1->setDefault( 0.0, 1.0 );
	bilMatrixRow1->setParent( groupBilMatrix );

	OFX::Double2DParamDescriptor* bilMatrixRow2 = desc.defineDouble2DParam( kParamBilinearMatrixRow + "2" );
	bilMatrixRow2->setLabel( "row 2" );
	bilMatrixRow2->setDefault( 0.0, 0.0 );
	bilMatrixRow2->setParent( groupBilMatrix );

	OFX::Double2DParamDescriptor* bilMatrixRow3 = desc.defineDouble2DParam( kParamBilinearMatrixRow + "3" );
	bilMatrixRow3->setLabel( "row 3" );
	bilMatrixRow3->setDefault( 0.0, 0.0 );
	bilMatrixRow3->setParent( groupBilMatrix );

}
开发者ID:morphimac,项目名称:TuttleOFX,代码行数:101,代码来源:PinningPluginFactory.cpp

示例3: describeInContext

/**
 * @brief Function called to describe the plugin controls and features.
 * @param[in, out]   desc       Effect descriptor
 * @param[in]        context    Application context
 */
void ImageStatisticsPluginFactory::describeInContext( OFX::ImageEffectDescriptor& desc,
                                                      OFX::EContext               context )
{
	OFX::ClipDescriptor* srcClip = desc.defineClip( kOfxImageEffectSimpleSourceClipName );

	srcClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	srcClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	srcClip->setSupportsTiles( kSupportTiles );

	// Create the mandated output clip
	OFX::ClipDescriptor* dstClip = desc.defineClip( kOfxImageEffectOutputClipName );
	dstClip->addSupportedComponent( OFX::ePixelComponentRGBA );
	dstClip->addSupportedComponent( OFX::ePixelComponentAlpha );
	dstClip->setSupportsTiles( kSupportTiles );

	OFX::ChoiceParamDescriptor* coordSystem = desc.defineChoiceParam( kParamCoordinateSystem );
	coordSystem->setLabel( "Coordinate system" );
	coordSystem->appendOption( kParamCoordinateSystemNormalized );
	coordSystem->appendOption( kParamCoordinateSystemCanonical );
	coordSystem->setDefault( 0 );

	OFX::Double2DParamDescriptor* rectCenter = desc.defineDouble2DParam( kParamRectCenter );
	rectCenter->setLabel( "Center" );
	rectCenter->setDoubleType( OFX::eDoubleTypePlain );
	//	rectCenter->setDoubleType( OFX::eDoubleTypeNormalisedXYAbsolute );
	rectCenter->setDefault( 0.5, 0.5 );

	OFX::Double2DParamDescriptor* rectSize = desc.defineDouble2DParam( kParamRectSize );
	rectSize->setLabel( "Size" );
	rectSize->setDoubleType( OFX::eDoubleTypePlain );
	//	rectSize->setDoubleType( OFX::eDoubleTypeNormalisedXYAbsolute );
	rectSize->setDefault( 0.5, 0.5 );

	OFX::ChoiceParamDescriptor* chooseOutput = desc.defineChoiceParam( kParamChooseOutput );
	chooseOutput->setLabel( "Choose output" );
	chooseOutput->appendOption( kParamChooseOutputSource );
	chooseOutput->appendOption( kParamChooseOutputAverage );
	chooseOutput->appendOption( kParamChooseOutputChannelMin );
	chooseOutput->appendOption( kParamChooseOutputChannelMax );
	chooseOutput->appendOption( kParamChooseOutputLuminosityMin );
	chooseOutput->appendOption( kParamChooseOutputLuminosityMax );
	chooseOutput->setDefault( 0 );

	OFX::GroupParamDescriptor* outputGroup = desc.defineGroupParam( kParamOutputGroup );
	outputGroup->setLabel( "Output" );

	// -----------------------------------------------------------------------------

	OFX::GroupParamDescriptor* rgbaGroup = desc.defineGroupParam( kParamOutputGroupRGBA );
	rgbaGroup->setLabel( "RGBA" );
	rgbaGroup->setParent( outputGroup );

	OFX::RGBAParamDescriptor* outputAverage = desc.defineRGBAParam( kParamOutputAverage );
	outputAverage->setLabel( "Average" );
	outputAverage->setParent( rgbaGroup );
	outputAverage->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputChannelMin = desc.defineRGBAParam( kParamOutputChannelMin );
	outputChannelMin->setLabel( "Channels' min" );
	outputChannelMin->setHint( "Minimum value per channel" );
	outputChannelMin->setParent( rgbaGroup );
	outputChannelMin->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputChannelMax = desc.defineRGBAParam( kParamOutputChannelMax );
	outputChannelMax->setLabel( "Channels' max" );
	outputChannelMax->setParent( rgbaGroup );
	outputChannelMax->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputLuminosityMin = desc.defineRGBAParam( kParamOutputLuminosityMin );
	outputLuminosityMin->setLabel( "Luminosity min" );
	outputLuminosityMin->setParent( rgbaGroup );
	outputLuminosityMin->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputLuminosityMax = desc.defineRGBAParam( kParamOutputLuminosityMax );
	outputLuminosityMax->setLabel( "Luminosity max" );
	outputLuminosityMax->setParent( rgbaGroup );
	outputLuminosityMax->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputKurtosis = desc.defineRGBAParam( kParamOutputKurtosis );
	outputKurtosis->setLabel( "Kurtosis" );
	outputKurtosis->setParent( rgbaGroup );
	outputKurtosis->setEvaluateOnChange( false );

	OFX::RGBAParamDescriptor* outputSkewness = desc.defineRGBAParam( kParamOutputSkewness );
	outputSkewness->setLabel( "Skewness" );
	outputSkewness->setParent( rgbaGroup );
	outputSkewness->setEvaluateOnChange( false );

	// -----------------------------------------------------------------------------

	OFX::GroupParamDescriptor* hslGroup = desc.defineGroupParam( kParamOutputGroupHSL );
	hslGroup->setLabel( "HSL" );
	hslGroup->setParent( outputGroup );

	OFX::Double3DParamDescriptor* outputAverageHSL = desc.defineDouble3DParam( kParamOutputAverageHSL );
//.........这里部分代码省略.........
开发者ID:Finaler,项目名称:TuttleOFX,代码行数:101,代码来源:ImageStatisticsPluginFactory.cpp


注:本文中的ofx::ImageEffectDescriptor::defineDouble3DParam方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。