mi::neuraylib::ILight Class Reference
[Leaf nodes]
Description
Point, spot, directional and area lighting. All lights are positioned at the origin of the local light space and point down the negative z -axis, like the camera. This differs from some traditional scene description formats, in which a light can have an origin, a direction, and possibly other orientation vectors. Instead, uses transformations to express these properties.
For directional lights, the (transformed) position is irrelevant. The traditional use of a directional light is as an approximation of the rays of the sun, which is at such a great distance to the earth that at human scale the light rays are effectively parallel.
In addition, provides the ability to specify an emission distribution function in a material. In this way, any object can be a source of light emission, but may also have reflective and transmissive properties as well.
See also [:ipmlink environment_dome_and_implicit_groundplane Environment dome].
See also:
mi::neuraylib::Light_type, mi::neuraylib::Light_area_shape
Light properties
- virtual Float64 get_area_radius() const =0
- Returns the radius of the area for area lights. More...
- virtual Light_area_shape get_area_shape() const =0
- Returns the area light shape.
- virtual Float64 get_area_size_x() const =0
- Returns the size of the area in x direction for area lights. More...
- virtual Float64 get_area_size_y() const =0
- Returns the size of the area in y direction for area lights. More...
- virtual Light_type get_type() const =0
- Returns the light type.
- virtual void set_area_radius( Float64 radius) =0
- Sets the radius of the area for area lights. More...
- virtual void set_area_shape( Light_area_shape light_area_shape) =0
- Sets the area light shape.
- virtual void set_area_size_x( Float64 size_x) =0
- Sets the size of the area in x direction for area lights. More...
- virtual void set_area_size_y( Float64 size_y) =0
- Sets the size of the area in y direction for area light types. More...
- virtual void set_type( Light_type type) =0
- Sets the light type.
Methods related to the bounding box
- virtual Bbox3_struct get_bbox() const =0
- Returns the bounding box of the light. More...
- virtual Bbox3_struct get_tight_bbox( const Float64_4_4_struct& transformation_matrix) const =0
- Returns the bounding box of the light after transformation. More...
Member Functions
- virtual Float64 mi::neuraylib::ILight::get_area_radius() const [pure virtual]
-
Returns the radius of the area for area lights. This value is only meaningful for lights of type mi::neuraylib::AREA_DISC, mi::neuraylib::AREA_SPHERE, and mi::neuraylib::AREA_CYLINDER.
- virtual Light_area_shape mi::neuraylib::ILight::get_area_shape() const [pure virtual]
-
Returns the area light shape.
- virtual Float64 mi::neuraylib::ILight::get_area_size_x() const [pure virtual]
-
Returns the size of the area in x direction for area lights. This value is only meaningful for lights of type mi::neuraylib::AREA_RECTANGLE and mi::neuraylib::AREA_CYLINDER. For cylindrical area lights, this value is half of the height of the cylinder.
- virtual Float64 mi::neuraylib::ILight::get_area_size_y() const [pure virtual]
-
Returns the size of the area in y direction for area lights. This value is only meaningful for lights of type mi::neuraylib::AREA_RECTANGLE.
- virtual Bbox3_struct mi::neuraylib::ILight::get_bbox() const [pure virtual]
-
Returns the bounding box of the light.
Note:For infinite lights, an empty bounding box is returned.
- virtual Bbox3_struct mi::neuraylib::ILight::get_tight_bbox( const Float64_4_4_struct& transformation_matrix) const [pure virtual]
-
Returns the bounding box of the light after transformation.
Note:For infinite lights, an empty bounding box is returned.
Parameters
- transformation_matrix
- The world-to-object space transformation matrix that is applied to the object before the bounding box is computed.
- virtual Light_type mi::neuraylib::ILight::get_type() const [pure virtual]
-
Returns the light type.
- virtual void mi::neuraylib::ILight::set_area_radius( Float64 radius) [pure virtual]
-
Sets the radius of the area for area lights. This value is only meaningful for lights of type mi::neuraylib::AREA_DISC, mi::neuraylib::AREA_SPHERE, and mi::neuraylib::AREA_CYLINDER.
- virtual void mi::neuraylib::ILight::set_area_shape( Light_area_shape light_area_shape) [pure virtual]
-
Sets the area light shape.
- virtual void mi::neuraylib::ILight::set_area_size_x( Float64 size_x) [pure virtual]
-
Sets the size of the area in x direction for area lights. This value is only meaningful for lights of type mi::neuraylib::AREA_RECTANGLE and mi::neuraylib::AREA_CYLINDER. For cylindrical area lights, this value is half of the height of the cylinder.
- virtual void mi::neuraylib::ILight::set_area_size_y( Float64 size_y) [pure virtual]
-
Sets the size of the area in y direction for area light types. This value is only meaningful for lights of type mi::neuraylib::AREA_RECTANGLE.
- virtual void mi::neuraylib::ILight::set_type( Light_type type) [pure virtual]
-
Sets the light type.