3ds Max C++ API Reference
FragmentGraph Class Reference

FragmentGraph is a graph consisting of fragment nodes. More...

#include <FragmentGraph.h>

+ Inheritance diagram for FragmentGraph:

Public Member Functions

FragmentGraphAPI FragmentGraph ()
 Constructor. More...
 
virtual FragmentGraphAPI ~FragmentGraph ()
 Destructor. More...
 
FragmentGraphAPI size_t GetNodeCount () const
 Gets the number of nodes. More...
 
FragmentGraphAPI void AddNode (const FragmentPtr &pFragmentNode, const MSTR &nodeName)
 Adds a fragment node to the current graph. More...
 
FragmentGraphAPI FragmentPtr GetNode (size_t index) const
 Gets a fragment node given its index. More...
 
FragmentGraphAPI FragmentPtr GetNode (const MSTR &nodeName) const
 Gets a fragment node by name. More...
 
FragmentGraphAPI const MSTRGetNodeName (size_t index) const
 Gets the name of the node given its index. More...
 
FragmentGraphAPI void RemoveNode (const MSTR &nodeName)
 Removes a fragment node given its name. More...
 
FragmentGraphAPI void RemoveNode (const FragmentPtr &pFragmentNode)
 Removes a fragment node from this graph. More...
 
FragmentGraphAPI bool WireInput (size_t graphInputIndex, const MSTR &nodeName, size_t nodeInputIndex)
 Wires a connection between a specified input of the graph and a specified input of a fragment node. More...
 
FragmentGraphAPI bool WireOutput (size_t graphOutputIndex, const MSTR &nodeName, size_t nodeOutputIndex)
 Wires a connection between a specified output of the graph and a specified output of a fragment node. More...
 
FragmentGraphAPI bool WireNode (const MSTR &sourceNodeName, size_t sourceNodeOutputIndex, const MSTR &targetNodeName, size_t targetNodeInputIndex)
 Wires a connection between a specified output of a source node and a specified input of a target node. More...
 
FragmentGraphAPI bool LoadXML (const MSTR &filePathName)
 Loads input, output and connection information for a fragment graph from an XML file. More...
 
FragmentGraphAPI bool SaveXML (const MSTR &filePathName)
 Saves the inputs, outputs and connection information of one fragment graph into one XML file. More...
 
virtual FragmentGraphAPI Class_ID GetClassID () const
 Gets the class ID of the fragment graph. More...
 
virtual FragmentGraphAPI InputCreateInput (const Class_ID &typeID)
 Create an input instance of this fragment. More...
 
virtual FragmentGraphAPI OutputCreateOutput (const Class_ID &typeID)
 Create an output instance of this fragment. More...
 
FragmentGraphAPI int CheckValidity ()
 Check if this fragment graph is valid or not. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3, const Class_ID &type4)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (size_t numberOfInputs, const Class_ID *pInputTypes)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3, const Class_ID &type4)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (size_t numberOfOutputs, const Class_ID *pOutputTypes)
 Initializes the outputs for the fragment. More...
 
- Public Member Functions inherited from Fragment
FragmentGraphAPI Fragment ()
 Constructor. More...
 
virtual FragmentGraphAPI ~Fragment ()
 Destructor. More...
 
FragmentGraphAPI bool Evaluate (void *evaluationContext)
 Evaluates this fragment. More...
 
FragmentGraphAPI bool ReEvaluate (void *evaluationContext)
 Re-evaluates this fragment. More...
 
FragmentGraphAPI size_t GetNumberOfInputs () const
 Gets the number of inputs for this fragment. More...
 
FragmentGraphAPI InputGetInput (size_t inputIndex)
 Gets the n-th input for this fragment. More...
 
FragmentGraphAPI const InputGetInput (size_t inputIndex) const
 Gets the n-th input for this fragment. More...
 
FragmentGraphAPI const VariableGetInputVariable (size_t inputIndex) const
 Gets the n-th input variable for this fragment. More...
 
