-
Notifications
You must be signed in to change notification settings - Fork 563
/
field3d_pvt.h
81 lines (53 loc) · 1.54 KB
/
field3d_pvt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Copyright 2008-present Contributors to the OpenImageIO project.
// SPDX-License-Identifier: BSD-3-Clause
// https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md
#pragma once
#include <OpenImageIO/Imath.h>
#if OIIO_USING_IMATH >= 3
# include <Imath/ImathBox.h>
#else
# include <OpenEXR/ImathBox.h>
#endif
#include <Field3D/DenseField.h>
#include <Field3D/Field3DFile.h>
#include <Field3D/FieldMetadata.h>
#include <Field3D/InitIO.h>
#include <Field3D/MACField.h>
#include <Field3D/SparseField.h>
#ifndef FIELD3D_NS
# define FIELD3D_NS Field3D
#endif
using namespace FIELD3D_NS;
OIIO_NAMESPACE_BEGIN
namespace f3dpvt {
enum FieldType { Dense, Sparse, MAC };
struct layerrecord {
std::string name;
std::string attribute;
std::string unique_name;
TypeDesc datatype;
FieldType fieldtype;
bool vecfield = false; // true=vector, false=scalar
Box3i extents;
Box3i dataWindow;
ImageSpec spec;
FieldRes::Ptr field;
layerrecord() {}
};
// Define an abstract interface that allows us to get special information
// from the Field3DInput.
class Field3DInput_Interface : public ImageInput {
public:
Field3DInput_Interface() {}
// Transform world space P to local space P.
virtual void worldToLocal(const Imath::V3f& wsP, Imath::V3f& lsP,
float time) const = 0;
};
// Return a reference to the mutex that allows us to use f3d with multiple
// threads.
spin_mutex&
field3d_mutex();
void
oiio_field3d_initialize();
} // end namespace f3dpvt
OIIO_NAMESPACE_END