-
首页
-
C4D R23.110 C++ SDK
FieldInput Struct Reference
#include <c4d_fielddata.h>
详细描述
The structure holding the arrays of points and optionally their directions to be sampled. Caller owns the pointed data and must ensure they are valid.
FieldInput
will not deallocate the data under any circumstance.
公共成员函数
|
|
FieldInput
()=default
|
|
FieldInput
(const
向量
&pos,
矩阵
transform=
矩阵
())
|
|
FieldInput
(const
向量
*pos,
Int
allocatedCount,
矩阵
transform=
矩阵
(),
Int
fullCount=0)
|
|
FieldInput
(const
向量
&pos, const
向量
&dir,
矩阵
transform=
矩阵
())
|
|
FieldInput
(const
向量
*pos, const
向量
*dir,
Int
allocatedCount,
矩阵
transform=
矩阵
(),
Int
fullCount=0)
|
|
FieldInput
(const
向量
&pos, const
向量
&dir, const
向量
&uvw,
矩阵
transform=
矩阵
())
|
|
FieldInput
(const
向量
*pos, const
向量
*dir, const
向量
*uvw,
Int
allocatedCount,
矩阵
transform=
矩阵
(),
Int
fullCount=0)
|
|
FieldInput
(const
向量
*pos, const
maxon::Block
< const
向量
> &dir, const
maxon::Block
< const
向量
> &uvw,
Int
allocatedCount,
矩阵
transform=
矩阵
(),
Int
fullCount=0)
|
|
FieldInput
(const
maxon::Block
< const
向量
> &pos, const
maxon::Block
< const
向量
> &dir, const
maxon::Block
< const
向量
> &uvw,
Int
allocatedCount,
矩阵
transform=
矩阵
(),
Int
fullCount=0)
|
|
~FieldInput
()=default
|
|
FieldInput
(const
FieldInput
&src)
|
|
FieldInput
(
FieldInput
&&src)
|
|
MAXON_OPERATOR_MOVE_ASSIGNMENT
(
FieldInput
)
|
|
MAXON_OPERATOR_COPY_ASSIGNMENT
(
FieldInput
)
|
void
|
CopyFromRaw
(const
FieldInput
&src)
|
FieldInput
|
GetSubBlock
(
Int
offset,
Int
blockSize=
FIELD_EXECUTION_BLOCK_SIZE
) const
|
Int
|
GetCount
() const
|
Int
|
GetOffset
() const
|
Bool
|
IsValid
() const
|
Bool
|
IsPopulated
() const
|
构造函数 & 析构函数文档编制
◆
FieldInput()
[1/11]
◆
FieldInput()
[2/11]
Constructor with single position value
-
参数
-
[in]
|
pos
|
The position.
|
[in]
|
transform
|
(Optional) The transform matrix required to convert the position and direction inputs to global space.
|
◆
FieldInput()
[3/11]
Constructor with position data only.
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
allocatedCount
|
The allocated length of the pos array.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
[in]
|
fullCount
|
The full position count if count was to big to allocate in pos. Will be allocatedCount unless specified otherwise.
|
◆
FieldInput()
[4/11]
Constructor with single position and direction
-
参数
-
[in]
|
pos
|
The position.
|
[in]
|
dir
|
The direction that the sample is facing in space.
|
[in]
|
transform
|
(Optional) The transform matrix required to convert the position and direction inputs to global space.
|
◆
FieldInput()
[5/11]
Constructor with position and direction data.
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
dir
|
The direction array to sample.
|
[in]
|
allocatedCount
|
The allocated length of the pos and dir arrays.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
[in]
|
fullCount
|
The full position count if count was to big to allocate in pos. Will be allocatedCount unless specified otherwise.
|
◆
FieldInput()
[6/11]
Constructor with single position, direction and UVW entry
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
dir
|
The direction array to sample.
|
[in]
|
uvw
|
The uvw array to sample.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
◆
FieldInput()
[7/11]
Constructor with position, direction and uvw data.
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
dir
|
The direction array to sample.
|
[in]
|
uvw
|
The uvw array to sample.
|
[in]
|
allocatedCount
|
The allocated length of the pos and dir arrays.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
[in]
|
fullCount
|
(optional) The full position count if count was to big to allocate in pos. Will be allocatedCount unless specified otherwise.
|
◆
FieldInput()
[8/11]
Constructor with position, direction and uvw data.
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
dir
|
The direction array to sample.
|
[in]
|
uvw
|
The uvw array to sample.
|
[in]
|
allocatedCount
|
The allocated length of the pos and dir arrays.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
[in]
|
fullCount
|
(optional) The full position count if count was to big to allocate in pos. Will be allocatedCount unless specified otherwise.
|
◆
FieldInput()
[9/11]
Constructor with position, direction and uvw data.
-
参数
-
[in]
|
pos
|
The position array to sample.
|
[in]
|
dir
|
The direction array to sample.
|
[in]
|
uvw
|
The uvw array to sample.
|
[in]
|
allocatedCount
|
The allocated length of the pos and dir arrays.
|
[in]
|
transform
|
The transform matrix required to convert the position and direction inputs to global space.
|
[in]
|
fullCount
|
(optional) The full position count if count was to big to allocate in pos. Will be allocatedCount unless specified otherwise.
|
◆
~FieldInput()
Destructor.
FieldInput
owns no memory.
◆
FieldInput()
[10/11]
Copy constructor NOTE: This performs a dumb raw copy of the
FieldInput
instance. I.e. internal pointers will be copied and point to the content of the original owner. Field point never owns the data, this is why a standard CopyFrom is not part of this class.
-
参数
-
◆
FieldInput()
[11/11]
Move constructor
-
参数
-
成员函数文档编制
◆
MAXON_OPERATOR_MOVE_ASSIGNMENT()
◆
MAXON_OPERATOR_COPY_ASSIGNMENT()
◆
CopyFromRaw()
Performs a raw copy of the the
FieldInput
described by src. Equivalent to copy construction. NOTE: this is not a CopyFrom, see copy constructor note above.
-
参数
-
[in]
|
src
|
Source for the duplication.
|
◆
GetSubBlock()
Return a
FieldInput
struct for a subset of the original array. This can be used to pass smaller blocks to the field processing threads.
-
参数
-
[in]
|
offset
|
The subblock start offset in the full array (0 based).
|
[in]
|
blockSize
|
The size of the desired subblock.
|
-
返回
-
The sub
FieldInput
structure. Will be empty if request is out of bounds.
◆
GetCount()
Gets the number of elements in the
FieldInput
-
返回
-
The count.
◆
GetOffset()
Gets the offset of the first element in the full arrays.
-
返回
-
The offset.
◆
IsValid()
Checks if the
FieldInput
allocations and sizes are valid. Empty
FieldInput
is considered valid.
◆
IsPopulated()
Bool
IsPopulated
|
(
|
|
)
|
const
|
Checks if the
FieldInput
is valid and non-empty.
Member Data Documentation
◆
_position
The position values for the array of points, if this is a sub-block then element 0 is at _blockOffset within the larger array, caller owns this array, size must match or be greater than count value @required.
◆
_direction
The (optional) direction values for the array of points, if this is a sub-block then element 0 is at _blockOffset within the larger array, caller owns this array, size must match or be greater than count value.
◆
_uvw
The (optional) uvw values for the array of points, if this is a sub-block then element 0 is at _blockOffset within the larger array, caller owns this array, size must match or be greater than count value.
◆
_blockCount
The number of elements in the array to be processed (for this processing block, this should be treated as the count to use when iterating over elements in
FieldObject
and
FieldLayer
.
◆
_blockOffset
The offset (starting point) of the elements if a portion of a larger array, used e.g. to get the actual index in the array actualIndex = index - points._blockOffset;.
◆
_fullArraySize
The full size of the source data, this may be larger than blockCount, also might be larger then the size of the allocated pointers within the
FieldInput
class. Do no use this size to browse the arrays!
◆
_transform
The transform matrix for the points in the input block, use this to bring the _position and _direction arrays into world space or the local space of your
FieldObject
.
◆
_allocatedArraySize
The allocated size of the vector arrays. Use this with _blockOffset to browse all the input vectors safely. Might be larger than blockCount.