ChannelData Struct Reference

#include <c4d_shader.h>

Public Member Functions

 ChannelData ()
 ChannelData (BaseVolumeData *t_vd)
Int32 GetCurrentCPU ()

Public Attributes

Vector p
Vector n
Vector d
Float t
Int32 texflag
Float off
Float scale

Constructor & Destructor Documentation

§ ChannelData() [1/2]

Default constructor.

§ ChannelData() [2/2]

ChannelData ( BaseVolumeData t_vd)

Constructs a ChannelData that matches the current state of a BaseVolumeData.

[in]t_vdThe volume data to take p, n and d from. The caller owns the pointed volume data.

Member Function Documentation

§ GetCurrentCPU()

Int32 GetCurrentCPU ( )

Retrieves the current thread index on which the shader is executed.

GetCurrentCPU() exists as a member of ChannelData and VolumeData, both yielding the same results.
However if no VolumeData is present (and only then!) a channel shader calculation can also be called with ChannelData::vd set to nullptr.
In that case (or generally) use ChannelData::GetCurrentCPU().
The running thread index, which is guaranteed to be >= 0 and smaller than the thread count that was passed during InitRender().

Member Data Documentation

§ p

Vector p

[READ ONLY] The texture position in UVW coordinates.

§ n

Vector n

[READ ONLY] The surface normal.

§ d

Vector d

[READ ONLY] The MIP sample radius in UVW coordinates.

§ t

Float t

[READ ONLY] The current time in seconds.

§ texflag

Int32 texflag

[READ ONLY] The texture flags: TEX

§ vd

[READ ONLY] The volume information, can be nullptr.

§ off

Float off

§ scale

Float scale

[READ ONLY] The MIP blur offset.