Nuke binary plugins 16.0.1
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Loading...
Searching...
No Matches
DD::Image::ProjectionFunc Class Referenceabstract

#include <ProjectionFunc.h>

Inheritance diagram for DD::Image::ProjectionFunc:
DD::Image::PluginObject

Classes

class  Description
 

Public Member Functions

virtual ndk::LensProjectionFunction * lensProjectionFunction ()=0
 
virtual const char * projectionClass () const =0
 
virtual bool needsDefaultCameraOpKnobs () const
 
virtual bool providesCustomKnobs () const =0
 
virtual void addLensControlKnobs (Knob_Callback f)
 Add any lens-specific controls like focal length, fstop, etc.
 
virtual void addApertureControlKnobs (Knob_Callback f)
 Add any aperture-window specific controls like stereo offsets, roll, etc.
 
virtual int knob_changed (DD::Image::Knob *knob, int callAgain=0)
 

Static Public Member Functions

static const fdk::StringList & FindPlugins (bool findBuiltins, bool findExternals, bool forceRefresh=false)
 
static ProjectionFunccreate (const std::string_view &projectionClassName)
 
static ProjectionFunccreate (const ProjectionFunc::Description &projectionDescription)
 
- Static Public Member Functions inherited from DD::Image::PluginObject
static const fdk::StringList & FindPlugins (const char *pluginPrefix, const char *pluginSuffix, bool findBuiltins, bool findExternals, bool forceRefresh=false)
 

Static Public Attributes

static constexpr std::string_view pluginCategory
 Category can be used to organize plugins within a subdirectory.
 
static constexpr std::string_view pluginPrefix
 The name to use as the plugin name prefix.
 
static constexpr std::string_view pluginSuffix
 The name to use as the plugin name suffix.
 

Additional Inherited Members

- Static Protected Member Functions inherited from DD::Image::PluginObject
static const PluginObject::Description_create (const std::string_view &className, const std::string_view &pluginPrefix, const std::string_view &pluginSuffix)
 Subclasses call this with their custom prefix & suffix.
 

Detailed Description

Abstract interface class for building LensProjectionFunction plugins. Typically interface is attached to a LensProjectionFunction subclass as a secondary inheritance. The subclass must implement lensProjectionFunction() to provide access to the projection object.

Member Function Documentation

◆ lensProjectionFunction()

virtual ndk::LensProjectionFunction * DD::Image::ProjectionFunc::lensProjectionFunction ( )
pure virtual

Return the LensProjectionFunction object this interface is attached to. Should return 'this'. Must implement.

◆ projectionClass()

virtual const char * DD::Image::ProjectionFunc::projectionClass ( ) const
pure virtual

Return the class identifier name which is usually Description::projectionClass() of the subclass's local Description. Note that this is the class identifier name -without- the prefix & suffix. Must implement.

Referenced by DD::Image::CameraOp::_setProjectionFuncPlugin(), and DD::Image::CameraOp::addProjectionFuncCustomKnobs().

◆ FindPlugins()

const fdk::StringList & ProjectionFunc::FindPlugins ( bool  findBuiltins,
bool  findExternals,
bool  forceRefresh = false 
)
static

Find plugins matching the prefix and suffix of this class. See PluginObject::FindPlugins() for more info.

References DD::Image::PluginObject::FindPlugins(), pluginPrefix, and pluginSuffix.

◆ needsDefaultCameraOpKnobs()

virtual bool DD::Image::ProjectionFunc::needsDefaultCameraOpKnobs ( ) const
inlinevirtual

CameraOp specific support - does this projection utilize the CameraOp's standard CameraParameters knobs or should they be disabled/hidden?

This is used by CameraOp to enable or disable the knobs in its panel while keeping the knobs presence constant so that scripts will not break.

Default implementation returns false.

◆ providesCustomKnobs()

virtual bool DD::Image::ProjectionFunc::providesCustomKnobs ( ) const
pure virtual

Return true if this ProjectionFunc wants to create any additional custom Knobs to control internal parameters.

Nodes that support the option for dynamic knobs, like CameraOp, should first test this to decide whether to configure any custom Knob groups tabs, etc for the projection knobs to be placed in. The calling node can then organize the knobs by the sub categories provided via the various virtual knob methods - addCameraLensControlKnobs(), etc.

Must implement.

Referenced by DD::Image::CameraOp::addProjectionFuncCustomKnobs().

◆ knob_changed()

virtual int DD::Image::ProjectionFunc::knob_changed ( DD::Image::Knob knob,
int  callAgain = 0 
)
inlinevirtual

Perform any custom knob changed callback logic. callAgain is usually passed from the Op::knob_changed() method that owns this plugin, setting to 1 if the knob wants to be handled again. Default implementation does nothing and returns callAgain unchanged.

Referenced by DD::Image::CameraOp::_doProjectionFuncKnobChanged().

◆ create() [1/2]

ProjectionFunc * ProjectionFunc::create ( const std::string_view &  projectionClassName)
static

Create a ProjectionFunc instance from a projection class name. Note that the class name is -without- the prefix & suffix used to build the ProjectionFunc plugin name. For example a projection class named 'MyFisheye' will be combined with pluginPrefix and pluginSuffix to find a plugin description with the name 'lensMyFisheyeProjection'.

Calling code takes ownership of returned pointer.

References DD::Image::PluginObject::_create(), create(), pluginPrefix, and pluginSuffix.

Referenced by DD::Image::CameraOp::_setProjectionFuncPlugin(), and create().

◆ create() [2/2]

ProjectionFunc * ProjectionFunc::create ( const ProjectionFunc::Description projectionDescription)
static

Create a ProjectionFunc instance from a description. Calling code takes ownership of returned pointer.

References DD::Image::ProjectionFunc::Description::builderFunc, DD::Image::PluginObject::Description::pluginClass(), and DD::Image::PluginObject::Description::pluginName().



©2025 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com