FragmentGraphAPI OutputGetInputSource (size_t inputIndex) const
 Gets the output of another fragment that is connected to n-th input for this fragment. More...
 
FragmentGraphAPI bool SetInputSource (size_t inputIndex, Output *pOutput)
 Connects the input to an output. More...
 
FragmentGraphAPI size_t GetNumberOfOutputs () const
 Gets the number of outputs for this fragment. More...
 
FragmentGraphAPI OutputGetOutput (size_t outputIndex)
 Gets the n-th output for this fragment. More...
 
FragmentGraphAPI const OutputGetOutput (size_t outputIndex) const
 Gets the n-th output for this fragment. More...
 
FragmentGraphAPI bool SetOutputVariable (size_t outputIndex, const Variable &var)
 Updates the value of the n-th output. More...
 
FragmentGraphAPI bool GetFlag (FragmentFlags flag) const
 Gets a flag for this fragment. More...
 
FragmentGraphAPI void SetFlag (FragmentFlags flag, bool onOff)
 Sets a flag for this fragment. More...
 
FragmentGraphAPI void SetParent (Fragment *pParent)
 Assigns the parent fragment. More...
 
FragmentGraphAPI FragmentGetParent () const
 Gets the parent fragment. More...
 
FragmentGraphAPI IVariableDictionaryGetParameterTable ()
 Gets the container of all built-in parameters. More...
 
FragmentGraphAPI const IVariableDictionaryGetParameterTable () const
 Gets the container of all built-in parameters. More...
 
virtual FragmentGraphAPI bool OnMessage (const FragmentMessageParameter &param)
 The fragment message handling callback function that is called if any of its registered messages (including the timer message) is invoked. More...
 
FragmentGraphAPI void SetTimerTicks (size_t timerTicks)
 Registers or deregisters the timer message and set the timer ticks value in milliseconds. More...
 
FragmentGraphAPI size_t GetTimerTicks () const
 Gets the timer ticks value in milliseconds. More...
 
FragmentGraphAPI void RegisterMessage (size_t messageID)
 Register a message with this fragment. More...
 
FragmentGraphAPI bool UnRegisterMessage (size_t messageID)
 Deregister a message with this fragment. More...
 
FragmentGraphAPI const Tab< size_t > & GetRegisteredMessageIDs () const
 Gets all the messages that have been registered. More...
 
- Public Member Functions inherited from ARefObject
GraphicsUtilityAPI ARefObject ()
 
virtual GraphicsUtilityAPI long AddRef ()
 from IRefObject, see comments in IRefObject More...
 
virtual GraphicsUtilityAPI long Release ()
 decrease reference count of this object by one, if the decreased reference count equals zero, the object will be deleted. More...
 
GraphicsUtilityAPI IRefObjectQueryInterface (Interface_ID classID)
 Try query an interface from the ref object using a given interface id. More...
 
- Public Member Functions inherited from IRefObject
GraphicsUtilityAPI IRefObject ()
 
virtual GraphicsUtilityAPI ~IRefObject ()
 

Protected Member Functions

virtual FragmentGraphAPI bool DoEvaluate (void *evaluationContext)
 Does evaluation. More...
 
virtual FragmentGraphAPI void HandleFlagChanged (FragmentFlags flag, bool oldValue)
 This function is invoked when any fragment flag gets changed. More...
 
- Protected Member Functions inherited from Fragment
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3, const Class_ID &type4)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeInputs (size_t numberOfInputs, const Class_ID *pInputTypes)
 Initializes the inputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (const Class_ID &type1, const Class_ID &type2, const Class_ID &type3, const Class_ID &type4)
 Initializes the outputs for the fragment. More...
 
FragmentGraphAPI bool InitializeOutputs (size_t numberOfOutputs, const Class_ID *pOutputTypes)
 Initializes the outputs for the fragment. More...
 
