MDL SDK API nvidia_logo_transpbg.gif Up
ilightprofile.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_ILIGHTPROFILE_H
8#define MI_NEURAYLIB_ILIGHTPROFILE_H
9
11
12namespace mi {
13
14namespace neuraylib {
15
20class IReader;
21
42 LIGHTPROFILE_FLAGS_FORCE_32_BIT = 0xffffffffU
43};
44
45mi_static_assert( sizeof( Lightprofile_flags) == sizeof( Uint32));
46
56 LIGHTPROFILE_DEGREE_FORCE_32_BIT = 0xffffffffU
57};
58
59mi_static_assert( sizeof( Lightprofile_degree) == sizeof( Uint32));
60
71 public base::Interface_declare<0xa4ac11fd,0x705d,0x4a0a,0x80,0x0b,0x38,0xe5,0x3d,0x46,0x96,0x47,
72 neuraylib::IScene_element>
73{
74public:
121 const char* filename,
122 Uint32 resolution_phi = 0,
123 Uint32 resolution_theta = 0,
126
167 IReader* reader,
168 Uint32 resolution_phi = 0,
169 Uint32 resolution_theta = 0,
172
179 virtual const char* get_filename() const = 0;
180
186 virtual const char* get_original_filename() const = 0;
187
189 virtual Uint32 get_resolution_phi() const = 0;
190
192 virtual Uint32 get_resolution_theta() const = 0;
193
196 virtual Lightprofile_degree get_degree() const = 0;
197
202 virtual Uint32 get_flags() const = 0;
203
209 virtual Float32 get_phi( Uint32 index) const = 0;
210
216 virtual Float32 get_theta( Uint32 index) const = 0;
217
225 virtual const Float32* get_data() const = 0;
226
235 virtual Float32 get_data( Uint32 index_phi, Uint32 index_theta) const = 0;
236
242 virtual Float64 get_candela_multiplier() const = 0;
243
257 virtual Float32 sample( Float32 phi, Float32 theta, bool candela) const = 0;
258};
259 // end group mi_neuray_misc
261
262} // namespace neuraylib
263
264} // namespace mi
265
266#endif // MI_NEURAYLIB_ILIGHTPROFILE_H
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
This interface represents light profiles.
Definition: ilightprofile.h:73
virtual Lightprofile_degree get_degree() const =0
Returns the interpolation degree that was used to interpolate the grid data, or mi::neuraylib::LIGHTP...
virtual Uint32 get_resolution_phi() const =0
Returns the resolution of the grid in phi-direction, or 0 after default construction.
virtual Uint32 get_resolution_theta() const =0
Returns the resolution of the grid in theta-direction, or 0 after default construction.
virtual Uint32 get_flags() const =0
Returns flags that were used to interpret the light profile data in the file, or mi::neuraylib::LIGHT...
virtual Float64 get_candela_multiplier() const =0
Returns the normalization factor.
virtual Sint32 reset_reader(IReader *reader, Uint32 resolution_phi=0, Uint32 resolution_theta=0, Lightprofile_degree degree=LIGHTPROFILE_HERMITE_BASE_1, Uint32 flags=LIGHTPROFILE_COUNTER_CLOCKWISE)=0
Sets the light profile to the data provided by a reader.
virtual const char * get_original_filename() const =0
Returns the unresolved file name as passed to reset_file().
virtual Float32 get_data(Uint32 index_phi, Uint32 index_theta) const =0
Returns the normalized data for a grid vertex.
virtual Float32 get_phi(Uint32 index) const =0
Returns the index -th phi value.
virtual const char * get_filename() const =0
Returns the resolved file name of the file containing the light profile.
virtual const Float32 * get_data() const =0
Returns the normalized data of the entire grid.
virtual Float32 get_theta(Uint32 index) const =0
Returns the index -th theta value.
virtual Sint32 reset_file(const char *filename, Uint32 resolution_phi=0, Uint32 resolution_theta=0, Lightprofile_degree degree=LIGHTPROFILE_HERMITE_BASE_1, Uint32 flags=LIGHTPROFILE_COUNTER_CLOCKWISE)=0
Sets the light profile to a file identified by filename.
virtual Float32 sample(Float32 phi, Float32 theta, bool candela) const =0
Samples the light profile.
A reader supports binary block reads and string-oriented line reads that zero-terminate the result.
Definition: ireader.h:27
#define mi_static_assert(expr)
Compile time assertion that raises a compilation error if the constant expression expr evaluates to f...
Definition: assert.h:58
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
double Float64
64-bit float.
Definition: types.h:52
float Float32
32-bit float.
Definition: types.h:51
signed int Sint32
32-bit signed integer.
Definition: types.h:46
Lightprofile_flags
Ordering of horizontal angles in a light profile.
Definition: ilightprofile.h:33
Lightprofile_degree
Degree of hermite interpolation.
Definition: ilightprofile.h:53
@ LIGHTPROFILE_COUNTER_CLOCKWISE
Counter-clockwise, standard-conforming order (default).
Definition: ilightprofile.h:37
@ LIGHTPROFILE_CLOCKWISE
Clockwise order, contrary to the IES standard for these (incorrect) type B files.
Definition: ilightprofile.h:35
@ LIGHTPROFILE_ROTATE_TYPE_C_90_270
For 3dsmax.
Definition: ilightprofile.h:41
@ LIGHTPROFILE_ROTATE_TYPE_B
For 3dsmax.
Definition: ilightprofile.h:39
@ LIGHTPROFILE_HERMITE_BASE_1
Degree 1 = linear interpolation.
Definition: ilightprofile.h:54
@ LIGHTPROFILE_HERMITE_BASE_3
Degree 3 = cubic interpolation.
Definition: ilightprofile.h:55
Base class for all scene elements.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: example_derivatives.dox:5