FieldShared Struct Reference

#include <c4d_fielddata.h>

Detailed Description

Input-output structure used to share some data between fields. NOTE: to avoid multi-threading issues, it is not allowed to write to it during Sampling (Sample method) calls. Most uses should write to it during FreeSampling.

Public Types

typedef maxon::StrongRef< maxon::BlockArray< Float > > ValueArrayRef
 
typedef maxon::StrongRef< BaseContainerCustomDataRef
 

Public Member Functions

 FieldShared ()=default
 
 ~FieldShared ()=default
 
 FieldShared (FieldShared &&src)
 
 MAXON_OPERATOR_MOVE_ASSIGNMENT (FieldShared)
 
void Flush ()
 
maxon::Result< void > CopyFrom (const FieldShared &src)
 
void ResetDirty ()
 

Public Attributes

ValueArrayRef _finalOutput
 
UInt32 _finalOutputDirty
 
CustomDataRef _customData
 
UInt32 _customDataDirty
 

Private Member Functions

 MAXON_DISALLOW_COPY_AND_ASSIGN (FieldShared)
 

Member Typedef Documentation

◆ ValueArrayRef

◆ CustomDataRef

Used for sharing very specific data that most fields won't use. The BaseContainer allows sharing more complex data types.

Constructor & Destructor Documentation

◆ FieldShared() [1/2]

FieldShared ( )
default

Empty constructor.

◆ ~FieldShared()

~FieldShared ( )
default

Destructor.

◆ FieldShared() [2/2]

FieldShared ( FieldShared &&  src)

Move constructor

Parameters
[in]srcMove source.

Member Function Documentation

◆ MAXON_OPERATOR_MOVE_ASSIGNMENT()

MAXON_OPERATOR_MOVE_ASSIGNMENT ( FieldShared  )

◆ Flush()

void Flush ( )

Resets the shared data and deallocates the memory.

◆ CopyFrom()

maxon::Result<void> CopyFrom ( const FieldShared src)

Copies from the FieldShared described by src.

Parameters
[in]srcSource for the duplication.
Returns
OK on success.

◆ ResetDirty()

void ResetDirty ( )

Resets the dirty counts/flags to non dirty. Should be done before shared data is used for any sampling to allow layers to update data within correctly.

◆ MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( FieldShared  )
private

Member Data Documentation

◆ _finalOutput

ValueArrayRef _finalOutput

◆ _finalOutputDirty

UInt32 _finalOutputDirty

Used for saving a field list's final output. Can be reused on next eval.

◆ _customData

CustomDataRef _customData

◆ _customDataDirty

UInt32 _customDataDirty