44 #ifndef _INCLUDED_Field3D_EmptyField_H_ 45 #define _INCLUDED_Field3D_EmptyField_H_ 49 #include <boost/lexical_cast.hpp> 65 # define UNUSED(p) ((p)=(p)) 85 template <
class Data_T>
93 typedef boost::intrusive_ptr<EmptyField>
Ptr;
94 typedef std::vector<Ptr>
Vec;
120 virtual Data_T
value(
int i,
int j,
int k)
const;
121 virtual long long int memSize()
const;
143 virtual Data_T&
lvalue(
int i,
int j,
int k);
181 template <
class Data_T>
190 template <
class Data_T>
198 template <
class Data_T>
218 template <
class Data_T>
222 return sizeof(*this) + superClassMemSize;
227 template <
class Data_T>
247 template <
class Data_T>
255 template <
class Data_T>
279 #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.
EmptyField< float >::Ptr ProxyPtr
static const char * staticClassType()
static DEFINE_FIELD_RTTI_CONCRETE_CLASS const char * staticClassName()
EmptyField()
Constructs an empty buffer.
virtual void clear(const Data_T &value)
Clears all the voxels in the storage.
boost::intrusive_ptr< FieldBase > Ptr
virtual Data_T value(int i, int j, int k) const
Read access to a voxel. The coordinates are in integer voxel space .
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
#define FIELD3D_CLASSNAME_CLASSTYPE_IMPLEMENTATION
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.
Data_T m_ignoredData
Dummy variable for assignment.
boost::intrusive_ptr< EmptyField > Ptr
Contains Field, WritableField and ResizableField classes.
Data_T m_constantData
Field constant value.
#define DEFINE_FIELD_RTTI_CONCRETE_CLASS
virtual long long int memSize() const
Returns the memory usage (in bytes)
EmptyField< Data_T > class_type
virtual FIELD3D_CLASSNAME_CLASSTYPE_IMPLEMENTATION FieldBase::Ptr clone() const
Returns a pointer to a copy of the field, pure virtual so ensure derived classes properly implement i...
virtual long long int memSize() const
Returns the memory usage (in bytes)
ResizableField< Data_T > base