FieldLayerData Class Referenceabstract

#include <c4d_fieldplugin.h>

Inheritance diagram for FieldLayerData:

Public Member Functions

 FieldLayerData ()
 
virtual maxon::Result< maxon::Tuple< maxon::GenericData, Int32 > > InitSampling (const FieldLayer &layer, const FieldInfo &info) const
 
virtual maxon::Result< void > Sample (const FieldLayer &layer, const FieldInput &inputs, FieldOutputBlock &outputs, const FieldInfo &info, const maxon::GenericData &extraData) const =0
 
virtual maxon::Result< void > Aggregate (const FieldLayer &layer, const FieldInput &inputs, const FieldOutputBlock &outputs, const FieldInfo &info, const maxon::GenericData &extraData) const
 
virtual void FreeSampling (const FieldLayer &layer, const FieldInfo &info, maxon::GenericData &extraData) const
 
virtual Bool IsEqual (const FieldLayer &layer, const FieldLayerData &comp) const
 
virtual FieldLayerLink GetLinkedObject (const FieldLayer &layer, const BaseDocument *doc) const
 
virtual Bool SetLinkedObject (FieldLayer &layer, const FieldLayerLink &link)
 
virtual void CheckDirty (FieldLayer &layer, const BaseDocument *doc)
 
virtual maxon::Result< BoolGetAccessedObjectsForSampling (const FieldLayer &layer, const BaseList2D *caller, AccessedObjectsCallback &access) const
 
- Public Member Functions inherited from NodeData
 NodeData ()
 
GeListNodeGet ()
 
const GeListNodeGet () const
 
virtual Bool Message (GeListNode *node, Int32 type, void *data)
 
virtual void GetBubbleHelp (GeListNode *node, maxon::String &str)
 
virtual const BaseDocumentGetDocument (const GeListNode *node) const
 
virtual maxon::Result< BoolGetBranchInfo (const GeListNode *node, const maxon::ValueReceiver< const BranchInfo & > &info, GETBRANCHINFO flags) const
 
virtual Bool IsInstanceOf (const GeListNode *node, Int32 type) const
 
virtual Bool IsDocumentRelated (const GeListNode *node, Bool &docrelated) const
 
virtual maxon::Result< BoolGetAccessedObjects (const BaseList2D *node, METHOD_ID method, AccessedObjectsCallback &access) const
 
virtual maxon::Result< maxon::GenericDataGroupChanges (BaseList2D *node)
 
virtual Bool Init (GeListNode *node, Bool isCloneInit)
 
virtual void Free (GeListNode *node)
 
virtual Bool Read (GeListNode *node, HyperFile *hf, Int32 level)
 
virtual Bool Write (const GeListNode *node, HyperFile *hf) const
 
virtual Bool CopyTo (NodeData *dest, const GeListNode *snode, GeListNode *dnode, COPYFLAGS flags, AliasTrans *trn) const
 
virtual Bool GetDDescription (const GeListNode *node, Description *description, DESCFLAGS_DESC &flags) const
 
virtual Bool GetDParameter (const GeListNode *node, const DescID &id, GeData &t_data, DESCFLAGS_GET &flags) const
 
virtual Bool SetDParameter (GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_SET &flags)
 
virtual Bool GetDEnabling (const GeListNode *node, const DescID &id, const GeData &t_data, DESCFLAGS_ENABLE flags, const BaseContainer *itemdesc) const
 
virtual Bool TranslateDescID (GeListNode *node, const DescID &id, DescID &res_id, C4DAtom *&res_at)
 
- Public Member Functions inherited from BaseData
virtual ~BaseData ()
 
void Destructor ()
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (FieldLayerData)
 

Additional Inherited Members

- Protected Attributes inherited from NodeData
GeListNodeprivate_link
 

Constructor & Destructor Documentation

◆ FieldLayerData()

Default constructor.

Since
R17.032

Member Function Documentation

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( FieldLayerData  )
private

◆ InitSampling()

virtual maxon::Result<maxon::Tuple<maxon::GenericData, Int32> > InitSampling ( const FieldLayer layer,
const FieldInfo info 
) const
virtual

Called to allow you to initialize any memory or values prior to sampling for the sake of speed. This function is single threaded.

