neuray API Programmer's Manual

mi::neuraylib::IVolume Class Reference

[Leaf nodes]

Description

Interface representing a top-level volume. IVolume represents a volume which encloses a single participating medium but (contrary to meshes) has no hull. Volumes can be instanced and transformed as usual. Volumes displace the vacuum of the scene but are themselves displaced by closed geometry.

Public Member Functions

virtual Bbox3_struct get_bounds() const =0
Retrieves the bounds of this object. More...
virtual Float32_4_4_struct get_transform() const =0
Retrieves the bounds transform of this object. More...
virtual void set_bounds( const Bbox3_struct& box, const Float32_4_4_struct& tf = Float32_4_4(1)) =0
Sets the bounds of this object. More...
void set_bounds( const Bbox3& box, const Float32_4_4_struct& tf = Float32_4_4(1))
This inline method exists for the user's convenience since mi::math::Bbox is not derived from mi::math::Bbox_struct.

Member Functions

virtual Bbox3_struct mi::​neuraylib::​IVolume::get_bounds() const [pure virtual]

Retrieves the bounds of this object. If no bounds were set, this function returns the unit cube.

See also:

set_bounds()

virtual Float32_4_4_struct mi::​neuraylib::​IVolume::get_transform() const [pure virtual]

Retrieves the bounds transform of this object. If no bounds were set, this function returns the identity transform.

See also:

set_bounds()

virtual void mi::​neuraylib::​IVolume::set_bounds( const Bbox3_struct& box, const Float32_4_4_struct& tf = Float32_4_4(1)) [pure virtual]

Sets the bounds of this object. Volume data outside of these bounds will not be visible.

When using materials which directly look up a volume data file like VDB, it is useful to set this object's bounds based on the information provided by mi::neuraylib::IVolume_data::get_data_bounds() and mi::neuraylib::IVolume_data::get_transform().

void mi::​neuraylib::​IVolume::set_bounds( const Bbox3& box, const Float32_4_4_struct& tf = Float32_4_4(1)) [inline]

This inline method exists for the user's convenience since mi::math::Bbox is not derived from mi::math::Bbox_struct.