All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
light.h
1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_IMAGING_HD_LIGHT_H
25 #define PXR_IMAGING_HD_LIGHT_H
26 
27 #include "pxr/pxr.h"
28 #include "pxr/imaging/hd/api.h"
29 #include "pxr/imaging/hd/version.h"
30 #include "pxr/imaging/hd/sprim.h"
31 
33 #include "pxr/base/vt/dictionary.h"
34 #include "pxr/base/vt/value.h"
35 
36 #include <vector>
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 #define HD_LIGHT_TOKENS \
41  (angle) \
42  (color) \
43  (colorTemperature) \
44  (enableColorTemperature) \
45  (exposure) \
46  (height) \
47  (intensity) \
48  (radius) \
49  (length) \
50  ((textureFile, "texture:file")) \
51  ((textureFormat, "texture:format")) \
52  (width) \
53  (diffuse) \
54  (specular) \
55  (normalize) \
56  ((shapingFocus, "shaping:focus")) \
57  ((shapingFocusTint, "shaping:focusTint")) \
58  ((shapingConeAngle, "shaping:cone:angle")) \
59  ((shapingConeSoftness, "shaping:cone:softness")) \
60  ((shapingIesFile, "shaping:ies:file")) \
61  ((shapingIesAngleScale, "shaping:ies:angleScale")) \
62  ((shapingIesNormalize, "shaping:ies:normalize")) \
63  ((shadowEnable, "shadow:enable")) \
64  ((shadowColor, "shadow:color")) \
65  ((shadowDistance, "shadow:distance")) \
66  ((shadowFalloff, "shadow:falloff")) \
67  ((shadowFalloffGamma, "shadow:falloffGamma")) \
68  \
69  (params) \
70  (shadowCollection) \
71  (shadowParams)
72 
73 TF_DECLARE_PUBLIC_TOKENS(HdLightTokens, HD_API, HD_LIGHT_TOKENS);
74 
75 class HdSceneDelegate;
76 typedef std::vector<class HdLight const *> HdLightPtrConstVector;
77 
82 class HdLight : public HdSprim {
83 public:
84  HD_API
85  HdLight(SdfPath const & id);
86  HD_API
87  virtual ~HdLight();
88 
89  // Change tracking for HdLight
90  enum DirtyBits : HdDirtyBits {
91  Clean = 0,
92  DirtyTransform = 1 << 0,
93  DirtyParams = 1 << 1,
94  DirtyShadowParams = 1 << 2,
95  DirtyCollection = 1 << 3,
96  DirtyResource = 1 << 4,
97  AllDirty = (DirtyTransform
98  |DirtyParams
99  |DirtyShadowParams
100  |DirtyCollection
101  |DirtyResource)
102  };
103 };
104 
105 PXR_NAMESPACE_CLOSE_SCOPE
106 
107 #endif // PXR_IMAGING_HD_LIGHT_H
Adapter class providing data exchange with the client scene graph.
#define TF_DECLARE_PUBLIC_TOKENS(...)
Macro to define public tokens.
Definition: staticTokens.h:118
A path value used to locate objects in layers or scenegraphs.
Definition: path.h:288
Sprim (state prim) is a base class of managing state for non-drawable scene entity (e...
Definition: sprim.h:52
This file defines some macros that are useful for declaring and using static TfTokens.
A light model, used in conjunction with HdRenderPass.
Definition: light.h:82