Loading...
Searching...
No Matches
pxrIES.h
1//
2// Copyright 2024 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_PLUGIN_HD_EMBREE_PXRIES_PXRIES_H
8#define PXR_IMAGING_PLUGIN_HD_EMBREE_PXRIES_PXRIES_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/plugin/hdEmbree/pxrIES/ies.h"
12
13#include <string>
14
15PXR_NAMESPACE_OPEN_SCOPE
16
21class PxrIESFile : public pxr_ccl::IESFile {
22private:
23 using Base = pxr_ccl::IESFile;
24
25public:
26
27 bool load(std::string const& ies); // non-virtual "override"
28 void clear(); // non-virtual "override"
29
31 inline float power() const
32 {
33 return _power;
34 }
35
36 // returns true if the IES files was successfully loaded and processed and
37 // is ready to evaluate
38 bool valid() const
39 {
40 return !intensity.empty();
41 }
42
43 // evaluate the IES file for the given spherical coordinates
44 float eval(float theta, float phi, float angleScale) const;
45
46protected:
47 // Extra processing we do on-top of the "standard" process() from IESFile
48 void pxr_extra_process();
49
50private:
51
52 float _power = 0;
53};
54
55PXR_NAMESPACE_CLOSE_SCOPE
56
57#endif // PXR_IMAGING_PLUGIN_HD_EMBREE_PXRIES_PXRIES_H
Extends / overrides some functionality of standard IESFile.
Definition: pxrIES.h:21
float power() const
The light's power, as calculated when parsing.
Definition: pxrIES.h:31