virtual FragmentGraphAPI void HandleSubFragmentFlagChanged (Fragment *pSubFragment, FragmentFlags flag, bool oldValue)
 This function will be invoked when any fragment flag of a sub fragment gets changed. More...
 
- Protected Member Functions inherited from ARefObject
virtual GraphicsUtilityAPI void DeleteThis ()
 This function will be called when the reference count of an ARefObject equals zero. More...
 
virtual GraphicsUtilityAPI ~ARefObject ()
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

FragmentGraph is a graph consisting of fragment nodes.

A FragmentGraph that has inputs and outputs can also be treated as a fragment node. Various kinds of fragment nodes can be combined together to yield arbitrary multi-passes render pipeline. The class provides several utility functions to create and connect fragment nodes.

Constructor & Destructor Documentation

◆ FragmentGraph()

Constructor.

◆ ~FragmentGraph()

virtual FragmentGraphAPI ~FragmentGraph ( )
virtual

Destructor.

Member Function Documentation

◆ DoEvaluate()

virtual FragmentGraphAPI bool DoEvaluate ( void evaluationContext)
protectedvirtual

Does evaluation.

A concrete fragment class must override this function, perform necessary computation in this function, and set value to its output. Note that this function cannot be called directly, it is called indirectly by calling Fragment::Evaluate(), but is only called if the Fragment is dirty.

Parameters
[in]evaluationContextcontext info for evaluation.
Returns
true on success, false otherwise. If this function returns false, the fragment will still be dirty.

Implements Fragment.

◆ HandleFlagChanged()

virtual FragmentGraphAPI void HandleFlagChanged ( FragmentFlags  flag,
bool  oldValue 
)
protectedvirtual

This function is invoked when any fragment flag gets changed.

Parameters
[in]flagthe flag that gets changed
[in]oldValuethe old value of the flag

Reimplemented from Fragment.

◆ GetNodeCount()

FragmentGraphAPI size_t GetNodeCount ( ) const

Gets the number of nodes.

Returns
the count of nodes.

◆ AddNode()

FragmentGraphAPI void AddNode ( const FragmentPtr pFragmentNode,
const MSTR nodeName 
)

Adds a fragment node to the current graph.

Parameters
[in]pFragmentNodethe node to be added. This node could be either a fragment node or a fragment graph.
[in]nodeNamethe name of the node to be added. We use this name to identify this node in the graph.

◆ GetNode() [1/2]

FragmentGraphAPI FragmentPtr GetNode ( size_t  index) const

Gets a fragment node given its index.

Parameters
[in]indexthe index of the node.
Returns
the node corresponding to index.

◆ GetNode() [2/2]

FragmentGraphAPI FragmentPtr GetNode ( const MSTR nodeName) const

Gets a fragment node by name.

Parameters
[in]nodeNamethe name of the node.
Returns
the node corresponding to nodeName.

◆ GetNodeName()

FragmentGraphAPI const MSTR& GetNodeName ( size_t  index) const

Gets the name of the node given its index.

Parameters
[in]indexthe index of the node.
Returns
the name of the node corresponding to index.

◆ RemoveNode() [1/2]

FragmentGraphAPI void RemoveNode ( const MSTR nodeName)

Removes a fragment node given its name.

Parameters
[in]nodeNamethe name of the node to be removed.
Returns
true if this node is found and deleted, false otherwise.

◆ RemoveNode() [2/2]

FragmentGraphAPI void RemoveNode ( const FragmentPtr pFragmentNode)

Removes a fragment node from this graph.

Parameters
[in]pFragmentNodethe node to remove

◆ WireInput()

FragmentGraphAPI bool WireInput ( size_t  graphInputIndex,
const MSTR nodeName,
size_t  nodeInputIndex 
)

Wires a connection between a specified input of the graph and a specified input of a fragment node.

