neuray API Programmer's Manual

ilightprofile.h File Reference

Description

Scene element Lightprofile.

Code Example

ilightprofile.h

‎/***************************************************************************************************
 * Copyright 2024 NVIDIA Corporation. All rights reserved.
 **************************************************************************************************/

#ifndef MI_NEURAYLIB_ILIGHTPROFILE_H
#define MI_NEURAYLIB_ILIGHTPROFILE_H

#include <mi/neuraylib/iscene_element.h>

namespace mi {

namespace neuraylib {

class IReader;

enum Lightprofile_flags {
    LIGHTPROFILE_CLOCKWISE            = 1,
    LIGHTPROFILE_COUNTER_CLOCKWISE    = 2,
    LIGHTPROFILE_ROTATE_TYPE_B        = 4,
    LIGHTPROFILE_ROTATE_TYPE_C_90_270 = 8,
    LIGHTPROFILE_FLAGS_FORCE_32_BIT   = 0xffffffffU
};

mi_static_assert( sizeof( Lightprofile_flags) == sizeof( Uint32));

enum Lightprofile_degree {
    LIGHTPROFILE_HERMITE_BASE_1      = 1,   
    LIGHTPROFILE_HERMITE_BASE_3      = 3,   
    LIGHTPROFILE_DEGREE_FORCE_32_BIT = 0xffffffffU
};

mi_static_assert( sizeof( Lightprofile_degree) == sizeof( Uint32));

class ILightprofile :
    public base::Interface_declare<0xa4ac11fd,0x705d,0x4a0a,0x80,0x0b,0x38,0xe5,0x3d,0x46,0x96,0x47,
                                   neuraylib::IScene_element>
{
public:
    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;

    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;

    virtual const char* get_filename() const = 0;

    virtual const char* get_original_filename() const = 0;

    virtual Uint32 
               get_resolution_phi() const = 0;

    virtual Uint32 
               get_resolution_theta() const = 0;

    virtual Lightprofile_degree 
               get_degree() const = 0;

    virtual Uint32 
               get_flags() const = 0;

    virtual Float32 
               get_phi( Uint32 index) const = 0;

    virtual Float32 
               get_theta( Uint32 index) const = 0;

    virtual const Float32* get_data() const = 0;

    virtual Float32 
               get_data( Uint32 index_phi, Uint32 index_theta) const = 0;

    virtual Float64 
               get_candela_multiplier() const = 0;

    virtual Float32 
               sample( Float32 phi, Float32 theta, bool candela) const = 0;
};
 // end group mi_neuray_misc

} // namespace neuraylib

} // namespace mi

#endif // MI_NEURAYLIB_ILIGHTPROFILE_H

Namespaces

namespace 
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH. More...
namespace 
Namespace for the neuray API. More...

Classes

class 
This interface represents light profiles. More...

Enumerations

enum  {LIGHTPROFILE_HERMITE_BASE_1 = 1, LIGHTPROFILE_HERMITE_BASE_3 = 3, LIGHTPROFILE_DEGREE_FORCE_32_BIT = 0xffffffffU }
Degree of hermite interpolation. More...
enum  {LIGHTPROFILE_CLOCKWISE = 1, LIGHTPROFILE_COUNTER_CLOCKWISE = 2, LIGHTPROFILE_ROTATE_TYPE_B = 4, LIGHTPROFILE_ROTATE_TYPE_C_90_270 = 8, LIGHTPROFILE_FLAGS_FORCE_32_BIT = 0xffffffffU }
Ordering of horizontal angles in a light profile. More...