-
首页
-
C4D R23.110 C++ SDK
FieldOutputBlock Struct Reference
#include <c4d_fielddata.h>
详细描述
FieldOutput
sub block class.
FieldOutputBlock
never own the memory of the sampling arrays, it is owned by the
FieldOutput
structure. Lifetime of a block is the same as its owner. Resizing, resetting the owner, or any other operation that will have the owner reallocate or deallocate memory will invalidate the blocks.
构造函数 & 析构函数文档编制
◆
FieldOutputBlock()
[1/2]
Creates and empty sampling block, with not data.
◆
FieldOutputBlock()
[2/2]
Move construction. Does not actually steal anything as
FieldOutputBlock
never owns the memory.
-
参数
-
[in]
|
moveRef
|
The source sample.
|
成员函数文档编制
◆
MAXON_OPERATOR_MOVE_ASSIGNMENT()
◆
GetSubBlock()
Gets a sub-section of "this" which can be indexed from 0 to "blockSize".
-
参数
-
[in]
|
offset
|
The offset index to retrieve a sub-block starting at.
|
[in]
|
blockSize
|
Suggested size of the block, will be clamped against the maximum number of entries.
|
-
返回
-
The sub block.
◆
Reset()
Resets the
FieldOutputBlock
to default state (i.e. null count, no owner, no data, empty).
◆
GetCount()
Gets the number of elements in the sub block.
-
返回
-
The count.
◆
GetFullCount()
Int
GetFullCount
|
(
|
|
)
|
const
|
Gets the number of elements used in the owning
FieldOutput
.
-
返回
-
The count.
◆
GetOffset()
Gets the offset of the sub block in the
FieldOutput
.
-
返回
-
The offset.
◆
GetOwner()
Returns the owner
FieldOutput
.
◆
CopyFrom()
Copies from the
FieldOutputBlock
described by src. Note that
FieldOutputBlock
never owns the arrays, so the copy only copies the raw pointers.
-
参数
-
[in]
|
src
|
Source for the duplication.
|
◆
CopyArrayContentFrom()
Copies from the
FieldOutput
array content from src. Block size and flags will not be affected by this action. The destination allocated size must be big enough to accept the full content of the src block. Destination block will own memory if it is a normal block or not own it if it is a subblock.
-
参数
-
[in]
|
src
|
Source for the duplication.
|
-
返回
-
OK on success.
◆
ClearMemory()
[1/2]
void ClearMemory
|
(
|
Bool
|
deactivatedOnly
=
true
,
|
|
|
Bool
|
deactivatedState
=
false
|
|
)
|
|
|
Reset the sample's data to default values, optionally only the deactivated content too. Values are reset to 0, colors to 1.0, direction to 0, deactivated to 0.
-
参数
-
[in]
|
deactivatedOnly
|
True to deactivated only.
|
[in]
|
deactivatedState
|
(Optional) The state the deactivated should be cleared to
|
◆
ClearMemory()
[2/2]
void ClearMemory
|
(
|
Int
|
startIdx
,
|
|
|
Int
|
count
,
|
|
|
Bool
|
deactivatedOnly
,
|
|
|
Bool
|
deactivatedState
|
|
)
|
|
|
Reset the sample's data to default values, optionally only the deactivated content too. Values are reset to 0, colors to 1.0, direction to 0, deactivated to 0.
-
参数
-
[in]
|
startIdx
|
Array clear start index.
|
[in]
|
count
|
Number of array items to reset to default value.
|
[in]
|
deactivatedOnly
|
True to deactivated only.
|
[in]
|
deactivatedState
|
(Optional) The state the deactivated should be cleared to
|
◆
ClearDeactivated()
void ClearDeactivated
|
(
|
Bool
|
state
=
false
|
)
|
|
Clears the deactivated array.
◆
CalculateCrc()
Calculates a crc on all internal data using
maxon::Crc32C
. Crc is not kept internally and will be calculated from scratch on each CalculateCrc call.
-
返回
-
The crc.
◆
IsValid()
Checks if the
FieldOutputBlock
allocations and sizes are valid (empty is considered valid).
◆
IsPopulated()
Bool
IsPopulated
|
(
|
|
)
|
const
|
Checks if the
FieldOutputBlock
is valid and non-empty.
◆
MAXON_DISALLOW_COPY_AND_ASSIGN()
Friends And Related Function Documentation
◆
FieldOutput::GetBlock
◆
FieldOutput::GetSubBlock
Member Data Documentation
◆
_value
◆
_alpha
The weight value at this point in space.
◆
_color
The alpha value for color and direction at this point in space, only available when color or direction are allocated.
◆
_direction
The color at this point in space.
◆
_rotation
The slope at this point in space.
◆
_pivot
The rotational velocity (axle + magnitude)
◆
_deactivated
The rotational pivot point in space.
◆
_count
The deactivated state for this point (i.e. cut from interior shape will be true) this skips remapping.
◆
_offset
The number of elements in the sample arrays.
◆
_owner
Data offset in the original arrays (owner).