Parameters
[in]graphInputIndexthe index of a specified input
[in]nodeNamethe name of the fragment node
[in]nodeInputIndexthe index of a specified input of the fragment node
Returns
true if this connection could be established, false otherwise. Successful connection depends on:
  1. the node can be found
  2. both inputs can be found (the index given is in a valid range)
  3. the types of both inputs match

◆ WireOutput()

FragmentGraphAPI bool WireOutput ( size_t  graphOutputIndex,
const MSTR nodeName,
size_t  nodeOutputIndex 
)

Wires a connection between a specified output of the graph and a specified output of a fragment node.

Parameters
[in]graphOutputIndexthe index of a specified output
[in]nodeNamethe name of the fragment node
[in]nodeOutputIndexthe index of a specified output of the fragment node
Returns
true if this connection could be established, false otherwise. Successful connection depends on:
  1. the node can be found
  2. both outputs can be found (the index given is in a valid range)
  3. the types of both outputs match

◆ WireNode()

FragmentGraphAPI bool WireNode ( const MSTR sourceNodeName,
size_t  sourceNodeOutputIndex,
const MSTR targetNodeName,
size_t  targetNodeInputIndex 
)

Wires a connection between a specified output of a source node and a specified input of a target node.

Parameters
[in]sourceNodeNamethe name of the source node
[in]sourceNodeOutputIndexthe index of a specified output of the source node
[in]targetNodeNamethe name of the target node
[in]targetNodeInputIndexthe index of a specified output of the source node
Returns
true if this connection could be established, false otherwise. Successful connection depends on:
  1. both nodes can be found
  2. the input and the output can be found (the index given is in a valid range)
  3. the type of the source output matches the type of the target input

◆ LoadXML()

FragmentGraphAPI bool LoadXML ( const MSTR filePathName)

Loads input, output and connection information for a fragment graph from an XML file.

After loading the XML file, the FragmentGraph completes wiring input, wiring output and wiring nodes.

Parameters
[in]filePathNamefile path name.
Returns
true on success, false otherwise.

◆ SaveXML()

FragmentGraphAPI bool SaveXML ( const MSTR filePathName)

Saves the inputs, outputs and connection information of one fragment graph into one XML file.

Parameters
[in]filePathNamefile path name.
Returns
true on success, false otherwise.

◆ GetClassID()

virtual FragmentGraphAPI Class_ID GetClassID ( ) const
virtual

Gets the class ID of the fragment graph.

Returns
the class ID of the fragment graph.

Reimplemented from Fragment.

◆ CreateInput()

virtual FragmentGraphAPI Input* CreateInput ( const Class_ID typeID)
virtual

Create an input instance of this fragment.

This function is called by InitializeInputs() when initializing inputs. This function could be overridden if a fragment would like to customize its own implementation of fragment inputs.

Parameters
[in]typeIDtype of the input
Returns
the input object corresponding to typeID.

Reimplemented from Fragment.

◆ CreateOutput()

virtual FragmentGraphAPI Output* CreateOutput ( const Class_ID typeID)
virtual

Create an output instance of this fragment.

This function is called by InitializeOutputs() when initializing outputs. This function could be overridden if a fragment would like to customize its own implementation of fragment inputs.

Parameters
[in]typeIDtype of the output
Returns
the output object corresponding to typeID.

Reimplemented from Fragment.

◆ CheckValidity()

FragmentGraphAPI int CheckValidity ( )

Check if this fragment graph is valid or not.

Returns
0 if valid or non-zero otherwise

◆ InitializeInputs() [1/5]

FragmentGraphAPI bool InitializeInputs

Initializes the inputs for the fragment.

The inputs can only be initialized once for each fragment. Once the inputs are initialized, developers cannot change any of the inputs at runtime. This function will initialize the fragment to one input with the given type.

Parameters
[in]type1type of the first input.
Returns
true on success, false otherwise.

◆ InitializeInputs() [2/5]

FragmentGraphAPI bool InitializeInputs

Initializes the inputs for the fragment.

