Blender V4.3
util/ies.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#ifndef __UTIL_IES_H__
6#define __UTIL_IES_H__
7
8#include "util/string.h"
9#include "util/vector.h"
10
12
13class IESFile {
14 public:
16 ~IESFile();
17
18 int packed_size();
19 void pack(float *data);
20
21 bool load(const string &ies);
22 void clear();
23
24 protected:
25 bool parse(const string &ies);
26 bool process();
27 void process_type_a();
28 void process_type_b();
29 void process_type_c();
30
31 /* The brightness distribution is stored in spherical coordinates.
32 * The horizontal angles correspond to theta in the regular notation
33 * and always span the full range from 0° to 360°.
34 * The vertical angles correspond to phi and always start at 0°. */
36 /* The actual values are stored here, with every entry storing the values
37 * of one horizontal segment. */
39
40 /* Types of angle representation in IES files. */
41 enum IESType { TYPE_A = 3, TYPE_B = 2, TYPE_C = 1 } type;
42};
43
45
46#endif /* __UTIL_IES_H__ */
void pack(float *data)
Definition ies.cpp:46
bool process()
Definition ies.cpp:375
enum IESFile::IESType type
vector< vector< float > > intensity
Definition util/ies.h:38
void process_type_c()
Definition ies.cpp:325
void process_type_b()
Definition ies.cpp:217
vector< float > v_angles
Definition util/ies.h:35
vector< float > h_angles
Definition util/ies.h:35
void process_type_a()
Definition ies.cpp:291
bool load(const string &ies)
Definition ies.cpp:21
IESFile()
Definition util/ies.h:15
~IESFile()
Definition ies.cpp:405
bool parse(const string &ies)
Definition ies.cpp:119
int packed_size()
Definition ies.cpp:38
@ TYPE_A
Definition util/ies.h:41
@ TYPE_C
Definition util/ies.h:41
@ TYPE_B
Definition util/ies.h:41
void clear()
Definition ies.cpp:31
#define CCL_NAMESPACE_END