#include <c4d_basechannel.h>
Represents a channel in a material. Call BaseMaterial::GetChannel() to retrieve an instance.
私有成员函数 |
|
BaseChannel () | |
~BaseChannel () |
Alloc/Free |
|
static BaseChannel * | Alloc (void) |
static void | Free ( BaseChannel *&bc) |
Init/Free Texture |
|
INITRENDERRESULT | InitTexture (const InitRenderStruct &irs) |
void | FreeTexture (void) |
Get/Set Data |
|
BaseContainer | GetData (void) |
void | SetData (const BaseContainer &ct) |
Shader/Bitmap Access |
|
Int32 | GetShaderID (void) |
BaseShader * | GetShader (void) |
BaseBitmap * | GetBitmap (void) |
采样 |
|
向量 | Sample ( VolumeData *vd, 向量 *p, 向量 *delta, 向量 *n, Float t, Int32 tflag, Float off, Float scale) |
杂项 |
|
Bool | 比较 ( BaseChannel *dst) |
Bool | Attach ( GeListNode *element) |
|
|
|
static |
Allocates a channel. Destroy the allocated channel with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs channels allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
[in] | bc | The channel to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
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 | ( | void | ) |
Frees all resources used by this channel.
BaseContainer GetData | ( | void | ) |
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 | ( | void | ) |
Gets the ID of the shader.
BaseShader * GetShader | ( | void | ) |
Retrieves the shader of a channel.
BaseBitmap * GetBitmap | ( | void | ) |
Retrieves the bitmap of a texture image.
向量 Sample | ( | VolumeData * | vd , |
向量 * | p , | ||
向量 * | delta , | ||
向量 * | 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 比较 | ( | BaseChannel * | dst | ) |
Checks if
*this
类似
*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 .