44 #ifndef _INCLUDED_Field3D_EmptyField_H_ 45 #define _INCLUDED_Field3D_EmptyField_H_ 49 #include <boost/lexical_cast.hpp> 62 #define UNUSED(p) ((p)=(p)) 80 template <
class Data_T>
88 typedef boost::intrusive_ptr<EmptyField>
Ptr;
89 typedef std::vector<Ptr>
Vec;
115 virtual Data_T
value(
int i,
int j,
int k)
const;
116 virtual long long int memSize()
const;
134 virtual Data_T&
lvalue(
int i,
int j,
int k);
173 template <
class Data_T>
182 template <
class Data_T>
190 template <
class Data_T>
210 template <
class Data_T>
214 return sizeof(*this) + superClassMemSize;
219 template <
class Data_T>
239 template <
class Data_T>
247 template <
class Data_T>
271 #endif // Include guard #define FIELD3D_NAMESPACE_HEADER_CLOSE
virtual Data_T & lvalue(int i, int j, int k)
Write access to a voxel. The coordinates are global coordinates.
const Data_T & constantvalue() const
Returns the constant value.
virtual Data_T value(int i, int j, int k) const
Read access to a voxel. The coordinates are in integer voxel space .
EmptyField< float >::Ptr ProxyPtr
EmptyField()
Constructs an empty buffer.
virtual void clear(const Data_T &value)
Clears all the voxels in the storage.
boost::intrusive_ptr< FieldBase > Ptr
std::vector< ProxyPtr > Proxies
Box3i m_dataWindow
Defines the area where data is allocated. This should be treated as a closed (i.e. inclusive) interval.
EmptyField< float > Proxy
void setConstantvalue(const Data_T &val)
Sets the constant value.
Data_T m_default
Field default value.
This subclass of Field does not store any data.
virtual long long int memSize() const
Returns the memory usage (in bytes)
Data_T m_ignoredData
Dummy variable for assignment.
boost::intrusive_ptr< EmptyField > Ptr
virtual std::string className() const
Returns the class name of the object. Used by the class pool and when writing the data to disk...
virtual FieldBase::Ptr clone() const
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement i...
Contains Field, WritableField and ResizableField classes.
Data_T m_constantData
Field constant value.
virtual long long int memSize() const
Returns the memory usage (in bytes)
#define DEFINE_FIELD_RTTI_CONCRETE_CLASS
EmptyField< Data_T > class_type
static DEFINE_FIELD_RTTI_CONCRETE_CLASS const char * classType()
RTTI replacement.
ResizableField< Data_T > base