Lights are positioned at the coordinate origin of the local light space. More...
Public Member Functions | |
General methods | |
virtual Light_type | get_type () const =0 |
Returns the light type. More... |
|
virtual void | set_type (Light_type type)=0 |
Sets the light type. More... |
|
virtual Light_area_shape | get_area_shape () const =0 |
Returns the area light shape. More... |
|
virtual void | set_area_shape (Light_area_shape light_area_shape)=0 |
Sets the area light shape. More... |
|
virtual Float64 | get_spread () const =0 |
Returns the cosine of the cone opening angle. More... |
|
virtual void | set_spread (Float64 spread)=0 |
Sets the cosine of the cone opening angle. More... |
|
virtual Float64 | get_distance () const =0 |
Returns the maximum distance from the origin that the light can reach. More... |
|
virtual void | set_distance (Float64 distance)=0 |
Sets the maximum distance from the origin that the light can reach. More... |
|
virtual Float64 | get_area_radius () const =0 |
Returns the radius of the area for area lights. More... |
|
virtual void | set_area_radius (Float64 radius)=0 |
Sets the radius of the area for area lights. More... |
|
virtual Float64 | get_area_size_x () const =0 |
Returns the size of the area in x direction for area lights. More... |
|
virtual void | set_area_size_x (Float64 size_x)=0 |
Sets 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 void | set_area_size_y (Float64 size_y)=0 |
Sets the size of the area in y direction for area light types. More... |
|
Methods related to MetaSL (deprecated) | |
virtual Sint32 | attach_light_definition (const char *name)=0 |
Attaches a light definition to this light. More... |
|
virtual void | detach_light_definition ()=0 |
Detaches the light definition from this light. More... |
|
virtual const IShader_graph * | access_light_definition () const =0 |
Returns the light definition of this light. More... |
|
virtual IShader_graph * | edit_light_definition () const =0 |
Returns the light definition of this light. More... |
|
virtual Sint32 | attach_shader (Shader_type type, const char *name)=0 |
Attaches a shader to the light. More... |
|
virtual Sint32 | detach_shader (Shader_type type)=0 |
Detaches a shader from the light. More... |
|
virtual const IShader * | access_shader (Shader_type type) const =0 |
Returns a shader attached to the light. More... |
|
virtual IShader * | edit_shader (Shader_type type) const =0 |
Returns the specified shader. More... |
|
Additional Inherited Members | |
Public Types inherited from mi::base::Interface_declare< 0xc9a437cf, 0x6d47, 0x4666, 0x9c, 0xf6, 0xa4, 0x3f, 0x50, 0xe8, 0x0b, 0x90, IScene_element > | |
typedef Interface_declare< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11, IScene_element > |
Self |
Own type. More... |
|
typedef Uuid_t< id1, id2, id3, id4, id5, id6, id7, id8, id9, id10, id11 > |
IID |
Declares the interface ID (IID) of this interface. More... |
|
Static Public Member Functions inherited from mi::base::Interface_declare< 0xc9a437cf, 0x6d47, 0x4666, 0x9c, 0xf6, 0xa4, 0x3f, 0x50, 0xe8, 0x0b, 0x90, IScene_element > | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... |
|
Lights are positioned at the coordinate origin of the local light space.
Spots, directionals, and area light sources point down the negative z
-axis, like the camera. (This differs from the .mi scene file syntax, where lights can have origins, directions, and area edge and axis vectors; Iray folds this information into the light instance transformation. As a consequence, it is not possible to define an area for a spot light whose area orientation is different from the spot orientation. The spot orientation takes precedence.)
Note that there are methods specific to MetaSL, but no methods specific to MDL. For MDL, simply attach a material instance via the material
attribute, similar as for geometry objects.
For MetaSL, note that there can be either a light shader or a light definition attached to the light. Attaching a light definition detaches the light shader (if one is attached) and vice versa.
|
pure virtual |
Returns the light definition of this light.
NULL
if no light definition is attached.
|
pure virtual |
Returns a shader attached to the light.
type | The shader type to attach. Valid shader types are mi::LIGHT_SHADER. |
NULL
if there is no such shader attached.
|
pure virtual |
Attaches a light definition to this light.
Replaces the old light definition if there was one attached. This method also detaches the light shader of the light (if there was one attached).
NULL
pointer).
|
pure virtual |
Attaches a shader to the light.
Any previously attached shader of that type is automatically detached. This method also detaches the light definition (if there was one attached).
type | The shader type to attach. Valid shader types are mi::LIGHT_SHADER. |
name | The shader to attach. |
NULL
pointer or invalid enum value).
|
pure virtual |
Detaches the light definition from this light.
Ignored if there was none attached.
|
pure virtual |
Detaches a shader from the light.
type | The shader type to attach. Valid shader types are mi::LIGHT_SHADER. |
NULL
pointer or invalid enum value).
|
pure virtual |
Returns the light definition of this light.
NULL
if no light definition is attached.
|
pure virtual |
Returns the specified shader.
type | The shader type to attach. Valid shader types are mi::LIGHT_SHADER. |
NULL
if there is no such shader attached.
|
pure virtual |
Returns the radius of the area for area lights.
This value is only meaningful for lights of type mi::AREA_DISC, mi::AREA_SPHERE, and mi::AREA_CYLINDER.
|
pure virtual |
Returns the area light shape.
|
pure virtual |
Returns the size of the area in x direction for area lights.
This value is only meaningful for lights of type mi::AREA_RECTANGLE and mi::AREA_CYLINDER. For cylindrical area lights, this value is half of the height of the cylinder.
|
pure virtual |
Returns the size of the area in y direction for area lights.
This value is only meaningful for lights of type mi::AREA_RECTANGLE.
|
pure virtual |
Returns the maximum distance from the origin that the light can reach.
This value has no meaning for lights of type mi::LIGHT_INFINITE.
|
pure virtual |
Returns the cosine of the cone opening angle.
This value is only meaningful for lights of type mi::LIGHT_SPOT.
|
pure virtual |
Returns the light type.
|
pure virtual |
Sets the radius of the area for area lights.
This value is only meaningful for lights of type mi::AREA_DISC, mi::AREA_SPHERE, and mi::AREA_CYLINDER.
|
pure virtual |
Sets the area light shape.
|
pure virtual |
Sets the size of the area in x direction for area lights.
This value is only meaningful for lights of type mi::AREA_RECTANGLE and mi::AREA_CYLINDER. For cylindrical area lights, this value is half of the height of the cylinder.
|
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::AREA_RECTANGLE.
|
pure virtual |
Sets the maximum distance from the origin that the light can reach.
This value has no meaning for lights of type mi::LIGHT_INFINITE.
|
pure virtual |
Sets the cosine of the cone opening angle.
This value is only meaningful for lights of type mi::LIGHT_SPOT.
|
pure virtual |
Sets the light type.