#include <c4d_basechannel.h>
Represents a channel in a material. Call BaseMaterial::GetChannel() to retrieve an instance.
Private Member Functions | |
BaseChannel () | |
~BaseChannel () | |
Alloc/Free | |
static BaseChannel * | Alloc () |
static void | Free (BaseChannel *&bc) |
Init/Free Texture | |
INITRENDERRESULT | InitTexture (const InitRenderStruct &irs) |
void | FreeTexture () |
Get/Set Data | |
BaseContainer | GetData () |
void | SetData (const BaseContainer &ct) |
Shader/Bitmap Access | |
Int32 | GetShaderID () |
BaseShader * | GetShader () |
BaseBitmap * | GetBitmap () |
Sampling | |
Vector | Sample (VolumeData *vd, Vector *p, Vector *delta, Vector *n, Float t, Int32 tflag, Float off, Float scale) |
Miscellaneous | |
Bool | Compare (BaseChannel *dst) |
Bool | Attach (GeListNode *element) |
|
private |
|
private |
|
static |
|
static |
INITRENDERRESULT InitTexture | ( | const InitRenderStruct & | irs | ) |
Initializes the channel texture, loading any files required.
[in] | irs | A structure with information about the upcoming rendering. |
void FreeTexture | ( | ) |
Frees all resources used by this channel.
BaseContainer GetData | ( | ) |
Gets the settings container for the channel with these IDs: BASECHANNEL
void SetData | ( | const BaseContainer & | ct | ) |
Sets the settings for this channel.
[in] | ct | The settings container for the channel with these IDs: BASECHANNEL |
Int32 GetShaderID | ( | ) |
Gets the ID of the shader.
BaseShader* GetShader | ( | ) |
Retrieves the shader of a channel.
BaseBitmap* GetBitmap | ( | ) |
Retrieves the bitmap of a texture image.
Vector Sample | ( | VolumeData * | vd, |
Vector * | p, | ||
Vector * | delta, | ||
Vector * | n, | ||
Float | t, | ||
Int32 | tflag, | ||
Float | off, | ||
Float | scale | ||
) |
Retrieves the color vector for a position in the texture.
[in] | vd | A pointer to the structure containing information for volumetric shaders. This can be nullptr for evaluation of a preview image. The caller owns the pointed VolumeData. |
[in] | p | The UVW coordinate to sample the color value for in world coordinates. The caller owns the pointed Vector. |
[in] | delta | The MIP sample radius in UVW coordinates. The caller owns the pointed Vector. |
[in] | n | The surface normal at the UVW coordinate for the sample. The caller owns the pointed Vector. |
[in] | t | The current time in seconds. |
[in] | tflag | The texture flags: TEX |
[in] | off | The MIP blur offset. |
[in] | scale | The MIP blur scale. |
Bool Compare | ( | BaseChannel * | dst | ) |
Checks if *this
is similar to *dst. For plugin shaders this means an automatic comparison of container values.
[in] | dst | The channel to compare with. The caller owns the pointed channel. |
Bool Attach | ( | GeListNode * | element | ) |
Private.