#include <c4d_fielddata.h>
Thread local information for this field sample invocation.
Public Member Functions | |
FieldInfo ()=default | |
FieldInfo (FieldInfo &&src) | |
~FieldInfo ()=default | |
MAXON_OPERATOR_MOVE_ASSIGNMENT (FieldInfo) | |
Bool | IsValid () const |
Bool | IsPopulated () const |
maxon::Result< void > | CopyFrom (const FieldInfo &src) |
Static Public Member Functions | |
static maxon::Result< FieldInfo > | Create (BaseList2D *caller, FIELDSAMPLE_FLAG callingFlags=FIELDSAMPLE_FLAG::VALUE) |
static maxon::Result< FieldInfo > | Create (BaseList2D *caller, const FieldInput &inputs, FIELDSAMPLE_FLAG callingFlags=FIELDSAMPLE_FLAG::VALUE, Int threadIndex=0, Int threadCount=0) |
static maxon::Result< FieldInfo > | Create (BaseList2D *caller, BaseDocument *doc, FIELDSAMPLE_FLAG callingFlags, const FieldInput &inputs) |
static maxon::Result< FieldInfo > | Create (const FieldCallerStack &caller, BaseDocument *doc, FIELDSAMPLE_FLAG callingFlags, const FieldInput &inputs) |
static FieldInfo | Create (FIELDSAMPLE_FLAG callingFlags, BaseThread *thread, BaseDocument *document, Int currentThreadIndex, Int threadCount, const FieldInput &inputs=FieldInput()) |
static maxon::Result< FieldInfo > | Create (FIELDSAMPLE_FLAG callingFlags, BaseThread *thread, BaseDocument *doc, Int currentThreadIndex, Int threadCount, const FieldInput &inputs, const FieldCallerStack &caller) |
static maxon::Result< FieldInfo > | Create (FIELDSAMPLE_FLAG callingFlags, BaseThread *thread, BaseDocument *doc, Int currentThreadIndex, Int threadCount, const FieldInput &inputs, const std::initializer_list< BaseList2D * > &callers) |
Public Attributes | |
FIELDSAMPLE_FLAG | _flags |
Int | _threadIndex |
Int | _totalThreadCount |
BaseThread * | _callerThread |
BaseDocument * | _doc |
FieldInput | _inputData |
FieldCallerStack | _callerStack |
Private Member Functions | |
MAXON_DISALLOW_COPY_AND_ASSIGN (FieldInfo) | |
|
default |
|
default |
MAXON_OPERATOR_MOVE_ASSIGNMENT | ( | FieldInfo | ) |
Bool IsValid | ( | ) | const |
Bool IsPopulated | ( | ) | const |
Checks if the FieldInfo is valid and non-empty (all content should be set and ready for sampling)
maxon::Result<void> CopyFrom | ( | const FieldInfo & | src | ) |
Copies content from the supplied FieldInfo.
[in] | src | The source info. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | caller | The caller object, should belong to the document being used. |
[in] | callingFlags | (Optional) The channel sampling flags expected to be used for sampling. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | caller | The caller object, should belong to the document being used. |
[in] | inputs | The inputs that will be sampled. |
[in] | callingFlags | (Optional) The channel sampling flags expected to be used for sampling. |
[in] | threadIndex | (Optional) Zero-based index of the thread within the current MP loop alternatively just 0 for the initial thread. |
[in] | threadCount | (Optional) Number of threads to be used, 0 or lower to automatically calculate for MP invocation. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | caller | The caller object, should belong to the document being used. |
[in] | doc | The document to sample. |
[in] | callingFlags | The channel sampling flags expected to be used for sampling. |
[in] | inputs | The inputs that will be sampled. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | caller | The caller stack object. |
[in] | doc | The document to sample. |
[in] | callingFlags | The channel sampling flags expected to be used for sampling. |
[in] | inputs | The inputs that will be sampled. |
|
static |
Creates an incomplete FieldInfo that the user has to fill in with a FieldCallerStack. This overload cannot fail.
[in] | callingFlags | The channels to sample. |
[in] | thread | The caller thread. |
[in] | document | The document to sample. |
[in] | currentThreadIndex | The thread index that will sample those points. |
[in] | threadCount | The total thread count. |
[in] | inputs | The full point list. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | callingFlags | The channels to sample. |
[in] | thread | The caller thread. |
[in] | doc | The document to sample. |
[in] | currentThreadIndex | The thread index that will sample those points. |
[in] | threadCount | The total thread count. |
[in] | inputs | The full point list. |
[in] | caller | The caller stack. |
|
static |
Creates a FieldInfo while relaying potential allocation errors. On error, the result will contain a default FieldInfo structure.
[in] | callingFlags | The channels to sample. |
[in] | thread | The caller thread. |
[in] | doc | The document to sample. |
[in] | currentThreadIndex | The thread index that will sample those points. |
[in] | threadCount | The total thread count. |
[in] | inputs | The full point list. |
[in] | callers | An initializer list to build the stack, first item is base of stack. |
|
private |
FIELDSAMPLE_FLAG _flags |
The current flags represent which channels are available and should be sampled.
Int _threadIndex |
The current thread index.
Int _totalThreadCount |
The number of threads active for this execution.
BaseThread* _callerThread |
The calling thread @required.
BaseDocument* _doc |
The calling document @required.
FieldInput _inputData |
The input data to be sampled, caller owns this object @required.
FieldCallerStack _callerStack |
A list of objects that called this calculation as well as an ID for the invocation chain, useful if you need to hash data to a specific caller, this uses the memory addresses of the callers so the value could change on undo/redo and will change on document load @required.