NVIDIA Iray API Home  Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ilight.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // Copyright 1986, 2016 NVIDIA Corporation. All rights reserved.
3 //*****************************************************************************
6 //*****************************************************************************
7 
8 #ifndef MI_NEURAYLIB_ILIGHT_H
9 #define MI_NEURAYLIB_ILIGHT_H
10 
12 #include <mi/neuraylib/version.h>
13 
14 namespace mi {
15 
16 namespace neuraylib {
17 
18 class IGroup;
19 class MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader);
20 class MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader_graph);
21 
26 enum Light_type {
31 #ifdef MI_NEURAYLIB_DEPRECATED_METASL
32  LIGHT_SPOT = 1,
33 #endif // MI_NEURAYLIB_DEPRECATED_METASL
35 #ifdef MI_NEURAYLIB_DEPRECATED_METASL
36  LIGHT_PLANAR = 3,
37 #endif // MI_NEURAYLIB_DEPRECATED_METASL
38  N_LIGHT_TYPES,
39  LIGHT_FORCE_32_BIT = 0xffffffffU
40 };
41 
42 mi_static_assert( sizeof( Light_type) == sizeof( Uint32));
43 
48  AREA_NONE = 0,
50  AREA_DISC = 2,
53  N_AREA_TYPES,
54  AREA_FORCE_32_BIT = 0xffffffffU
55 };
56 
57 mi_static_assert( sizeof( Light_area_shape) == sizeof( Uint32));
58 
80 class ILight :
81  public base::Interface_declare<0xc9a437cf,0x6d47,0x4666,0x9c,0xf6,0xa4,0x3f,0x50,0xe8,0x0b,0x90,
82  neuraylib::IScene_element>
83 {
84 public:
86  virtual Light_type get_type() const = 0;
87 
89  virtual void set_type(Light_type type) = 0;
90 
92  virtual Light_area_shape get_area_shape() const = 0;
93 
95  virtual void set_area_shape(Light_area_shape light_area_shape) = 0;
96 
101  virtual Float64 get_area_radius() const = 0;
102 
107  virtual void set_area_radius(Float64 radius) = 0;
108 
114  virtual Float64 get_area_size_x() const = 0;
115 
121  virtual void set_area_size_x(Float64 size_x) = 0;
122 
126  virtual Float64 get_area_size_y() const = 0;
127 
131  virtual void set_area_size_y(Float64 size_y) = 0;
132 
133  virtual Float64 MI_NEURAYLIB_DEPRECATED_METHOD_METASL(get_spread)() const = 0;
134 
135  virtual void MI_NEURAYLIB_DEPRECATED_METHOD_METASL(set_spread)(Float64 spread) = 0;
136 
137  virtual Float64 MI_NEURAYLIB_DEPRECATED_METHOD_METASL(get_distance)() const = 0;
138 
139  virtual void MI_NEURAYLIB_DEPRECATED_METHOD_METASL(set_distance)(Float64 distance) = 0;
140 
141  virtual Sint32 attach_light_definition( const char* name) = 0;
142 
143  virtual void detach_light_definition() = 0;
144 
145  virtual const MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader_graph)*
146  access_light_definition() const = 0;
147 
148  virtual MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader_graph)*
149  edit_light_definition() const = 0;
150 
151  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_METASL(attach_shader)(
152  Shader_type type, const char* name) = 0;
153 
154  virtual Sint32 MI_NEURAYLIB_DEPRECATED_METHOD_METASL(detach_shader)(
155  Shader_type type) = 0;
156 
157  virtual const MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader)*
158  access_shader( Shader_type type) const = 0;
159 
160  virtual MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader)*
161  edit_shader( Shader_type type) const = 0;
162 };
163  // end group mi_neuray_leaf_nodes
165 
166 } // namespace neuraylib
167 
168 #ifdef MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
171 using neuraylib::AREA_FORCE_32_BIT;
175 using neuraylib::IGroup;
176 using neuraylib::ILight;
178 using neuraylib::MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader);
179 using neuraylib::MI_NEURAYLIB_DEPRECATED_CLASS_METASL(IShader_graph);
180 using neuraylib::LIGHT_FORCE_32_BIT;
182 using neuraylib::LIGHT_PLANAR;
184 using neuraylib::LIGHT_SPOT;
187 using neuraylib::N_AREA_TYPES;
188 using neuraylib::N_LIGHT_TYPES;
189 using neuraylib::Shader_type;
190 #endif // MI_NEURAYLIB_DEPRECATED_NAMESPACE_MI_TRANSITION
191 
192 } // namespace mi
193 
194 #endif // MI_NEURAYLIB_ILIGHT_H