The inputs can only be initialized once for each fragment. Once the inputs are initialized, developers cannot change any of the inputs at runtime. This function will initialize the fragment to two inputs with the given types.

Parameters
[in]type1type of the first input.
[in]type2type of the second input.
Returns
true on success, false otherwise.

◆ InitializeInputs() [3/5]

FragmentGraphAPI bool InitializeInputs

Initializes the inputs for the fragment.

The inputs can only be initialized once for each fragment. Once the inputs are initialized, developers cannot change any of the inputs at runtime. This function will initialize the fragment to three inputs with the given types.

Parameters
[in]type1type of the first input.
[in]type2type of the second input.
[in]type3type of the third input.
Returns
true on success, false otherwise.

◆ InitializeInputs() [4/5]

FragmentGraphAPI bool InitializeInputs

Initializes the inputs for the fragment.

The inputs can only be initialized once for each fragment. Once the inputs are initialized, developers cannot change any of the inputs at runtime. This function will initialize the fragment to four inputs with the given types.

Parameters
[in]type1type of the first input.
[in]type2type of the second input.
[in]type3type of the third input.
[in]type4type of the forth input.
Returns
true on success, false otherwise.

◆ InitializeInputs() [5/5]

FragmentGraphAPI bool InitializeInputs

Initializes the inputs for the fragment.

The inputs can only be initialized once for each fragment. Once the inputs are initialized, developers cannot change any of the inputs at runtime. This function will initialize the fragment to n input with the given types.

Parameters
[in]numberOfInputsthe number of inputs for this fragment.
[in]pInputTypespointer to an array of the input types. This array must be the same size as numberOfInputs.
Returns
true on success, false otherwise.

◆ InitializeOutputs() [1/5]

FragmentGraphAPI bool InitializeOutputs

Initializes the outputs for the fragment.

The outputs can only be initialized once for each fragment. Once the outputs are initialized, developers cannot change any of the outputs at runtime. This function will initialize the fragment to one output with the given type.

Parameters
[in]type1type of the first output.
Returns
true on success, false otherwise.

◆ InitializeOutputs() [2/5]

FragmentGraphAPI bool InitializeOutputs

Initializes the outputs for the fragment.

The outputs can only be initialized once for each fragment. Once the outputs are initialized, developers cannot change any of the outputs at runtime. This function will initialize the fragment to two outputs with the given types.

Parameters
[in]type1type of the first output.
[in]type2type of the second output.
Returns
true on success, false otherwise.

◆ InitializeOutputs() [3/5]

FragmentGraphAPI bool InitializeOutputs

Initializes the outputs for the fragment.

The outputs can only be initialized once for each fragment. Once the outputs are initialized, developers cannot change any of the outputs at runtime. This function will initialize the fragment to three outputs with the given types.

Parameters
[in]type1type of the first output.
[in]type2type of the second output.
[in]type3type of the third output.
Returns
true on success, false otherwise.

◆ InitializeOutputs() [4/5]

FragmentGraphAPI bool InitializeOutputs

Initializes the outputs for the fragment.

The outputs can only be initialized once for each fragment. Once the outputs are initialized, developers cannot change any of the outputs at runtime. This function will initialize the fragment to four outputs with the given types.

Parameters
[in]type1type of the first output.
[in]type2type of the second output.
[in]type3type of the third output.
[in]type4type of the forth output.
Returns
true on success, false otherwise.

◆ InitializeOutputs() [5/5]

FragmentGraphAPI bool InitializeOutputs

Initializes the outputs for the fragment.

The outputs can only be initialized once for each fragment. Once the outputs are initialized, developers cannot change any of the outputs at runtime. This function will initialize the fragment to n outputs with the given types.

Parameters
[in]numberOfOutputsthe number of outputs for this fragment.
[in]pOutputTypespointer to an array of the output types. This array must be the same size as numberOfOutputs.
Returns
true on success, false otherwise.