44#define AI_VOLUME_INTERP_CLOSEST 0
45#define AI_VOLUME_INTERP_TRILINEAR 1
46#define AI_VOLUME_INTERP_TRICUBIC 2
59struct AtVolumeIntersectionInfo;
179 const AtVolumeIntersectionInfo* info,
198#define AI_VOLUME_NODE_EXPORT_METHODS(tag) \
199AI_INSTANCE_COMMON_SHAPE_METHODS \
206static AtVolumeNodeMethods ai_vol_mtds = { \
214static AtNodeMethods ai_node_mtds = { \
218const AtNodeMethods* tag = &ai_node_mtds;
220#define volume_create \
221static bool VolumeCreate(const AtNode* node, \
224#define volume_update \
225static bool VolumeUpdate(const AtNode* node, \
228#define volume_cleanup \
229static bool VolumeCleanup(const AtNode* node, \
232#define volume_ray_extents \
233static void VolumeRayExtents(const AtVolumeData* data, \
234 const AtVolumeIntersectionInfo* info, \
237 const AtVector* origin, \
238 const AtVector* direction, \
242#define volume_sample \
243static bool VolumeSample(const AtVolumeData* data, \
244 const AtString channel, \
245 const AtShaderGlobals* sg, \
247 AtParamValue *value, \
250#define volume_gradient \
251static bool VolumeGradient(const AtVolumeData* data, \
252 const AtString channel, \
253 const AtShaderGlobals* sg, \
Axis-aligned bounding box types and utilities.
Color types and utilities.
AtString class for fast comparisons.
Version number information and checking of backwards-compatibility.
Actual parameter value for each supported type.
Definition: ai_params.h:106
Arnold String allows for fast string comparisons.
Definition: ai_string.h:46
void * private_info
Volume plugin private data, used how the plugin likes.
Definition: ai_volume.h:54
AtVolumeCreate Create
This method is called to load/create a volume.
Definition: ai_volume.h:189
void(* AtVolumeRayExtents)(const AtVolumeData *data, const AtVolumeIntersectionInfo *info, uint16_t tid, float time, const AtVector *origin, const AtVector *direction, float t0, float t1)
Volume plugin method for submitting extents along a ray where there is data.
Definition: ai_volume.h:178
bool(* AtVolumeSample)(const AtVolumeData *data, const AtString channel, const AtShaderGlobals *sg, int interp, AtParamValue *value, uint8_t *type)
Volume plugin sample method.
Definition: ai_volume.h:123
AI_API AtArray * AiVolumeFileGetChannels(const char *filename)
Get list of channel names in a volume file.
Definition: ai_shader_volume.cpp:93
AtVolumeSample Sample
This method is called to sample a volume's named channel using a given point and interpolation.
Definition: ai_volume.h:193
AtVolumeCleanup Cleanup
This method is called to clean up a volume when it's no longer needed.
Definition: ai_volume.h:191
AI_API void AiVolumeAddIntersection(const AtVolumeIntersectionInfo *info, float t0, float t1)
Submit a ray interval/extent for volume integration.
Definition: ai_shader_volume.cpp:43
float auto_step_size
Recommended step size for ray marching through this data.
Definition: ai_volume.h:56
AtVolumeRayExtents RayExtents
This method is called to get all tightly-bounded extents along a ray where the volume exists.
Definition: ai_volume.h:192
AI_API void AiVolumeMergeIntersection(const AtVolumeIntersectionInfo *info, float t0, float t1, uint32_t prim_id)
Submit a ray interval/extent for volume integration.
Definition: ai_shader_volume.cpp:74
AI_API AtBBox AiVolumeFileGetBBox(const char *filename, const AtArray *channels)
Get bounding box for specified channels in a volume file.
Definition: ai_shader_volume.cpp:107
AtVolumeUpdate Update
This method is called to update a volume before render passes or on scene changes.
Definition: ai_volume.h:190
bool(* AtVolumeCreate)(const AtNode *node, AtVolumeData *data)
Volume plugin volume creation.
Definition: ai_volume.h:79
bool(* AtVolumeCleanup)(const AtNode *node, AtVolumeData *data)
Volume plugin volume cleanup method.
Definition: ai_volume.h:105
AtBBox bbox
Bounding box for this volume, plugin is responsible for also including volume_padding from the node.
Definition: ai_volume.h:55
bool(* AtVolumeUpdate)(const AtNode *node, AtVolumeData *data)
Volume plugin volume update.
Definition: ai_volume.h:93
AtVolumeGradient Gradient
This method is called to sample the gradient of a volume's named channel using a given point and inte...
Definition: ai_volume.h:194
bool(* AtVolumeGradient)(const AtVolumeData *data, const AtString channel, const AtShaderGlobals *sg, int interp, AtVector *gradient)
Volume plugin gradient method.
Definition: ai_volume.h:147
3D axis-aligned bounding box (uses single-precision)
Definition: ai_bbox.h:33
This represents a node in Arnold.
Shader globals data structure.
Definition: ai_shaderglobals.h:45
3D point (single precision)
Definition: ai_vector.h:30
Volume data, as returned by AtVolumeCreate.
Definition: ai_volume.h:53
Definition: ai_volume.h:188