#include <c4d_fieldplugin.h>
公共成员函数
|
|
FieldLayerData
()
|
virtual
maxon::Result
< void >
|
InitSampling
(
FieldLayer
&layer, const
FieldInfo
&info,
FieldShared
&shared)
|
virtual
maxon::Result
< void >
|
Sample
(const
FieldLayer
&layer, const
FieldInput
&inputs,
FieldOutputBlock
&outputs, const
FieldInfo
&info) const =0
|
virtual
maxon::Result
< void >
|
Aggregate
(const
FieldLayer
&layer, const
FieldInput
&inputs, const
FieldOutputBlock
&outputs, const
FieldInfo
&info)
|
virtual void
|
FreeSampling
(
FieldLayer
&layer, const
FieldInfo
&info,
FieldShared
&shared)
|
virtual
Bool
|
IsEqual
(const
FieldLayer
&layer, const
FieldLayerData
&comp) const
|
virtual
FieldLayerLink
|
GetLinkedObject
(const
FieldLayer
&layer,
BaseDocument
*doc) const
|
virtual
Bool
|
SetLinkedObject
(
FieldLayer
&layer, const
FieldLayerLink
&link)
|
virtual void
|
CheckDirty
(
FieldLayer
&layer,
BaseDocument
*doc)
|
|
NodeData
()
|
GeListNode
*
|
Get
(void) const
|
virtual
Bool
|
消息
(
GeListNode
*node,
Int32
type, void *data)
|
virtual void
|
GetBubbleHelp
(
GeListNode
*node,
maxon::String
&str)
|
virtual
BaseDocument
*
|
GetDocument
(
GeListNode
*node)
|
virtual
Int32
|
GetBranchInfo
(
GeListNode
*node,
BranchInfo
*info,
Int32
max,
GETBRANCHINFO
flags)
|
virtual
Bool
|
IsInstanceOf
(const
GeListNode
*node,
Int32
type) const
|
virtual
Bool
|
IsDocumentRelated
(const
GeListNode
*node,
Bool
&docrelated) const
|
virtual
Bool
|
Init
(
GeListNode
*node)
|
virtual void
|
Free
(
GeListNode
*node)
|
virtual
Bool
|
读取
(
GeListNode
*node,
HyperFile
*hf,
Int32
level)
|
virtual
Bool
|
Write
(
GeListNode
*node,
HyperFile
*hf)
|
virtual
Bool
|
CopyTo
(
NodeData
*dest,
GeListNode
*snode,
GeListNode
*dnode,
COPYFLAGS
flags,
AliasTrans
*trn)
|
virtual
Bool
|
GetDDescription
(
GeListNode
*node,
描述
*description,
DESCFLAGS_DESC
&flags)
|
virtual
Bool
|
GetDParameter
(
GeListNode
*node, const
DescID
&id,
GeData
&t_data,
DESCFLAGS_GET
&flags)
|
virtual
Bool
|
SetDParameter
(
GeListNode
*node, const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_SET
&flags)
|
virtual
Bool
|
GetDEnabling
(
GeListNode
*node, const
DescID
&id, const
GeData
&t_data,
DESCFLAGS_ENABLE
flags, const
BaseContainer
*itemdesc)
|
virtual
Bool
|
TranslateDescID
(
GeListNode
*node, const
DescID
&id,
DescID
&res_id,
C4DAtom
*&res_at)
|
|
BaseData
()
|
virtual
|
~BaseData
(void)
|
void
|
Destructor
(void)
|
构造函数 & 析构函数文档编制
◆
FieldLayerData()
Default constructor.
-
由于
-
R17.032
成员函数文档编制
◆
MAXON_DISALLOW_COPY_AND_ASSIGN()
◆
InitSampling()
Called to allow you to initialize any memory or values prior to sampling for the sake of speed. This function is single threaded.
-
参数
-
[in]
|
layer
|
The layer a convenience value, equivalent to
Get()
.
|
[in]
|
info
|
The information used for sampling within this core.
|
[in,out]
|
shared
|
Shared data between layers/fields.
|
-
返回
-
OK on success, error will cancel sampling.
◆
Sample()
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.
-
参数
-
[in]
|
layer
|
The layer a convenience value, equivalent to
Get()
.
|
[in]
|
inputs
|
The spacial points being sampled.
|
[in,out]
|
outputs
|
The output arrays to modify, this will have content already from prior layers.
|
[in]
|
info
|
The information used for sampling within this core.
|
-
返回
-
OK on success.
◆
Aggregate()
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.
-
参数
-
[in]
|
layer
|
The layer a convenience value, equivalent to
Get()
.
|
[in]
|
inputs
|
The spacial points being sampled.
|
[in]
|
outputs
|
The output arrays to modify, this will have content already from prior layers.
|
[in]
|
info
|
The information used for sampling within this core.
|
-
返回
-
OK on success.
◆
FreeSampling()
Called after sampling in order to allow you to clean up any memory utilized by your sampling algorithm. This function is single threaded.
-
参数
-
[in]
|
layer
|
The layer a convenience value, equivalent to
Get()
.
|
[in]
|
info
|
The information used for sampling within this core.
|
[in,out]
|
shared
|
Shared data between layers/fields.
|
◆
IsEqual()
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.
-
参数
-
[in]
|
layer
|
The layer a convenience value, equivalent to
Get()
.
|
[in]
|
comp
|
The layer data to compare with.
|
-
返回
-
true if equal, false if not.
◆
GetLinkedObject()
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.
-
参数
-
[in]
|
layer
|
The layer, a convenience function the same as
Get()
.
|
[in]
|
doc
|
The document.
|
-
返回
-
A filled in FiledLayerLink structure containing passed BaseList and secondary data.
◆
SetLinkedObject()
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.
-
参数
-
[in]
|
layer
|
The layer.
|
[in]
|
link
|
The 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.
|
-
返回
-
True if it succeeds, false if it fails and the object cannot receive the passed information (or it is incorrect).
◆
CheckDirty()
Called to update the dirtiness of the Fieldlayer. Use layer->SetDirty(FLAGS) to set the dirtiness as required
-
参数
-
[in]
|
layer
|
The layer.
|
[in]
|
doc
|
The document.
|