Parameters
[in]layerThe layer a convenience value, equivalent to Get().
[in]infoThe information used for sampling within this core.
Returns
OK on success, error will cancel sampling.

◆ Sample()

virtual maxon::Result<void> Sample ( const FieldLayer layer,
const FieldInput inputs,
FieldOutputBlock outputs,
const FieldInfo info,
const maxon::GenericData extraData 
) const
pure virtual

Called to modify the passed output values. This is the central purpose of the layer and as a requirement for the layer to function. It is critical that this function is as fast as possible and avoids too many memory operations. This function operates within a multithreaded environment and as such it is important to pay attention to the thread information passed within the supplied 'info' FieldInfo structure in order to avoid garbled output. NOTE: Sample does not receive the SharedData. If a layer needs access to it, it can keep a reference on it or copy parts of it in InitSampling.

Parameters
[in]layerThe layer a convenience value, equivalent to Get().
[in]inputsThe spacial points being sampled.
[in,out]outputsThe output arrays to modify, this will have content already from prior layers.
[in]infoThe information used for sampling within this core.
Returns
OK on success.

◆ Aggregate()

virtual maxon::Result<void> Aggregate ( const FieldLayer layer,
const FieldInput inputs,
const FieldOutputBlock outputs,
const FieldInfo info,
const maxon::GenericData extraData 
) const
virtual

This function requires the FIELDLAYER_AGGREGATE registration flag to be set. This function receives the final output of the FieldLayers and is called at the end of each thread/block to allow the layer to Aggregate this output for it's own storage purposes or do per block cleanup as required.

Parameters
[in]layerThe layer a convenience value, equivalent to Get().
[in]inputsThe spacial points being sampled.
[in]outputsThe output arrays to modify, this will have content already from prior layers.
[in]infoThe information used for sampling within this core.
Returns
OK on success.

◆ FreeSampling()

virtual void FreeSampling ( const FieldLayer layer,
const FieldInfo info,
maxon::GenericData extraData 
) const
virtual

Called after sampling in order to allow you to clean up any memory utilized by your sampling algorithm. This function is single threaded.

Parameters
[in]layerThe layer a convenience value, equivalent to Get().
[in]infoThe information used for sampling within this core.

◆ IsEqual()

virtual Bool IsEqual ( const FieldLayer layer,
const FieldLayerData comp 
) const
virtual

Query if 'layer' is equal to the passed 'comp' layer. This is mandatory to fill in, if a comparison is not correctly done then any changes made by the developer or user will not be stored within the GUI.

Parameters
[in]layerThe layer a convenience value, equivalent to Get().
[in]compThe layer data to compare with.
Returns
true if equal, false if not.

◆ GetLinkedObject()

virtual FieldLayerLink GetLinkedObject ( const FieldLayer layer,
const BaseDocument doc 
) const
virtual

In a situation where the layer is a wrapper around another object, for example the built in FieldObject layers, this allows the layer to return it's linked object to the Layer GUI for dirty checks so that the owner of the GUI can update when for example an object that's linked moves.

Parameters
[in]layerThe layer, a convenience function the same as Get().
[in]docThe document.
Returns
A filled in FiledLayerLink structure containing passed BaseList and secondary data.

◆ SetLinkedObject()

virtual Bool SetLinkedObject ( FieldLayer layer,
const FieldLayerLink link 
)
virtual

This function is invoked to set the linked object. The passed structure corresponds to the data that might be found in a Drag & Drop invocation.

Parameters
[in]layerThe layer.
[in]linkThe link data containing the object and/or any secondary information that may be required, e.g. DescID from a DescID drag&drop into the Fields GUI.
Returns
True if it succeeds, false if it fails and the object cannot receive the passed information (or it is incorrect).

◆ CheckDirty()

virtual void CheckDirty ( FieldLayer layer,
const BaseDocument doc 
)
virtual

Called to update the dirtiness of the Fieldlayer. Use layer->SetDirty(FLAGS) to set the dirtiness as required

Parameters
[in]layerThe layer.
[in]docThe document.

◆ GetAccessedObjectsForSampling()

virtual maxon::Result<Bool> GetAccessedObjectsForSampling ( const FieldLayer layer,
const BaseList2D caller,
AccessedObjectsCallback access 
) const
virtual