Field3D
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Field.cpp
Go to the documentation of this file.
1
//----------------------------------------------------------------------------//
2
3
/*
4
* Copyright (c) 2009 Sony Pictures Imageworks Inc
5
*
6
* All rights reserved.
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions
10
* are met:
11
*
12
* Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
* Redistributions in binary form must reproduce the above copyright
15
* notice, this list of conditions and the following disclaimer in the
16
* documentation and/or other materials provided with the
17
* distribution. Neither the name of Sony Pictures Imageworks nor the
18
* names of its contributors may be used to endorse or promote
19
* products derived from this software without specific prior written
20
* permission.
21
*
22
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
31
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
33
* OF THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
//----------------------------------------------------------------------------//
37
42
//----------------------------------------------------------------------------//
43
44
#include "
Field.h
"
45
46
//----------------------------------------------------------------------------//
47
48
FIELD3D_NAMESPACE_OPEN
49
50
//----------------------------------------------------------------------------//
51
// FieldBase
52
//----------------------------------------------------------------------------//
53
54
FieldBase::FieldBase
()
55
:
RefBase
(),
56
m_metadata(this)
57
{
58
// Empty
59
}
60
61
FieldBase::FieldBase
(
const
FieldBase
&other)
62
:
RefBase
(),
63
name(other.name),
64
attribute(other.attribute),
65
m_metadata(this)
66
{
67
m_metadata
= other.
m_metadata
;
68
}
69
70
71
//----------------------------------------------------------------------------//
72
73
FieldBase::~FieldBase
()
74
{
75
// Empty
76
}
77
78
//----------------------------------------------------------------------------//
79
// FieldTraits template specializations
80
//----------------------------------------------------------------------------//
81
82
template
<>
83
int
FieldTraits<half>::dataDims
()
84
{
85
return
1;
86
}
87
88
//----------------------------------------------------------------------------//
89
90
template
<>
91
int
FieldTraits<float>::dataDims
()
92
{
93
return
1;
94
}
95
96
//----------------------------------------------------------------------------//
97
98
template
<>
99
int
FieldTraits<double>::dataDims
()
100
{
101
return
1;
102
}
103
104
//----------------------------------------------------------------------------//
105
106
template
<>
107
int
FieldTraits<int>::dataDims
()
108
{
109
return
1;
110
}
111
112
//----------------------------------------------------------------------------//
113
114
template
<>
115
int
FieldTraits<char>::dataDims
()
116
{
117
return
1;
118
}
119
120
//----------------------------------------------------------------------------//
121
122
template
<>
123
int
FieldTraits<unsigned char>::dataDims
()
124
{
125
return
1;
126
}
127
128
//----------------------------------------------------------------------------//
129
130
template
<>
131
int
FieldTraits<V3h>::dataDims
()
132
{
133
return
3;
134
}
135
136
//----------------------------------------------------------------------------//
137
138
template
<>
139
int
FieldTraits<V3f>::dataDims
()
140
{
141
return
3;
142
}
143
144
//----------------------------------------------------------------------------//
145
146
template
<>
147
int
FieldTraits<V3d>::dataDims
()
148
{
149
return
3;
150
}
151
152
//----------------------------------------------------------------------------//
153
154
template
<>
155
int
FieldTraits<C3f>::dataDims
()
156
{
157
return
3;
158
}
159
160
//----------------------------------------------------------------------------//
161
162
FIELD3D_NAMESPACE_SOURCE_CLOSE
163
164
//----------------------------------------------------------------------------//
src
Field.cpp
Generated on Mon Jul 8 2013 20:04:06 for Field3D by
1.8.4