#include <c4d_shader.h>

Public Attributes | |
| Int32 | version | 
| Int32 | fps | 
| Vector | ambient | 
| Float | time | 
| Vector | col | 
| Vector | trans | 
| Vector | refl | 
| Float | alpha | 
| Ray * | tray | 
| Ray * | rray | 
| Vector64 | p | 
| Vector64 | bumpn | 
| Ray * | ray | 
| Vector64 | orign | 
| Vector64 | n | 
| Vector64 | dispn | 
| Float64 | dist | 
| Float64 | cosc | 
| Vector | uvw | 
| Vector | delta | 
| RayHitID | lhit | 
| const TexData * | tex | 
| Vector | ddu | 
| Vector | ddv | 
| Int32 | raydepth | 
| Int32 | calc_trans | 
| Int32 | calc_refl | 
| Bool | calc_shadow | 
| Int32 | calc_illum | 
| Int32 | calc_mip | 
| Vector | pp [3] | 
| Vector | nn [3] | 
| RAYBIT | raybits | 
| const RayLight * | xlight | 
| const RayObject * | op | 
| Int32 | recursion_id | 
| void * | recursion_data | 
| Multipass * | multipass | 
| Vector | back_p | 
| Vector | back_delta | 
| Float | global_mip | 
| Int32 | sid | 
| Float | par_u | 
| Float | par_v | 
| SurfaceIntersection * | intersection | 
| Float | mb_offset | 
| Vector | comp_color | 
| Vector | comp_specular | 
| Vector | comp_luminance | 
| TexEntry * | rtex [4] | 
| Int32 | rtex_count | 
| Int32 | elementIndex | 
| const RayPolyWeight * | displacementWeight | 
Protected Member Functions | |
| BaseVolumeData () | |
      
  | 
  protected | 
| Int32 version | 
[READ ONLY] The version number of the structure.
| Int32 fps | 
[READ ONLY] The frames per second.
| Vector ambient | 
[READ ONLY] The global ambient component.
| Float time | 
[READ ONLY] The current time in seconds.
| Vector col | 
[READ WRITE] Set the calculated color within MaterialData::CalcSurface() and MaterialData::CalcVolumetric().
| Vector trans | 
[READ WRITE] Set the calculated transparency within MaterialData::CalcSurface(), MaterialData::CalcTransparency() and MaterialData::CalcVolumetric().
| Vector refl | 
[READ WRITE] Set the calculated reflection within MaterialData::CalcSurface().
| Float alpha | 
[READ WRITE] Set the calculated alpha within MaterialData::CalcAlpha().
| Ray* tray | 
[READ WRITE] The transmitted vector (can be modified in MaterialData::ChangeNormal()), only valid if shader sets VOLUMEINFO::TRANSPARENCY and only during MaterialData::CalcSurface().
| Ray* rray | 
[READ WRITE] The reflected vector (can be modified in MaterialData::ChangeNormal()), only valid if shader sets VOLUMEINFO::REFLECTION and only during MaterialData::CalcSurface().
| Vector64 p | 
[READ WRITE] The surface point, this can only be modified by MaterialData::Displace().
| Vector64 bumpn | 
[READ WRITE] The surface phong and bump normal.
| Ray* ray | 
[READ ONLY] The current eye ray. Always valid, not nullptr.
| Vector64 orign | 
[READ ONLY] The original surface normal.
| Vector64 n | 
[READ ONLY] The surface phong normal.
| Vector64 dispn | 
[READ ONLY] The suggested displacement direction.
| Float64 cosc | 
[READ ONLY] The angle between ray vector and unbumped normal.
| Vector uvw | 
[READ ONLY] The surface UVW coordinates, this is invalid for volumetric shaders.
| Vector delta | 
[READ ONLY] The MIP sample radius. Defines the radius for the area around UVW that needs to be sampled.
If this value is ignored by a shader, it will work, but produce aliasing artefacts. 
| RayHitID lhit | 
[READ ONLY] The surface identity.
| const TexData* tex | 
[READ ONLY] The surface texture, never change this pointer.
| Vector ddu | 
[READ ONLY] U direction vector perpendicular to n; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.
| Vector ddv | 
[READ ONLY] V direction vector perpendicular to n; can be used for bump mapping if VOLUMEINFO::DUDVREQUIRED is set.
| Int32 raydepth | 
[READ ONLY] The depth of the actual ray.
| Int32 calc_trans | 
[READ ONLY] Specifies if transparency will be rendered:
| Int32 calc_refl | 
[READ ONLY] Specifies if reflections will be rendered:
| Bool calc_shadow | 
[READ ONLY] Specifies, if shadows will be rendered.
| Int32 calc_illum | 
[READ ONLY] Specifies, if illumination will be rendered.
If this value is 0 then VolumeData::CalcSurface() should directly return the surface color without illumination (also, no bump mapping is needed in VolumeData::ChangeNormal() etc.). This technique is used for some types of objects like the sky. Illuminance1 automatically takes care of calc_illum. 
| Int32 calc_mip | 
[READ ONLY] Specifies if MIP calculations will be done.
If this value is 0 then no MIP mapping needs to be calculated. calc_mip can in some cases be false, even if the shader sets VOLUMEINFO::MIPSAT::
 If calc_mip is false you should not access MIP/SAT variables such as delta etc. 
| Vector pp[3] | 
[READ ONLY] MIP corner points in global space.
| Vector nn[3] | 
[READ ONLY] MIP normals of the three other corner points.
| const RayLight* xlight | 
The light source during shadow evaluation. Can be nullptr, always check.
| const RayObject* op | 
The object. Can be nullptr, always check.
| Int32 recursion_id | 
[READ WRITE] The plugin ID of data passed through recursion.
| void* recursion_data | 
[READ WRITE] The address of data passed through recursion.
| Multipass* multipass | 
[READ WRITE] To be filled for multipasses.
| Vector back_p | 
[READ ONLY] The back-projected point (StickTextureTag) will be generated if the shader sets the flag VOLUMEINFO::TRANSFORM or SHADERINFO::TRANSFORM for a channel shader.
| Vector back_delta | 
[READ ONLY] This the 'spot size' (MIP mapping value) for the back-projected point.
The back-projected point (StickTextureTag) will be generated if the shader sets the flag VOLUMEINFO::TRANSFORM (or SHADERINFO::TRANSFORM if it is a channel shader). 
| Float global_mip | 
[READ ONLY] The global MIP scale.
| Int32 sid | 
[READ ONLY] Sub-polygon ID (only used for SPD).
| Float par_u | 
[READ ONLY] Barycentric U coordinate (only used for SPD).
| Float par_v | 
[READ ONLY] Barycentric U coordinate (only used for SPD).
| SurfaceIntersection* intersection | 
[READ ONLY] The intersection data. Can be nullptr, always check.
| Float mb_offset | 
[READ ONLY] The motion blur time offset. (Between 0.0 and 1.0, only valid in Physical Render.)
| Vector comp_color | 
[READ WRITE] The diffuse component of the calculated color.
| Vector comp_specular | 
[READ WRITE] The specular component of the calculated color.
| Vector comp_luminance | 
[READ WRITE] The luminance component of the calculated color.
| TexEntry* rtex[4] | 
[READ ONLY] Internal. The reflection textures.
| Int32 elementIndex | 
[READ ONLY] Internal. Stores the index of the currently rendering hair. May be extended to other object types eventually.
| const RayPolyWeight* displacementWeight | 
[READ ONLY] Private.